Package org.refcodes.observer
Interface Publisher<E extends GenericEvent<?>>
-
- Type Parameters:
E
- the element type
public interface Publisher<E extends GenericEvent<?>>
A system publishingGenericActionEvent
instances (such as an event bus), may implement this interface. An observable (event listener), in case of being of typeObserver
, may be notified using theObserver.onEvent(GenericEvent)
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
publishEvent(E aEvent)
The listener implementing this interface is notified of an event via this method.
-
-
-
Method Detail
-
publishEvent
void publishEvent(E aEvent)
The listener implementing this interface is notified of an event via this method. The publisher pushes the event to the subscriber. When this method exits, then all listeners have been notified with the given event. I.e. even if each event is dispatched in an own thread, then the longest running thread determines when this method finishes.- Parameters:
aEvent
- aEvent The event to be pushed from the publisher to the subscriber.
-
-