public interface Events
Modifier and Type | Method and Description |
---|---|
EventsDistributor |
distributor()
returns the API for the EventsDistributor
|
void |
fireEvent(EventModel event)
This method fires an Event
|
Identification |
getManagerIdentification()
returns the ID of the Manager (LocalEventManager)
|
Optional<EventCallable> |
registerEventCaller(Identification identification)
Registers with the LocalEventManager to fire an event.
|
void |
registerEventFinishedListener(EventModel event,
EventListenerModel eventListener)
Adds an listener for events that gets called when the event finished processing.
|
void |
registerEventFinishedListener(List<String> ids,
EventListenerModel eventListener)
Adds an listener for events that gets called when the event finished processing.
|
void |
registerEventListener(EventModel event,
EventListenerModel eventListener)
Adds an listener for events that gets called before the generation of the resources and the outputPlugins..
|
void |
registerEventListener(List<String> ids,
EventListenerModel eventListener)
Adds an listener for events that gets called before the generation of the resources and the outputPlugins..
|
void |
unregisterEventCaller(Identification identification)
Unregister with the LocalEventManager.
|
void |
unregisterEventFinishedListener(EventListenerModel eventListener)
unregister an EventListener that got called when the event finished processing.
|
void |
unregisterEventFinishedListener(EventModel event,
EventListenerModel eventListener)
unregister an EventListener that got called when the event finished processing.
|
void |
unregisterEventListener(EventListenerModel eventListener)
unregister an EventListener that gets called before the generation of the resources and the outputPlugins.
|
void |
unregisterEventListener(EventModel event,
EventListenerModel eventListener)
unregister an EventListener that gets called before the generation of the resources and the outputPlugins.
|
void registerEventListener(EventModel event, EventListenerModel eventListener) throws IllegalIDException
Be careful with this method, it will register the listener for ALL the informations found in the Event. If your event-type is a common event type, it will fire EACH time!. It will also register for all Descriptors individually! It will also ignore if this listener is already listening to an Event. Method is thread-safe.
event
- the Event to listen to (it will listen to all descriptors individually!)eventListener
- the ActivatorEventListener-interface for receiving activator eventsIllegalIDException
- not yet implementedvoid registerEventListener(List<String> ids, EventListenerModel eventListener)
It will register for all ids individually! This method will ignore if this listener is already listening to an Event. Method is thread-safe.
ids
- this can be type, or descriptors etc.eventListener
- the ActivatorEventListener-interface for receiving activator eventsvoid unregisterEventListener(EventModel event, EventListenerModel eventListener)
It will unregister for all Descriptors individually! It will also ignore if this listener is not listening to an Event. Method is thread-safe.
event
- the Event to stop listen toeventListener
- the ActivatorEventListener used to listen for eventsIllegalArgumentException
- if Listener is already listening to the Event or the id is not allowedvoid unregisterEventListener(EventListenerModel eventListener)
It will unregister for all Descriptors individually! It will also ignore if this listener is not listening to an Event. Method is thread-safe.
eventListener
- the ActivatorEventListener used to listen for eventsIllegalArgumentException
- if Listener is already listening to the Event or the id is not allowedvoid registerEventFinishedListener(EventModel event, EventListenerModel eventListener) throws IllegalIDException
Be careful with this method, it will register the listener for ALL the informations found in the Event. If your event-type is a common event type, it will fire EACH time!. It will also register for all Descriptors individually! It will also ignore if this listener is already listening to an Event. Method is thread-safe.
event
- the Event to listen to (it will listen to all descriptors individually!)eventListener
- the ActivatorEventListener-interface for receiving activator eventsIllegalIDException
- not yet implementedvoid registerEventFinishedListener(List<String> ids, EventListenerModel eventListener)
It will register for all ids individually! This method will ignore if this listener is already listening to an Event. Method is thread-safe.
ids
- this can be type, or descriptors etc.eventListener
- the ActivatorEventListener-interface for receiving activator eventsvoid unregisterEventFinishedListener(EventModel event, EventListenerModel eventListener)
It will unregister for all Descriptors individually! It will also ignore if this listener is not listening to an Event. Method is thread-safe.
event
- the Event to stop listen toeventListener
- the ActivatorEventListener used to listen for eventsIllegalArgumentException
- if Listener is already listening to the Event or the id is not allowedvoid unregisterEventFinishedListener(EventListenerModel eventListener)
It will unregister for all Descriptors individually! It will also ignore if this listener is not listening to an Event. Method is thread-safe.
eventListener
- the ActivatorEventListener used to listen for eventsIllegalArgumentException
- if Listener is already listening to the Event or the id is not allowedOptional<EventCallable> registerEventCaller(Identification identification) throws IllegalIDException
Note: the same Event can be fired from multiple sources. Method is thread-safe.
identification
- the Identification of the the instanceIllegalIDException
- not yet implementedvoid unregisterEventCaller(Identification identification)
Method is thread-safe.
identification
- the Identification of the the instancevoid fireEvent(EventModel event) throws IllegalIDException, MultipleEventsException
event
- the fired EventIllegalAccessError
- not yet implementedIllegalIDException
- not yet implementedMultipleEventsException
- if there is currently another Event processingEventsDistributor distributor()
Identification getManagerIdentification()
Copyright © 2016. All rights reserved.