public abstract class MessageSenderEndpoint extends MessageEndpoint
MessageEndpoint endpoint of a Message Channel with support for message translation.
and interception.
| Constructor and Description |
|---|
MessageSenderEndpoint(java.lang.String channelName,
MessageTranslator<java.lang.String> messageTranslator)
Constructor used to create a new MessageEndpoint.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doSend(Message<java.lang.String> message) |
protected void |
doSendBatch(java.util.stream.Stream<Message<java.lang.String>> batch) |
protected EndpointType |
getEndpointType() |
<T> void |
send(Message<T> message)
Sends a
Message to the message channel. |
<T> 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, registerInterceptorsFrompublic MessageSenderEndpoint(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> void send(Message<T> message)
Message to the message channel.T - type of the message's payloadmessage - the message to sendpublic final <T> void sendBatch(java.util.stream.Stream<Message<T>> batch)
T - the type of the message payloadbatch - a stream of messages that is sent in batched mode, if supportedprotected final EndpointType getEndpointType()
getEndpointType in class MessageEndpointprotected void doSendBatch(@Nonnull
java.util.stream.Stream<Message<java.lang.String>> batch)
protected abstract void doSend(@Nonnull
Message<java.lang.String> message)