Class DefaultErrorGateway
java.lang.Object
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 TypeMethodDescriptionReturns the resource scoped to the default namespace.forNamespace(String namespace) Creates and 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 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, setSelfHandlerFilter
-
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
-
forDefaultNamespace
Description copied from interface:NamespacedReturns the resource scoped to the default namespace.- Specified by:
forDefaultNamespacein interfaceNamespaced<ErrorGateway>- 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<ErrorGateway>- Parameters:
namespace- the namespace to which the returned resource is scoped- Returns:
- the resource associated with the specified namespace
-