MessageChannel's
to send and receive messages from.
| Modifier and Type | Class and Description |
|---|---|
| private static class | GenericMessagingTemplate.TemporaryReplyChannel
A temporary channel for receiving a single reply message. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | DEFAULT_RECEIVE_TIMEOUT_HEADER
The default header key used for a receive timeout. |
| public static final String | DEFAULT_SEND_TIMEOUT_HEADER
The default header key used for a send timeout. |
| private volatile long | |
| private String | |
| private volatile long | |
| private String | |
| private volatile boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final Message | doReceive(MessageChannel
the target destination channel)Implements abstract org. |
| protected final Message | |
| protected final void | doSend(MessageChannel channel, Message<?> message)
Implements abstract org. |
| protected final void | |
| protected final Message | doSendAndReceive(MessageChannel channel, Message<?> requestMessage)
Implements abstract org. |
| public long | |
| public String | |
| public long | |
| public String | |
| private Long | |
| private long | |
| private long | |
| public void | setBeanFactory(BeanFactory
owning BeanFactory (never beanFactory)null).
The bean can immediately call methods on the factory.Implements org. |
| public void | setReceiveTimeout(long
the receive timeout in milliseconds receiveTimeout)Configure the default timeout value to use for receive operations. |
| public void | setReceiveTimeoutHeader(String receiveTimeoutHeader)
Set the name of the header used to determine the send timeout (if present). |
| public void | setSendTimeout(long
the send timeout in milliseconds sendTimeout)Configure the default timeout value to use for send operations. |
| public void | setSendTimeoutHeader(String sendTimeoutHeader)
Set the name of the header used to determine the send timeout (if present). |
| public void | setThrowExceptionOnLateReply(boolean
whether to throw an exception or not 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. |
| DEFAULT_RECEIVE_TIMEOUT_HEADER | back to summary |
|---|---|
| public static final String DEFAULT_RECEIVE_TIMEOUT_HEADER The default header key used for a receive timeout. | |
| DEFAULT_SEND_TIMEOUT_HEADER | back to summary |
|---|---|
| public static final String DEFAULT_SEND_TIMEOUT_HEADER The default header key used for a send timeout. | |
| receiveTimeout | back to summary |
|---|---|
| private volatile long receiveTimeout | |
| receiveTimeoutHeader | back to summary |
|---|---|
| private String receiveTimeoutHeader | |
| sendTimeout | back to summary |
|---|---|
| private volatile long sendTimeout | |
| sendTimeoutHeader | back to summary |
|---|---|
| private String sendTimeoutHeader | |
| throwExceptionOnLateReply | back to summary |
|---|---|
| private volatile boolean throwExceptionOnLateReply | |
| GenericMessagingTemplate | back to summary |
|---|---|
| public GenericMessagingTemplate() | |
| doReceive | back to summary |
|---|---|
| protected final Message Implements abstract org. Doc from org. Actually receive a message from the given destination.
| |
| doReceive | back to summary |
|---|---|
protected final Message
| |
| doSend | back to summary |
|---|---|
| protected final void doSend(MessageChannel channel, Message<?> message) Implements abstract org.
| |
| doSend | back to summary |
|---|---|
| protected final void doSend(MessageChannel channel, Message<?> message, long timeout) | |
| doSendAndReceive | back to summary |
|---|---|
| protected final Message Implements abstract org. | |
| getReceiveTimeout | back to summary |
|---|---|
| public long getReceiveTimeout() Return the configured receive operation timeout value. | |
| getReceiveTimeoutHeader | back to summary |
|---|---|
| public String getReceiveTimeoutHeader() Return the configured receive-timeout header.
| |
| getSendTimeout | back to summary |
|---|---|
| public long getSendTimeout() Return the configured default send operation timeout value. | |
| getSendTimeoutHeader | back to summary |
|---|---|
| public String getSendTimeoutHeader() Return the configured send-timeout header.
| |
| headerToLong | back to summary |
|---|---|
private Long headerToLong(Object headerValue)
| |
| receiveTimeout | back to summary |
|---|---|
| private long receiveTimeout(Message<?> requestMessage) | |
| sendTimeout | back to summary |
|---|---|
| private long sendTimeout(Message<?> requestMessage) | |
| setBeanFactory | back to summary |
|---|---|
| public void setBeanFactory(BeanFactory beanFactory) throws BeansException Implements org. Doc from org. Callback that supplies the owning factory to a bean instance. Invoked after the population of normal bean properties
but before an initialization callback such as
| |
| setReceiveTimeout | back to summary |
|---|---|
| public void setReceiveTimeout(long receiveTimeout) Configure the default timeout value to use for receive operations. May be overridden for individual messages when using sendAndReceive operations.
| |
| setReceiveTimeoutHeader | back to summary |
|---|---|
| public void setReceiveTimeoutHeader(String receiveTimeoutHeader) Set the name of the header used to determine the send timeout (if present). Default receiveTimeout. The header is removed before sending the message to avoid propagation.
| |
| setSendTimeout | back to summary |
|---|---|
| public void setSendTimeout(long sendTimeout) Configure the default timeout value to use for send operations. May be overridden for individual messages.
| |
| setSendTimeoutHeader | back to summary |
|---|---|
| public void setSendTimeoutHeader(String sendTimeoutHeader) Set the name of the header used to determine the send timeout (if present). Default sendTimeout. The header is removed before sending the message to avoid propagation.
| |
| setThrowExceptionOnLateReply | back to summary |
|---|---|
| public 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. The default value is
| |
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private volatile boolean | |
| private volatile boolean | |
| private final Log | |
| private final CountDownLatch | |
| private volatile Message | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Message | receive()
Implements org. |
| public Message | receive(long
the timeout in milliseconds or timeout)MessageChannel#INDEFINITE_TIMEOUT.Implements org. |
| public boolean | send(Message<?>
the message to send message)Overrides default org. Message to this channel.
|
| public boolean | send(Message<?>
the message to send message, long the timeout in milliseconds or timeout)INDEFINITE_TIMEOUTImplements org. |
| public void |
| hasReceived | back to summary |
|---|---|
| private volatile boolean hasReceived | |
| hasSendFailed | back to summary |
|---|---|
| private volatile boolean hasSendFailed | |
| hasTimedOut | back to summary |
|---|---|
| private volatile boolean hasTimedOut | |
| logger | back to summary |
|---|---|
| private final Log logger | |
| replyLatch | back to summary |
|---|---|
| private final CountDownLatch replyLatch | |
| replyMessage | back to summary |
|---|---|
| private volatile Message<?> replyMessage
| |
| throwExceptionOnLateReply | back to summary |
|---|---|
| private final boolean throwExceptionOnLateReply | |
| TemporaryReplyChannel | back to summary |
|---|---|
| pack-priv TemporaryReplyChannel(boolean throwExceptionOnLateReply) | |
| receive | back to summary |
|---|---|
| public Message Implements org. Doc from org. Receive a message from this channel, blocking indefinitely if necessary. | |
| receive | back to summary |
|---|---|
| public Message Implements org. Doc from org. Receive a message from this channel, blocking until either a message is available or the specified timeout period elapses.
| |
| send | back to summary |
|---|---|
| public boolean send(Message<?> message) Overrides default org. Doc from org. Send a This method may block indefinitely, depending on the implementation.
To provide a maximum wait time, use | |
| send | back to summary |
|---|---|
| public boolean send(Message<?> message, long timeout) Implements org. Doc from org. Send a message, blocking until either the message is accepted or the specified timeout period elapses.
| |
| setSendFailed | back to summary |
|---|---|
| public void setSendFailed(boolean hasSendError) | |