Class DefaultEventGateway
java.lang.Object
io.fluxzero.sdk.common.AbstractNamespaced<EventGateway>
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 TypeMethodDescriptionprotected EventGatewaycreateForNamespace(String namespace) forNamespace(String namespace) 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 AbstractNamespaced
closeMethods 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, setSelfHandlerFilterMethods inherited from interface Namespaced
forApplicationNamespace, forDefaultNamespace
-
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
-
createForNamespace
- Specified by:
createForNamespacein classAbstractNamespaced<EventGateway>
-
forNamespace
Description copied from interface:NamespacedReturns the resource scoped to the specified namespace. Passingnullselects the namespace configured for this application.- Specified by:
forNamespacein interfaceNamespaced<EventGateway>- Overrides:
forNamespacein classAbstractNamespaced<EventGateway>- Parameters:
namespace- the namespace to which the returned resource is scoped, ornullfor the application namespace- Returns:
- the resource associated with the specified namespace
-