Interface EventGateway
- All Known Implementing Classes:
DefaultEventGateway
public interface EventGateway
Interface towards the Event Handling components of an application.
This interface provides a friendlier API toward the EventSink and allows for
components to easily publish events.
- Since:
- 4.1.0
- Author:
- Bert Laverman
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault CompletableFuture<Void> Publishes the giveneventswithin the givencontext.default CompletableFuture<Void> publish(ProcessingContext context, Object... events) Publishes the giveneventswithin the givencontext.publish(ProcessingContext context, List<?> events) Publishes the giveneventswithin the givencontext.
-
Method Details
-
publish
Publishes the giveneventswithin the givencontext. When present, theeventsshould be published as part of thecontext'slifecycle.The
eventsare mapped toEventMessagesbefore they are given to anEventSink.- Parameters:
context- The processing context, if any, to publish the giveneventsin.events- The collection of events to publish.- Returns:
- A
CompletableFutureofVoid. Completion of the future depends on theEventSinkused by this gateway.
-
publish
Publishes the giveneventswithin the givencontext. When present, theeventsshould be published as part of thecontext'slifecycle.The
eventsare mapped toEventMessagesbefore they are given to anEventSink.- Parameters:
context- The processing context, if any, to publish the giveneventsin.events- The collection of events to publish.- Returns:
- A
CompletableFutureofVoid. Completion of the future depends on theEventSinkused by this gateway.
-
publish
Publishes the giveneventswithin the givencontext. When present, theeventsshould be published as part of thecontext'slifecycle.The
eventsare mapped toEventMessagesbefore they are given to anEventSink.- Parameters:
events- The collection of events to publish.- Returns:
- A
CompletableFutureofVoid. Completion of the future depends on theEventSinkused by this gateway. - See Also:
-