Class DefaultEventGateway
java.lang.Object
io.fluxzero.sdk.publishing.DefaultEventGateway
- All Implemented Interfaces:
Namespaced<EventGateway>, EventGateway, HasLocalHandlers
Default implementation of the
EventGateway interface.
This class delegates all functionality to an underlying GenericGateway instance, enabling the use of event
gateway methods while leveraging the generic gateway's capabilities.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the resource scoped to the default namespace.forNamespace(String namespace) Creates and returns the resource scoped to the specified namespace.Publishes one or more event messages with a specific delivery guarantee.Publishes the givenMessageto Fluxzero and/or local handlers.voidPublishes one or more event messages.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EventGateway
publish, publishMethods inherited from interface HasLocalHandlers
hasLocalHandlers, registerHandler, registerHandler, setSelfHandlerFilter
-
Constructor Details
-
DefaultEventGateway
public DefaultEventGateway()
-
-
Method Details
-
publish
Description copied from interface:EventGatewayPublishes the givenMessageto Fluxzero and/or local handlers. Returns a future that completes when the message has been fully processed or stored according to the givenGuarantee.- Specified by:
publishin interfaceEventGateway- Parameters:
message- the message to publishguarantee- the level of delivery guarantee to apply (e.g., store-before-acknowledge)- Returns:
- a future that completes when the message has been handled
-
publish
Description copied from interface:EventGatewayPublishes one or more event messages. Each message may be a raw payload or aMessageinstance. Events are published with no delivery guarantee.This method does not block for completion or acknowledgments.
- Specified by:
publishin interfaceEventGateway- Parameters:
messages- the events to publish
-
publish
Description copied from interface:EventGatewayPublishes one or more event messages with a specific delivery guarantee. Each message may be a raw payload or aMessageinstance.Returns a future that completes when the messages have been handled or stored according to the specified
Guarantee.- Specified by:
publishin interfaceEventGateway- Parameters:
guarantee- the delivery guarantee (e.g.,Guarantee.STORED)messages- the events to publish- Returns:
- a future that completes upon publishing
-
forDefaultNamespace
Description copied from interface:NamespacedReturns the resource scoped to the default namespace.- Specified by:
forDefaultNamespacein interfaceNamespaced<EventGateway>- Returns:
- the resource which is associated with the default namespace
-
forNamespace
Description copied from interface:NamespacedCreates and returns the resource scoped to the specified namespace.- Specified by:
forNamespacein interfaceNamespaced<EventGateway>- Parameters:
namespace- the namespace to which the returned resource is scoped- Returns:
- the resource associated with the specified namespace
-