|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.DownloadService.Downloadable
public static class DownloadService.Downloadable
Represents a periodically updated JSON data file obtained from a remote URL.
This mechanism is one of the basis of the update center, which involves fetching up-to-date data file.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
Constructor Summary | |
---|---|
DownloadService.Downloadable()
|
|
DownloadService.Downloadable(Class id)
Uses the class name as an ID. |
|
DownloadService.Downloadable(String id)
|
|
DownloadService.Downloadable(String id,
String url)
|
|
DownloadService.Downloadable(String id,
String url,
long interval)
|
Method Summary | |
---|---|
static ExtensionList<DownloadService.Downloadable> |
all()
Returns all the registered DownloadService.Downloadable s. |
void |
doPostBack(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
This is where the browser sends us the data. |
static DownloadService.Downloadable |
get(String id)
Returns the DownloadService.Downloadable that has the given ID. |
net.sf.json.JSONObject |
getData()
Loads the current file into JSON and returns it, or null if no data exists. |
TextFile |
getDataFile()
This is where the retrieved file will be stored. |
long |
getDue()
When shall we retrieve this file next time? |
String |
getId()
|
long |
getInterval()
How often do we retrieve the new image? |
String |
getUrl()
URL to download. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DownloadService.Downloadable(String id, String url, long interval)
url
- URL relative to UpdateCenter.getDefaultBaseUrl()
.
So if this string is "foo.json", the ultimate URL will be
something like "http://updates.jenkins-ci.org/updates/foo.json"
For security and privacy reasons, we don't allow the retrieval
from random locations.public DownloadService.Downloadable()
public DownloadService.Downloadable(Class id)
public DownloadService.Downloadable(String id)
public DownloadService.Downloadable(String id, String url)
Method Detail |
---|
public String getId()
public String getUrl()
public long getInterval()
public TextFile getDataFile()
public long getDue()
public net.sf.json.JSONObject getData() throws IOException
IOException
public void doPostBack(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
IOException
public static ExtensionList<DownloadService.Downloadable> all()
DownloadService.Downloadable
s.
public static DownloadService.Downloadable get(String id)
DownloadService.Downloadable
that has the given ID.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |