|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.SpyObject
net.spy.cron.Job
net.spy.net.URLItem
public class URLItem
A particular URL that's being watched.
| Constructor Summary | |
|---|---|
URLItem(java.net.URL u)
Get a new URLItem at the default interval. |
|
URLItem(java.net.URL u,
java.util.Date startDate,
TimeIncrement ti)
Get an instance of URLItem. |
|
URLItem(java.net.URL u,
TimeIncrement ti)
Get a new URLItem with the given interval. |
|
| Method Summary | |
|---|---|
java.lang.String |
getContent()
Get the content from the last fetch. |
long |
getLastRequest()
Find out when the last request was. |
int |
getMaxIdleTime()
Get the maximum number of milliseconds this URL will remain in the container if nothing requests it. |
java.net.URL |
getURL()
Get the URL this thing is watching. |
protected void |
markFinished()
Override the finished mark to also stop this job if it hasn't been touched recently enough. |
void |
runJob()
Ask the URL to update itself if it needs to. |
void |
setMaxIdleTime(int to)
Set the maximum number of milliseconds this URL will remain in the container if nothing requests it. |
| Methods inherited from class net.spy.cron.Job |
|---|
findNextRun, getName, getStartTime, getTimeIncrement, isAlive, isReady, isTrash, markStarted, run, setName, setStartTime, stopRunning, toString |
| Methods inherited from class net.spy.SpyObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.spy.util.ThreadPoolRunnable |
|---|
toString |
| Methods inherited from interface java.lang.Runnable |
|---|
run |
| Constructor Detail |
|---|
public URLItem(java.net.URL u)
u - URL to watch
public URLItem(java.net.URL u,
TimeIncrement ti)
u - URL to watchti - the increment
public URLItem(java.net.URL u,
java.util.Date startDate,
TimeIncrement ti)
u - URL to watchstartDate - time to startti - the increment| Method Detail |
|---|
public void runJob()
runJob in class Job
public java.lang.String getContent()
throws java.io.IOException
java.io.IOExceptionpublic long getLastRequest()
public java.net.URL getURL()
protected void markFinished()
markFinished in class Jobpublic void setMaxIdleTime(int to)
public int getMaxIdleTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||