Module com.gluonhq.connect
Package com.gluonhq.impl.connect.event
Class ConnectEventDispatcher<T extends Event>
- java.lang.Object
-
- com.gluonhq.impl.connect.event.ConnectEventDispatcher<T>
-
- All Implemented Interfaces:
EventDispatcher
public class ConnectEventDispatcher<T extends Event> extends Object implements EventDispatcher
AnEventDispatcher
which handlesConnectStateEvent
's registration and when used in an event dispatch chain it forwards the received events to the appropriate registered handlers.
-
-
Constructor Summary
Constructors Constructor Description ConnectEventDispatcher(Object eventSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Event
dispatchBubblingEvent(T event)
Event
dispatchCapturingEvent(T event)
Event
dispatchEvent(Event event, EventDispatchChain tail)
void
setEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
Sets the specified singleton handler.
-
-
-
Constructor Detail
-
ConnectEventDispatcher
public ConnectEventDispatcher(Object eventSource)
-
-
Method Detail
-
dispatchEvent
public Event dispatchEvent(Event event, EventDispatchChain tail)
- Specified by:
dispatchEvent
in interfaceEventDispatcher
-
setEventHandler
public final void setEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
Sets the specified singleton handler. There can only be one such handler specified at a time.- Parameters:
eventType
- the event type to associate with the given eventHandlereventHandler
- the handler to register, or null to unregister- Throws:
NullPointerException
- if the event type is null
-
-