public interface EventGenerator<T>
Modifier and Type | Method and Description |
---|---|
void |
addObserver(EventObserver<T> observer)
Subscribes
observer to receive generated events. |
void |
notifyEventFailure(T event)
Notify all the observers of an event failure who subscribed to receive events.
|
void |
notifyEventStart(T event)
Notify all the observers of an event start who subscribed to receive events.
|
void |
notifyEventStop(T event)
Notify all the observers of an event stop who subscribed to receive events.
|
void |
notifyEventSuccess(T event)
Notify all the observers of an event success who subscribed to receive events.
|
void |
removeObserver(EventObserver<T> observer)
Removes
observer from receiving any further events from this generator. |
void addObserver(EventObserver<T> observer)
observer
to receive generated events.observer
- EventObserver
interested in receiving updates from this event
generator. May not be null
.void removeObserver(EventObserver<T> observer)
observer
from receiving any further events from this generator.observer
- EventObserver
that is to stop receiving updates from this event
generator. May not be null
.void notifyEventStart(T event)
event
- Generated event from the generatorvoid notifyEventSuccess(T event)
event
- Event which was successful from the generator.void notifyEventFailure(T event)
event
- Event which was failure from the generator.void notifyEventStop(T event)
event
- Event which was stopped from the generator.