public abstract class AbstractMessageSenderEndpoint extends AbstractMessageEndpoint implements MessageSenderEndpoint
MessageEndpoint endpoint of a Message Channel with support for message translation.
and interception.
| Modifier and Type | Field and Description |
|---|---|
static int |
BATCH_SENDER_TIMEOUT |
| Constructor and Description |
|---|
AbstractMessageSenderEndpoint(java.lang.String channelName,
MessageInterceptorRegistry interceptorRegistry,
MessageTranslator<TextMessage> messageTranslator)
Constructor used to create a new MessageEndpoint.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.util.concurrent.CompletableFuture<java.lang.Void> |
doSend(TextMessage message) |
protected java.util.concurrent.CompletableFuture<java.lang.Void> |
doSendBatch(java.util.stream.Stream<TextMessage> batch) |
EndpointType |
getEndpointType()
|
MessageFormat |
getMessageFormat() |
java.util.concurrent.CompletableFuture<java.lang.Void> |
send(Message<?> message)
Sends a
Message to the message channel. |
java.util.concurrent.CompletableFuture<java.lang.Void> |
sendBatch(java.util.stream.Stream<? extends Message<?>> batch)
Sends a stream of messages to the message channel as one or more batches, if
batches are supported by the infrastructure.
|
getChannelName, getInterceptorChain, interceptclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChannelName, getInterceptorChain, interceptpublic static final int BATCH_SENDER_TIMEOUT
public AbstractMessageSenderEndpoint(@Nonnull
java.lang.String channelName,
@Nonnull
MessageInterceptorRegistry interceptorRegistry,
@Nonnull
MessageTranslator<TextMessage> messageTranslator)
channelName - the name of the underlying channel / stream / queue / message log.interceptorRegistry - registry used to determine message interceptors for this
endpoint.messageTranslator - the MessageTranslator used to translate message payloads as expected by the
consumers.public final java.util.concurrent.CompletableFuture<java.lang.Void> send(@Nonnull
Message<?> message)
Message to the message channel.send in interface MessageSendermessage - the message to sendpublic final java.util.concurrent.CompletableFuture<java.lang.Void> sendBatch(@Nonnull
java.util.stream.Stream<? extends Message<?>> batch)
sendBatch in interface MessageSenderbatch - 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<TextMessage> batch)
protected abstract java.util.concurrent.CompletableFuture<java.lang.Void> doSend(@Nonnull
TextMessage message)
public MessageFormat getMessageFormat()