public class MessagingTemplate extends GenericMessagingTemplate
DEFAULT_RECEIVE_TIMEOUT_HEADER, DEFAULT_SEND_TIMEOUT_HEADER
CONVERSION_HINT_HEADER, logger
Constructor and Description |
---|
MessagingTemplate()
Create a MessagingTemplate with no default channel.
|
MessagingTemplate(MessageChannel defaultChannel)
Create a MessagingTemplate with the given default channel.
|
Modifier and Type | Method and Description |
---|---|
Message<?> |
receive(MessageChannel destination,
long timeout) |
Object |
receiveAndConvert(MessageChannel destination,
long timeout) |
Message<?> |
sendAndReceive(MessageChannel destination,
Message<?> requestMessage) |
void |
setBeanFactory(BeanFactory beanFactory)
Overridden to set the destination resolver to a
integrationChannelResolver bean. |
void |
setDefaultChannel(MessageChannel channel)
Invokes
setDefaultDestination(MessageChannel) - provided for
backward compatibility. |
void |
setThrowExceptionOnLateReply(boolean throwExceptionOnLateReply) |
doReceive, doReceive, doSend, doSend, doSendAndReceive, getReceiveTimeout, getReceiveTimeoutHeader, getSendTimeout, getSendTimeoutHeader, setReceiveTimeout, setReceiveTimeoutHeader, setSendTimeout, setSendTimeoutHeader
convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, getDestinationResolver, receive, receiveAndConvert, resolveDestination, send, sendAndReceive, setDestinationResolver
convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, sendAndReceive
doConvert, receive, receive, receiveAndConvert, receiveAndConvert
convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, doConvert, getDefaultDestination, getMessageConverter, getRequiredDefaultDestination, processHeadersToSend, send, send, setDefaultDestination, setMessageConverter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, send, send
receive, receive, receiveAndConvert, receiveAndConvert
convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, sendAndReceive
public MessagingTemplate()
setDefaultChannel(MessageChannel)
.public MessagingTemplate(MessageChannel defaultChannel)
defaultChannel
- the default MessageChannel
for send
operationspublic void setBeanFactory(BeanFactory beanFactory) throws BeansException
integrationChannelResolver
bean.setBeanFactory
in interface BeanFactoryAware
setBeanFactory
in class GenericMessagingTemplate
BeansException
public void setThrowExceptionOnLateReply(boolean throwExceptionOnLateReply)
setThrowExceptionOnLateReply
in class GenericMessagingTemplate
public void setDefaultChannel(MessageChannel channel)
setDefaultDestination(MessageChannel)
- provided for
backward compatibility.channel
- the channel to set.public Message<?> sendAndReceive(MessageChannel destination, Message<?> requestMessage)
sendAndReceive
in interface MessageRequestReplyOperations<MessageChannel>
sendAndReceive
in class AbstractMessagingTemplate<MessageChannel>
public Object receiveAndConvert(MessageChannel destination, long timeout)
public Message<?> receive(MessageChannel destination, long timeout)