org.apache.camel.component.jms.reply
Class QueueReplyManager
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.component.jms.reply.ReplyManagerSupport
org.apache.camel.component.jms.reply.QueueReplyManager
- All Implemented Interfaces:
- javax.jms.MessageListener, ReplyManager, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
public class QueueReplyManager
- extends ReplyManagerSupport
A ReplyManager
when using regular queues.
- Version:
Fields inherited from class org.apache.camel.support.ServiceSupport |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Method Summary |
protected org.springframework.jms.listener.AbstractMessageListenerContainer |
createListenerContainer()
|
protected void |
handleReplyMessage(String correlationID,
javax.jms.Message message)
|
String |
registerReply(ReplyManager replyManager,
org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback,
String originalCorrelationId,
String correlationId,
long requestTimeout)
Register a reply |
void |
setReplyToSelectorHeader(org.apache.camel.Message camelMessage,
javax.jms.Message jmsMessage)
To be used when a reply queue is used with a custom JMS selector is being used. |
void |
updateCorrelationId(String correlationId,
String newCorrelationId,
long requestTimeout)
Updates the correlation id to the new correlation id. |
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueueReplyManager
public QueueReplyManager(org.apache.camel.CamelContext camelContext)
registerReply
public String registerReply(ReplyManager replyManager,
org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback,
String originalCorrelationId,
String correlationId,
long requestTimeout)
- Description copied from interface:
ReplyManager
- Register a reply
- Parameters:
replyManager
- the reply manager being usedexchange
- the exchangecallback
- the callbackoriginalCorrelationId
- an optional original correlation idcorrelationId
- the correlation id to expect being usedrequestTimeout
- an optional timeout
- Returns:
- the correlation id used
updateCorrelationId
public void updateCorrelationId(String correlationId,
String newCorrelationId,
long requestTimeout)
- Description copied from interface:
ReplyManager
- Updates the correlation id to the new correlation id.
This is only used when useMessageIDasCorrelationID option is used, which means a
provisional correlation id is first used, then after the message has been sent, the real
correlation id is known. This allows us then to update the internal mapping to expect the
real correlation id.
- Parameters:
correlationId
- the provisional correlation idnewCorrelationId
- the real correlation idrequestTimeout
- an optional timeout
handleReplyMessage
protected void handleReplyMessage(String correlationID,
javax.jms.Message message)
- Specified by:
handleReplyMessage
in class ReplyManagerSupport
setReplyToSelectorHeader
public void setReplyToSelectorHeader(org.apache.camel.Message camelMessage,
javax.jms.Message jmsMessage)
throws javax.jms.JMSException
- Description copied from interface:
ReplyManager
- To be used when a reply queue is used with a custom JMS selector is being used.
- Throws:
javax.jms.JMSException
createListenerContainer
protected org.springframework.jms.listener.AbstractMessageListenerContainer createListenerContainer()
throws Exception
- Specified by:
createListenerContainer
in class ReplyManagerSupport
- Throws:
Exception
Apache Camel