com.protomatter.pas.eventmanager
Class PASEventManagerImpl
java.lang.Object
|
+--com.protomatter.pas.eventmanager.PASEventManagerImpl
- All Implemented Interfaces:
- PASEventManager, PASStartup
- public class PASEventManagerImpl
- extends java.lang.Object
- implements PASStartup, PASEventManager
The default implementation of the PASEventManager interface.
Reads the following startup options:
- numThreads
-
The number of worker threads to use for event processing. The
default is 5, which should be adequate, unless you are planning on
having lots and lots of events that are processed by listeners who take
a long time for their handlePASEvent(...) method to complete.
- See Also:
PASEventManager
Method Summary |
void |
registerListener(java.lang.String topic,
PASEventListener listener)
Register interest in the given topic. |
void |
sendEvent(java.lang.String topic,
PASEvent event)
Send an event to the given topic. |
java.lang.String |
startup(java.lang.String name,
java.util.Properties pasProps,
java.util.Properties myProps,
javax.naming.Context context)
Start this thing up. |
void |
unregisterListener(java.lang.String topic,
PASEventListener listener)
Un-register interest in the given topic. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PASEventManagerImpl
public PASEventManagerImpl()
- Default constructor.
startup
public java.lang.String startup(java.lang.String name,
java.util.Properties pasProps,
java.util.Properties myProps,
javax.naming.Context context)
throws StartupException
- Description copied from interface:
PASStartup
- Start this thing up.
- Specified by:
startup
in interface PASStartup
- See Also:
PASStartup
sendEvent
public void sendEvent(java.lang.String topic,
PASEvent event)
- Description copied from interface:
PASEventManager
- Send an event to the given topic.
- Specified by:
sendEvent
in interface PASEventManager
- See Also:
PASEventManager
registerListener
public void registerListener(java.lang.String topic,
PASEventListener listener)
- Description copied from interface:
PASEventManager
- Register interest in the given topic.
- Specified by:
registerListener
in interface PASEventManager
- See Also:
PASEventManager
unregisterListener
public void unregisterListener(java.lang.String topic,
PASEventListener listener)
- Description copied from interface:
PASEventManager
- Un-register interest in the given topic.
- Specified by:
unregisterListener
in interface PASEventManager
- See Also:
PASEventManager