|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.eventadmin.impl.EventAdminImpl
public class EventAdminImpl
This is the actual implementation of the OSGi R4 Event Admin Service (see the Compendium 113 for details). The implementation uses a HandlerTasks in order to determine applicable EventHandler for a specific event and subsequently dispatches the event to the handlers via DeliverTasks. To do this, it uses two different DeliverTasks one for asynchronous and one for synchronous event delivery depending on whether its post() or its send() method is called. Note that the actual work is done in the implementations of the DeliverTasks. Additionally, a stop method is provided that prevents subsequent events to be delivered.
Constructor Summary | |
---|---|
EventAdminImpl(HandlerTasks managers,
DefaultThreadPool syncPool,
DefaultThreadPool asyncPool,
int timeout,
String[] ignoreTimeout)
The constructor of the EventAdmin implementation. |
Method Summary | |
---|---|
void |
postEvent(Event event)
Post an asynchronous event. |
void |
sendEvent(Event event)
Send a synchronous event. |
void |
stop()
This method can be used to stop the delivery of events. |
void |
update(HandlerTasks managers,
int timeout,
String[] ignoreTimeout)
Update the event admin with new configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventAdminImpl(HandlerTasks managers, DefaultThreadPool syncPool, DefaultThreadPool asyncPool, int timeout, String[] ignoreTimeout)
managers
- The factory used to determine applicable EventHandlersyncPool
- The synchronous thread poolasyncPool
- The asynchronous thread poolMethod Detail |
---|
public void postEvent(Event event)
postEvent
in interface EventAdmin
event
- The event to be posted by this service
IllegalStateException
- - In case we are stoppedEventAdmin.postEvent(org.osgi.service.event.Event)
public void sendEvent(Event event)
sendEvent
in interface EventAdmin
event
- The event to be send by this service
IllegalStateException
- - In case we are stoppedEventAdmin.sendEvent(org.osgi.service.event.Event)
public void stop()
public void update(HandlerTasks managers, int timeout, String[] ignoreTimeout)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |