org.apache.camel.component.jms.reply
Class TemporaryQueueReplyManager

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.component.jms.reply.ReplyManagerSupport
          extended by org.apache.camel.component.jms.reply.TemporaryQueueReplyManager
All Implemented Interfaces:
MessageListener, ReplyManager, Service, ShutdownableService

public class TemporaryQueueReplyManager
extends ReplyManagerSupport

A ReplyManager when using temporary queues.

Version:
$Revision: 21895 $

Field Summary
 
Fields inherited from class org.apache.camel.component.jms.reply.ReplyManagerSupport
correlation, endpoint, executorService, listenerContainer, log, replyTo, replyToResolverTimeout
 
Constructor Summary
TemporaryQueueReplyManager()
           
 
Method Summary
protected  AbstractMessageListenerContainer createListenerContainer()
           
protected  void handleReplyMessage(String correlationID, Message message)
           
 String registerReply(ReplyManager replyManager, Exchange exchange, AsyncCallback callback, String originalCorrelationId, String correlationId, long requestTimeout)
          Register a reply
 void setReplyToSelectorHeader(Message camelMessage, Message jmsMessage)
          To be used when a persistent 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.component.jms.reply.ReplyManagerSupport
doStart, doStop, getReplyTo, onMessage, processReply, setEndpoint, setReplyTo, setScheduledExecutorService, waitForProvisionCorrelationToBeUpdated
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemporaryQueueReplyManager

public TemporaryQueueReplyManager()
Method Detail

registerReply

public String registerReply(ReplyManager replyManager,
                            Exchange exchange,
                            AsyncCallback callback,
                            String originalCorrelationId,
                            String correlationId,
                            long requestTimeout)
Description copied from interface: ReplyManager
Register a reply

Parameters:
replyManager - the reply manager being used
exchange - the exchange
callback - the callback
originalCorrelationId - an optional original correlation id
correlationId - the correlation id to expect being used
requestTimeout - 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 id
newCorrelationId - the real correlation id
requestTimeout - an optional timeout

handleReplyMessage

protected void handleReplyMessage(String correlationID,
                                  Message message)
Specified by:
handleReplyMessage in class ReplyManagerSupport

setReplyToSelectorHeader

public void setReplyToSelectorHeader(Message camelMessage,
                                     Message jmsMessage)
                              throws JMSException
Description copied from interface: ReplyManager
To be used when a persistent reply queue is used with a custom JMS selector is being used.

Throws:
JMSException

createListenerContainer

protected AbstractMessageListenerContainer createListenerContainer()
                                                            throws Exception
Specified by:
createListenerContainer in class ReplyManagerSupport
Throws:
Exception


Apache CAMEL