GenericMessagingTemplate

A messaging template that resolves destinations names to {@link MessageChannel}'s to send and receive messages from.

@author Mark Fisher @author Rossen Stoyanchev @author Gary Russell @since 4.0

Members

Functions

doReceive
Message!(T) doReceive(MessageChannel channel)
Undocumented in source. Be warned that the author may not have intended to support it.
doReceive
Message!(T) doReceive(MessageChannel channel, long timeout)
Undocumented in source. Be warned that the author may not have intended to support it.
doSend
void doSend(MessageChannel channel, MessageBase message)
Undocumented in source. Be warned that the author may not have intended to support it.
doSend
void doSend(MessageChannel channel, MessageBase message, long timeout)
Undocumented in source. Be warned that the author may not have intended to support it.
doSendAndReceive
Message!(T) doSendAndReceive(MessageChannel channel, Message!(T) requestMessage)
Undocumented in source. Be warned that the author may not have intended to support it.
getReceiveTimeout
long getReceiveTimeout()

Return the configured receive operation timeout value.

getReceiveTimeoutHeader
string getReceiveTimeoutHeader()

Return the configured receive-timeout header. @since 5.0

getSendTimeout
long getSendTimeout()

Return the configured default send operation timeout value.

getSendTimeoutHeader
string getSendTimeoutHeader()

Return the configured send-timeout header. @since 5.0

setBeanFactory
void setBeanFactory(BeanFactory beanFactory)
Undocumented in source. Be warned that the author may not have intended to support it.
setReceiveTimeout
void setReceiveTimeout(long receiveTimeout)

Configure the default timeout value to use for receive operations. May be overridden for individual messages when using sendAndReceive operations. @param receiveTimeout the receive timeout in milliseconds @see #setReceiveTimeoutHeader(string)

setReceiveTimeoutHeader
void setReceiveTimeoutHeader(string receiveTimeoutHeader)

Set the name of the header used to determine the send timeout (if present). Default {@value #DEFAULT_RECEIVE_TIMEOUT_HEADER}. The header is removed before sending the message to avoid propagation. @since 5.0

setSendTimeout
void setSendTimeout(long sendTimeout)

Configure the default timeout value to use for send operations. May be overridden for individual messages. @param sendTimeout the send timeout in milliseconds @see #setSendTimeoutHeader(string)

setSendTimeoutHeader
void setSendTimeoutHeader(string sendTimeoutHeader)

Set the name of the header used to determine the send timeout (if present). Default {@value #DEFAULT_SEND_TIMEOUT_HEADER}. <p>The header is removed before sending the message to avoid propagation. @since 5.0

setThrowExceptionOnLateReply
void setThrowExceptionOnLateReply(bool throwExceptionOnLateReply)

Whether the thread sending a reply should have an exception raised if the receiving thread isn't going to receive the reply either because it timed out, or because it already received a reply, or because it got an exception while sending the request message. <p>The default value is {@code false} in which case only a WARN message is logged. If set to {@code true} a {@link MessageDeliveryException} is raised in addition to the log message. @param throwExceptionOnLateReply whether to throw an exception or not

Variables

DEFAULT_RECEIVE_TIMEOUT_HEADER
enum string DEFAULT_RECEIVE_TIMEOUT_HEADER;

The default header key used for a receive timeout.

DEFAULT_SEND_TIMEOUT_HEADER
enum string DEFAULT_SEND_TIMEOUT_HEADER;

The default header key used for a send timeout.

Meta