org.oddjob.jmx.client
Class SimpleNotificationProcessor

java.lang.Object
  extended by java.lang.Thread
      extended by org.oddjob.jmx.client.SimpleNotificationProcessor
All Implemented Interfaces:
Runnable, NotificationProcessor

public class SimpleNotificationProcessor
extends Thread
implements NotificationProcessor

Process notifications from the server. This forces events to be processed in a single thread.

Not sure if this is really required but early in development of the JMX client/server it seemed possible to receive child added notifications out of sync, and this seemed to fix it.

Author:
Rob Gordon.

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SimpleNotificationProcessor(org.apache.log4j.Logger logger)
           
 
Method Summary
 void enqueue(Runnable o)
           
 void enqueueDelayed(Runnable runnable, long delay)
           
 void run()
           
 int size()
           
 void stopProcessor()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleNotificationProcessor

public SimpleNotificationProcessor(org.apache.log4j.Logger logger)
Method Detail

enqueue

public void enqueue(Runnable o)
Specified by:
enqueue in interface NotificationProcessor

enqueueDelayed

public void enqueueDelayed(Runnable runnable,
                           long delay)
Specified by:
enqueueDelayed in interface NotificationProcessor

run

public void run()
Specified by:
run in interface Runnable
Specified by:
run in interface NotificationProcessor
Overrides:
run in class Thread

stopProcessor

public void stopProcessor()

size

public int size()
Specified by:
size in interface NotificationProcessor