Class DefaultErrorGateway
java.lang.Object
io.fluxzero.sdk.common.AbstractNamespaced<ErrorGateway>
io.fluxzero.sdk.publishing.DefaultErrorGateway
- All Implemented Interfaces:
Namespaced<ErrorGateway>, ErrorGateway, HasLocalHandlers
Default implementation of the
ErrorGateway interface.
This class delegates all functionality to an underlying GenericGateway instance, enabling the use of error
gateway methods while leveraging the generic gateway's capabilities.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ErrorGatewaycreateForNamespace(String namespace) forNamespace(String namespace) Returns the resource scoped to the specified namespace.Reports one or more error messages with the given delivery guarantee.Reports an error with the given payload, metadata, and delivery guarantee.Methods inherited from class AbstractNamespaced
closeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ErrorGateway
report, reportMethods inherited from interface HasLocalHandlers
hasLocalHandlers, registerHandler, registerHandler, setSelfHandlerFilterMethods inherited from interface Namespaced
forApplicationNamespace, forDefaultNamespace
-
Constructor Details
-
DefaultErrorGateway
public DefaultErrorGateway()
-
-
Method Details
-
report
Description copied from interface:ErrorGatewayReports an error with the given payload, metadata, and delivery guarantee.Returns a future that completes once the error message is sent or stored based on the provided guarantee.
- Specified by:
reportin interfaceErrorGateway- Parameters:
payload- the error payloadmetadata- metadata describing the context of the errorguarantee- whether to ensure message is sent (Guarantee.SENT) or stored (Guarantee.STORED)- Returns:
- a future that completes once the message has been handled appropriately
-
report
Description copied from interface:ErrorGatewayReports one or more error messages with the given delivery guarantee.This method returns a future and does not block the caller while waiting for publication to complete.
- Specified by:
reportin interfaceErrorGateway- Parameters:
guarantee- whether to ensure messages are sent or storederrors- the error messages to report- Returns:
- a future that completes once the messages have been handled according to the guarantee
-
createForNamespace
- Specified by:
createForNamespacein classAbstractNamespaced<ErrorGateway>
-
forNamespace
Description copied from interface:NamespacedReturns the resource scoped to the specified namespace. Passingnullselects the namespace configured for this application.- Specified by:
forNamespacein interfaceNamespaced<ErrorGateway>- Overrides:
forNamespacein classAbstractNamespaced<ErrorGateway>- Parameters:
namespace- the namespace to which the returned resource is scoped, ornullfor the application namespace- Returns:
- the resource associated with the specified namespace
-