public class DefaultEventSinkRegistry extends Object implements EventSinkRegistry
Constructor and Description |
---|
DefaultEventSinkRegistry() |
Modifier and Type | Method and Description |
---|---|
<E extends Event> |
addSink(Class<E> eventClass,
EventSink<E> sink)
Adds the specified sink for the given event class.
|
<E extends Event> |
getSink(Class<E> eventClass)
Returns the event sink associated with the specified event class.
|
Set<Class<? extends Event>> |
getSinks()
Returns the set of all event classes for which sinks are presently
registered.
|
<E extends Event> |
removeSink(Class<E> eventClass)
Removes the sink associated with the given event class.
|
public <E extends Event> void addSink(Class<E> eventClass, EventSink<E> sink)
EventSinkRegistry
addSink
in interface EventSinkRegistry
E
- type of eventeventClass
- event classsink
- event sinkpublic <E extends Event> void removeSink(Class<E> eventClass)
EventSinkRegistry
removeSink
in interface EventSinkRegistry
E
- type of eventeventClass
- event classpublic <E extends Event> EventSink<E> getSink(Class<E> eventClass)
EventSinkRegistry
getSink
in interface EventSinkRegistry
E
- type of eventeventClass
- event classpublic Set<Class<? extends Event>> getSinks()
EventSinkRegistry
getSinks
in interface EventSinkRegistry