Package es.urjc.etsii.grafo.events
Class EventPublisher
java.lang.Object
es.urjc.etsii.grafo.events.EventPublisher
Distributes the given event to different application components.
-
Constructor Summary
ConstructorsConstructorDescriptionEventPublisher(org.springframework.context.ApplicationEventPublisher publisher) Spring integration constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidblock()Block dispatch of all future events.static EventPublisherGet event publisher instancevoidpublishEvent(MorkEvent event) Asynchronously send and process an eventvoidunblock()Enable event dispatching.
-
Constructor Details
-
EventPublisher
public EventPublisher(org.springframework.context.ApplicationEventPublisher publisher) Spring integration constructor- Parameters:
publisher- Spring ApplicationEventPublisher
-
-
Method Details
-
getInstance
Get event publisher instance- Returns:
- event publisher instance
-
publishEvent
Asynchronously send and process an event- Parameters:
event- Event to propagate
-
block
public void block()Block dispatch of all future events. All calls to publishEvent() will be ignored. -
unblock
public void unblock()Enable event dispatching.
-