org.springframework.integration.handler
Class ReplyMessageCorrelator
java.lang.Object
org.springframework.integration.handler.ReplyMessageCorrelator
- All Implemented Interfaces:
- MessageHandler
public class ReplyMessageCorrelator
- extends java.lang.Object
- implements MessageHandler
A handler for receiving messages from a "reply channel". Any component that
is expecting a reply message can poll by providing the correlation identifier.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultTimeout
private volatile long defaultTimeout
messageStore
private final RetrievalBlockingMessageStore messageStore
ReplyMessageCorrelator
public ReplyMessageCorrelator(int capacity)
setDefaultTimeout
public void setDefaultTimeout(long defaultTimeout)
handle
public Message<?> handle(Message<?> message)
- Specified by:
handle
in interface MessageHandler
getReply
public Message<?> getReply(java.lang.Object correlationId)
getReply
public Message<?> getReply(java.lang.Object correlationId,
long timeout)
getCorrelationId
protected java.lang.Object getCorrelationId(Message<?> message)
- Retrieve the correlation identifier from the provided message.
This method may be overridden by subclasses. The default implementation
returns the 'correlationId' from the message header.