uk.ac.vamsas.client.simpleclient
Class VamsasFileWatcherThread

java.lang.Object
  extended byjava.lang.Thread
      extended byuk.ac.vamsas.client.simpleclient.VamsasFileWatcherThread
All Implemented Interfaces:
java.lang.Runnable

public class VamsasFileWatcherThread
extends java.lang.Thread

Watches a bunch of VamsasFile states, calling the associated event handler when anything changes.

Author:
JimP

Field Summary
 int WATCH_SLEEP
          time between checks for changes of state on the file
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
VamsasFileWatcherThread(EventGeneratorThread client)
           
 
Method Summary
 void addElement(WatcherElement welement)
           
 void clearElements()
           
 void haltWatchers()
           
 void interrupt()
           
 void removeElemenet(WatcherElement welement)
           
 void run()
          check each watcher in sequence, monitoring any events generated.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WATCH_SLEEP

public int WATCH_SLEEP
time between checks for changes of state on the file

Constructor Detail

VamsasFileWatcherThread

public VamsasFileWatcherThread(EventGeneratorThread client)
Method Detail

addElement

public void addElement(WatcherElement welement)

removeElemenet

public void removeElemenet(WatcherElement welement)

clearElements

public void clearElements()

haltWatchers

public void haltWatchers()

run

public void run()
check each watcher in sequence, monitoring any events generated. Then wait WATCH_SLEEP milliseconds before checking all again (if there were no events)


interrupt

public void interrupt()