Class DefaultGenericGateway
java.lang.Object
io.fluxzero.sdk.common.AbstractNamespaced<GenericGateway>
io.fluxzero.sdk.publishing.DefaultGenericGateway
- All Implemented Interfaces:
Namespaced<GenericGateway>, GenericGateway, HasLocalHandlers
public class DefaultGenericGateway
extends AbstractNamespaced<GenericGateway>
implements GenericGateway
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this gateway and releases any underlying resources.protected GenericGatewaycreateForNamespace(String namespace) protected CompletableFuture<Message> sendAndForget(Guarantee guarantee, Message... messages) Sends multipleMessageobjects with a guarantee.sendAndForget(Guarantee guarantee, UnaryOperator<SerializedMessage> interceptor, Message... messages) Sends multipleMessageobjects with a guarantee.sendForMessages(Message... messages) Sends multiple messages and returns futures for their fullMessageresponses.setRetentionTime(Duration duration, Guarantee guarantee) Set a new retention duration for the underlying gateway's message log.Methods inherited from class AbstractNamespaced
forNamespaceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GenericGateway
send, send, send, send, send, send, sendAndForget, sendAndForget, sendAndForget, sendAndForget, sendAndForget, sendAndForget, sendAndWait, sendAndWait, sendAndWait, sendAndWait, sendAndWait, sendForMessage, setRetentionTimeMethods inherited from interface HasLocalHandlers
hasLocalHandlers, registerHandler, registerHandler, setSelfHandlerFilterMethods inherited from interface Namespaced
forDefaultNamespace, forNamespace
-
Constructor Details
-
DefaultGenericGateway
public DefaultGenericGateway()
-
-
Method Details
-
createForNamespace
- Specified by:
createForNamespacein classAbstractNamespaced<GenericGateway>
-
sendAndForget
Description copied from interface:GenericGatewaySends multipleMessageobjects with a guarantee.- Specified by:
sendAndForgetin interfaceGenericGateway
-
sendAndForget
public CompletableFuture<Void> sendAndForget(Guarantee guarantee, UnaryOperator<SerializedMessage> interceptor, Message... messages) Description copied from interface:GenericGatewaySends multipleMessageobjects with a guarantee.Before the messages are appended to the message log in Fluxzero, they can be inspected, blocked or modified using the given interceptor.
- Specified by:
sendAndForgetin interfaceGenericGateway
-
sendForMessages
Description copied from interface:GenericGatewaySends multiple messages and returns futures for their fullMessageresponses.- Specified by:
sendForMessagesin interfaceGenericGateway
-
setRetentionTime
Description copied from interface:GenericGatewaySet a new retention duration for the underlying gateway's message log.The retention setting determines how long messages in this log are retained by the system, after which they may be evicted or deleted depending on the platform policy.
- Specified by:
setRetentionTimein interfaceGenericGateway- Parameters:
duration- the new retention durationguarantee- the delivery guarantee to apply to the update operation- Returns:
- a
CompletableFuturethat completes once the retention setting is updated
-
emptyReturnMessage
-
close
public void close()Description copied from interface:GenericGatewayCloses this gateway and releases any underlying resources.- Specified by:
closein interfaceGenericGateway- Overrides:
closein classAbstractNamespaced<GenericGateway>
-