Class ReplyManagerSupport

    • Field Detail

      • log

        protected final org.slf4j.Logger log
      • camelContext

        protected final org.apache.camel.CamelContext camelContext
      • replyTo

        protected javax.jms.Destination replyTo
      • correlation

        protected org.apache.camel.component.sjms.reply.CorrelationTimeoutMap correlation
    • Constructor Detail

      • ReplyManagerSupport

        public ReplyManagerSupport​(org.apache.camel.CamelContext camelContext)
    • Method Detail

      • setOnTimeoutExecutorService

        public void setOnTimeoutExecutorService​(ExecutorService executorService)
        Description copied from interface: ReplyManager
        Sets the thread pool to use for continue routing Exchange when a timeout was triggered when doing request/reply over JMS.
        Specified by:
        setOnTimeoutExecutorService in interface ReplyManager
      • setReplyTo

        public void setReplyTo​(javax.jms.Destination replyTo)
        Description copied from interface: ReplyManager
        Sets the reply to queue the manager should listen for replies.

        The queue is either a temporary or a persistent queue.

        Specified by:
        setReplyTo in interface ReplyManager
      • getReplyTo

        public javax.jms.Destination getReplyTo()
        Description copied from interface: ReplyManager
        Gets the reply to queue being used
        Specified by:
        getReplyTo in interface ReplyManager
      • 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
        Specified by:
        registerReply in interface ReplyManager
        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 - the timeout
        Returns:
        the correlation id used
      • onMessage

        public void onMessage​(javax.jms.Message message,
                              javax.jms.Session session)
                       throws javax.jms.JMSException
        Specified by:
        onMessage in interface SessionMessageListener
        Throws:
        javax.jms.JMSException
      • processReply

        public void processReply​(ReplyHolder holder)
        Description copied from interface: ReplyManager
        Process the reply
        Specified by:
        processReply in interface ReplyManager
        Parameters:
        holder - containing needed data to process the reply and continue routing
      • handleReplyMessage

        protected abstract void handleReplyMessage​(String correlationID,
                                                   javax.jms.Message message,
                                                   javax.jms.Session session)
      • doStart

        protected void doStart()
                        throws Exception
        Overrides:
        doStart in class org.apache.camel.support.service.BaseService
        Throws:
        Exception
      • doStop

        protected void doStop()
                       throws Exception
        Overrides:
        doStop in class org.apache.camel.support.service.BaseService
        Throws:
        Exception