| java.lang.Object org.jboss.ha.framework.server.AsynchEventHandler
All known Subclasses: org.jboss.ha.framework.server.DistributedReplicantManagerImpl, org.jboss.ha.framework.server.HAPartitionImpl,
AsynchEventHandler | class AsynchEventHandler implements Runnable(Code) | | Utility class that accepts objects into a queue and maintains a separate
thread that reads them off the queue and passes them to a registered
"processor".
author: Brian Stansberry version: $Revision$ |
Inner Class :public static interface AsynchEventProcessor | |
Constructor Summary | |
public | AsynchEventHandler(AsynchEventProcessor processor, String name) Create a new AsynchEventHandler.
Parameters: processor - object to which objects placed in the queue shouldbe handed when dequeued Parameters: name - name for this instance. |
Method Summary | |
public boolean | isStopped() | public void | queueEvent(Object event) Place the given object in the queue. | public void | run() | public void | start() Starts the handler thread. | public void | stop() Stops the handler thread. |
AsynchEventHandler | public AsynchEventHandler(AsynchEventProcessor processor, String name)(Code) | | Create a new AsynchEventHandler.
Parameters: processor - object to which objects placed in the queue shouldbe handed when dequeued Parameters: name - name for this instance. Appended to the processor'sclass name to create a log category, and usedto name to handler thread |
isStopped | public boolean isStopped()(Code) | | |
queueEvent | public void queueEvent(Object event) throws InterruptedException(Code) | | Place the given object in the queue.
Parameters: event - the object to asynchronously pass to the AsynchEventHandler. throws: InterruptedException - if the thread is interrupted while blockingon the queue. |
start | public void start()(Code) | | Starts the handler thread.
|
stop | public void stop()(Code) | | Stops the handler thread.
|
|
|