|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.vamsas.client.simpleclient.WatcherElement
Field Summary | |
protected WatcherCallBack |
handler
|
protected boolean |
handlerCalled
true when the handler is being called for this watcher |
protected FileWatcher |
watcher
|
protected boolean |
watchForChange
set this to false to stop the thread |
Constructor Summary | |
WatcherElement(WatcherCallBack handler)
|
Method Summary | |
protected void |
callHandler(Lock doclock)
Calls the current eventhandler |
boolean |
doWatch()
Originally from the uk.ac.vamsas.test.simpleclient.ArchiveClient method |
protected void |
enableWatch()
must be called by implementations of enablewatch |
protected abstract void |
endWatch()
called by haltWatch before clearing the FileWatcher reference. |
WatcherCallBack |
getHandler()
|
protected abstract java.lang.String |
getSubject()
implemented for debug information purposes. |
FileWatcher |
getWatcher()
|
void |
haltWatch()
will instruct watcher to stop and wait around for one WATCH_SLEEP before returning. |
protected abstract void |
initWatch()
called to generate the watcher object by enableWatch and in doWatch |
boolean |
isHandlerCalled()
|
boolean |
isWatchEnabled()
|
void |
setHandler(WatcherCallBack handler)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected FileWatcher watcher
protected WatcherCallBack handler
protected boolean watchForChange
protected boolean handlerCalled
Constructor Detail |
public WatcherElement(WatcherCallBack handler)
Method Detail |
public void haltWatch()
protected abstract void endWatch()
protected abstract void initWatch()
protected abstract java.lang.String getSubject()
protected void enableWatch()
public boolean doWatch()
protected void callHandler(Lock doclock)
doclock
- the lock on the watch filepublic WatcherCallBack getHandler()
public boolean isHandlerCalled()
public boolean isWatchEnabled()
public void setHandler(WatcherCallBack handler)
handler
- the handler to setpublic FileWatcher getWatcher()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |