|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.SpyObject
net.spy.net.URLWatcher
public class URLWatcher
URLWatcher watches URLs and provides access to the most recent data from the URL.
| Constructor Summary | |
|---|---|
protected |
URLWatcher()
Get an instance of URLWatcher. |
| Method Summary | |
|---|---|
String |
getContent(URL u)
Get the content (as a String) for a given URL. |
static URLWatcher |
getInstance()
Get the static instance of URLWatcher. |
protected URLItem |
getNewURLItem(URL u)
|
boolean |
isWatching(URL u)
Find out if this URLWatcher is watching a given URL. |
static void |
setInstance(URLWatcher uw)
Set an instance (for testing). |
void |
shutdown()
Instruct the URLWatcher to stop URLWatching. |
void |
startWatching(URLItem u)
Start watching the given URL. |
String |
toString()
String me. |
| Methods inherited from class net.spy.SpyObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected URLWatcher()
| Method Detail |
|---|
public static URLWatcher getInstance()
public static void setInstance(URLWatcher uw)
public String toString()
toString in class Objectpublic boolean isWatching(URL u)
u - the URL to test
public void startWatching(URLItem u)
u - The item to watch
TimeoutException
ExecutionException
InterruptedExceptionpublic void shutdown()
protected URLItem getNewURLItem(URL u)
public String getContent(URL u)
throws IOException
u - The URL whose content we want
IOException - if there was a problem updating the URL
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||