public abstract class AbstractMessageSenderEndpoint extends AbstractMessageEndpoint implements MessageSenderEndpoint
MessageEndpoint endpoint of a Message Channel with support for message translation.
and interception.
| Constructor and Description |
|---|
AbstractMessageSenderEndpoint(java.lang.String channelName,
MessageTranslator<java.lang.String> messageTranslator)
Constructor used to create a new MessageEndpoint.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.util.concurrent.CompletableFuture<java.lang.Void> |
doSend(Message<java.lang.String> message) |
protected java.util.concurrent.CompletableFuture<java.lang.Void> |
doSendBatch(java.util.stream.Stream<Message<java.lang.String>> batch) |
EndpointType |
getEndpointType()
|
<T> java.util.concurrent.CompletableFuture<java.lang.Void> |
send(Message<T> message)
Sends a
Message to the message channel. |
<T> java.util.concurrent.CompletableFuture<java.lang.Void> |
sendBatch(java.util.stream.Stream<Message<T>> batch)
Sends a stream of messages to the message channel as one or more batches, if
batches are supported by the infrastructure.
|
getChannelName, getInterceptorChain, intercept, registerInterceptorsFromclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChannelName, getInterceptorChain, intercept, registerInterceptorsFrompublic AbstractMessageSenderEndpoint(java.lang.String channelName,
MessageTranslator<java.lang.String> messageTranslator)
channelName - the name of the underlying channel / stream / queue / message log.messageTranslator - the MessageTranslator used to translate message payloads as expected by the
consumers.public final <T> java.util.concurrent.CompletableFuture<java.lang.Void> send(@Nonnull
Message<T> message)
Message to the message channel.send in interface MessageSenderEndpointT - type of the message's payloadmessage - the message to sendpublic final <T> java.util.concurrent.CompletableFuture<java.lang.Void> sendBatch(@Nonnull
java.util.stream.Stream<Message<T>> batch)
sendBatch in interface MessageSenderEndpointT - the type of the message payloadbatch - a stream of messages that is sent in batched mode, if supported@Nonnull public final EndpointType getEndpointType()
MessageEndpointgetEndpointType in interface MessageEndpointprotected java.util.concurrent.CompletableFuture<java.lang.Void> doSendBatch(@Nonnull
java.util.stream.Stream<Message<java.lang.String>> batch)
protected abstract java.util.concurrent.CompletableFuture<java.lang.Void> doSend(@Nonnull
Message<java.lang.String> message)