public class EventDispatchServiceAdapter extends Object implements EventDispatchService
EventDispatchService
. Intended for
use in implementations of the service which wish to override a handful of
selected behaviors, such as unit testing.Constructor and Description |
---|
EventDispatchServiceAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
addSink(Class<? extends Event> eventClass,
EventSink sink)
Adds a new event sink associated with the specified event class.
|
EventSink |
get(Class<? extends Event> eventClass)
Get the event sink associated with the given event class.
|
void |
post(Event event)
Posts an opaque event for asynchronous dispatching.
|
void |
removeSink(Class<? extends Event> eventClass)
Removes a previously added event sink.
|
public void addSink(Class<? extends Event> eventClass, EventSink sink)
EventSinkBroker
addSink
in interface EventSinkBroker
eventClass
- class of events handled by the sinksink
- event sinkpublic EventSink get(Class<? extends Event> eventClass)
EventSinkBroker
get
in interface EventSinkBroker
eventClass
- class of eventspublic void removeSink(Class<? extends Event> eventClass)
EventSinkBroker
removeSink
in interface EventSinkBroker
eventClass
- class of events handled by the sinkpublic void post(Event event)
EventDispatcher
post
in interface EventDispatcher
event
- event dataCopyright © 2015. All Rights Reserved.