|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ow2.util.event.impl.EventDispatcher
public class EventDispatcher
Define methods needed to register listeners and dispatch events.
| Constructor Summary | |
|---|---|
EventDispatcher()
The dispatcher constructor. |
|
| Method Summary | |
|---|---|
void |
addListener(org.ow2.util.event.api.IEventListener listener)
Add a listener. |
org.ow2.util.event.api.IEventToken |
dispatch(org.ow2.util.event.api.IEvent event)
Dispatch this event. |
org.ow2.util.event.api.IEventToken |
dispatch(org.ow2.util.event.api.IEvent event,
org.ow2.util.event.api.EventPriority priority)
Dispatch an event. |
org.ow2.util.event.api.IEventToken |
dispatch(org.ow2.util.event.api.IEvent event,
org.ow2.util.event.api.EventPriority priority,
int nbWorker)
Dispatch an event. |
org.ow2.util.event.api.IEventToken |
dispatch(org.ow2.util.event.api.IEvent event,
org.ow2.util.event.api.EventPriority priority,
long timeout)
Dispatch an event. |
org.ow2.util.event.api.IEventToken |
dispatch(org.ow2.util.event.api.IEvent event,
org.ow2.util.event.api.EventPriority priority,
long timeout,
int nbWorker)
Dispatch an event. |
org.ow2.util.event.api.IEventToken |
dispatch(org.ow2.util.event.api.IEvent event,
int nbWorker)
Dispatch an event. |
org.ow2.util.event.api.IEventToken |
dispatch(org.ow2.util.event.api.IEvent event,
long timeout)
Dispatch an event. |
org.ow2.util.event.api.IEventToken |
dispatch(org.ow2.util.event.api.IEvent event,
long timeout,
int nbWorker)
Dispatch an event. |
int |
getNbWorkers()
Get the number of workers. |
boolean |
isAvailable()
Get the dispatcher state. |
void |
removeListener(org.ow2.util.event.api.IEventListener listener)
Remove a listener. |
void |
setNbWorkers(int nbWorkers)
Set the number of workers. |
void |
start()
Start the dispatcher. |
void |
stop()
Stop the dispatcher. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventDispatcher()
| Method Detail |
|---|
public void start()
start in interface org.ow2.util.event.api.IEventDispatcherpublic void stop()
stop in interface org.ow2.util.event.api.IEventDispatcherpublic boolean isAvailable()
public int getNbWorkers()
getNbWorkers in interface org.ow2.util.event.api.IEventDispatcherpublic void setNbWorkers(int nbWorkers)
setNbWorkers in interface org.ow2.util.event.api.IEventDispatchernbWorkers - The number of workers.public void addListener(org.ow2.util.event.api.IEventListener listener)
addListener in interface org.ow2.util.event.api.IEventDispatcherlistener - The listener to add.public void removeListener(org.ow2.util.event.api.IEventListener listener)
removeListener in interface org.ow2.util.event.api.IEventDispatcherlistener - The listener to remove.public org.ow2.util.event.api.IEventToken dispatch(org.ow2.util.event.api.IEvent event)
dispatch in interface org.ow2.util.event.api.IEventDispatcherevent - The event to dispatch.
public org.ow2.util.event.api.IEventToken dispatch(org.ow2.util.event.api.IEvent event,
org.ow2.util.event.api.EventPriority priority)
dispatch in interface org.ow2.util.event.api.IEventDispatcherevent - The event to dispatch.priority - the priority to synchronize with, or null to get the token immediately.
public org.ow2.util.event.api.IEventToken dispatch(org.ow2.util.event.api.IEvent event,
long timeout)
dispatch in interface org.ow2.util.event.api.IEventDispatcherevent - The event to dispatch.timeout - The maximum time dispatch waits for synchronous listeners to process.
public org.ow2.util.event.api.IEventToken dispatch(org.ow2.util.event.api.IEvent event,
int nbWorker)
dispatch in interface org.ow2.util.event.api.IEventDispatcherevent - The event to dispatch.nbWorker - The number of worker to allocate.
public org.ow2.util.event.api.IEventToken dispatch(org.ow2.util.event.api.IEvent event,
org.ow2.util.event.api.EventPriority priority,
long timeout)
dispatch in interface org.ow2.util.event.api.IEventDispatcherevent - The event to dispatch.priority - the priority to synchronize with, or null to get the token immediately.timeout - The maximum time dispatch waits for synchronous listeners to process.
public org.ow2.util.event.api.IEventToken dispatch(org.ow2.util.event.api.IEvent event,
org.ow2.util.event.api.EventPriority priority,
int nbWorker)
dispatch in interface org.ow2.util.event.api.IEventDispatcherevent - The event to dispatch.priority - the priority to synchronize with, or null to get the token immediately.nbWorker - The number of worker to allocate.
public org.ow2.util.event.api.IEventToken dispatch(org.ow2.util.event.api.IEvent event,
long timeout,
int nbWorker)
dispatch in interface org.ow2.util.event.api.IEventDispatcherevent - The event to dispatch.timeout - The maximum time dispatch waits for synchronous listeners to process.nbWorker - The number of worker to allocate.
public org.ow2.util.event.api.IEventToken dispatch(org.ow2.util.event.api.IEvent event,
org.ow2.util.event.api.EventPriority priority,
long timeout,
int nbWorker)
dispatch in interface org.ow2.util.event.api.IEventDispatcherevent - The event to dispatch.priority - the priority to synchronize with, or null to get the token immediately.timeout - The maximum time dispatch waits for synchronous listeners to process.nbWorker - The number of worker to allocate.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||