public class GenericMessagingTemplate extends AbstractDestinationResolvingMessagingTemplate<MessageChannel> implements org.springframework.beans.factory.BeanFactoryAware
MessageChannel
's
to send and receive messages from.logger
Constructor and Description |
---|
GenericMessagingTemplate() |
Modifier and Type | Method and Description |
---|---|
protected Message<?> |
doReceive(MessageChannel channel) |
protected void |
doSend(MessageChannel channel,
Message<?> message) |
protected Message<?> |
doSendAndReceive(MessageChannel channel,
Message<?> requestMessage) |
long |
getReceiveTimeout()
Return the configured receive operation timeout value.
|
long |
getSendTimeout()
Return the configured send operation timeout value.
|
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setReceiveTimeout(long receiveTimeout)
Configure the timeout value to use for receive operations.
|
void |
setSendTimeout(long sendTimeout)
Configure the timeout value to use for send operations.
|
void |
setThrowExceptionOnLateReply(boolean 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.
|
convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, getDestinationResolver, receive, receiveAndConvert, resolveDestination, send, sendAndReceive, setDestinationResolver
convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, receive, receive, receiveAndConvert, receiveAndConvert, sendAndReceive, sendAndReceive
convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, getDefaultDestination, getMessageConverter, getRequiredDefaultDestination, 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, sendAndReceive
public void setSendTimeout(long sendTimeout)
sendTimeout
- the send timeout in millisecondspublic long getSendTimeout()
public void setReceiveTimeout(long receiveTimeout)
receiveTimeout
- the receive timeout in millisecondspublic long getReceiveTimeout()
public void setThrowExceptionOnLateReply(boolean throwExceptionOnLateReply)
The default value is false
in which case only a WARN message is logged.
If set to true
a MessageDeliveryException
is raised in addition
to the log message.
throwExceptionOnLateReply
- whether to throw an exception or notpublic void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
org.springframework.beans.BeansException
protected final void doSend(MessageChannel channel, Message<?> message)
doSend
in class AbstractMessageSendingTemplate<MessageChannel>
protected final Message<?> doReceive(MessageChannel channel)
doReceive
in class AbstractMessagingTemplate<MessageChannel>
protected final Message<?> doSendAndReceive(MessageChannel channel, Message<?> requestMessage)
doSendAndReceive
in class AbstractMessagingTemplate<MessageChannel>