| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--fipaos.util.Monitor | +--fipaos.util.MultiThreadedMonitor
This is an extension of the Monitor object. When an object is placed into the queue it is passed to all of the MonitorListener registered with this MultiThreadedMonitor. WARNING: There is no guarantee that objects will arrive at the MonitorListener's in the order they are placed into the Queue this MultiThreadedMonitor is observing. It is possible that more than one thread will invoke the monitorUpdate() method at a time, so the implementation should be thread-safe.
Fields inherited from class java.lang.Thread |
MIN_PRIORITY, NORM_PRIORITY, MAX_PRIORITY |
Constructor Summary | |
MultiThreadedMonitor(Queue queue, int threads) Constructor - starts threads running |
Method Summary | |
synchronized void | addMonitorListener(MonitorListener ml) Adds a MonitorListener to this Monitor |
void | halt() Invoked when this should exit cleanly |
static void | main(String[] args) Test harness for Monitor class |
synchronized void | monitorUpdate(Object o) Deals with incoming objects by dispatching them to our Monitors |
synchronized void | removeMonitorListener(MonitorListener ml) Removes a MonitorListener from this Monitor |
Methods inherited from class fipaos.util.Monitor |
run |
Methods inherited from class java.lang.Thread |
currentThread, yield, sleep, sleep, start, stop, stop, interrupt, interrupted, isInterrupted, destroy, isAlive, suspend, resume, setPriority, getPriority, setName, getName, getThreadGroup, activeCount, enumerate, countStackFrames, join, join, join, dumpStack, setDaemon, isDaemon, checkAccess, toString, getContextClassLoader, setContextClassLoader |
Methods inherited from class java.lang.Object |
getClass, hashCode, equals, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MultiThreadedMonitor(Queue queue, int threads)
Method Detail |
public synchronized void addMonitorListener(MonitorListener ml)
public void halt()
public static void main(String[] args)
public synchronized void monitorUpdate(Object o)
public synchronized void removeMonitorListener(MonitorListener ml)
Association Links |
to Class fipaos.util.Monitor
to Class fipaos.util.Queue
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |