Interface ReplyManager
-
- All Superinterfaces:
org.springframework.jms.listener.SessionAwareMessageListener
- All Known Implementing Classes:
QueueReplyManager
,ReplyManagerSupport
,TemporaryQueueReplyManager
public interface ReplyManager extends org.springframework.jms.listener.SessionAwareMessageListener
TheReplyManager
is responsible for handling request-reply over JMS.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.jms.Destination
getReplyTo()
Gets the reply to queue being usedvoid
processReply(ReplyHolder holder)
Process the replyString
registerReply(ReplyManager replyManager, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback, String originalCorrelationId, String correlationId, long requestTimeout)
Register a replyvoid
setCorrelationProperty(String correlationProperty)
Sets the JMS message property used for message correlation.void
setEndpoint(JmsEndpoint endpoint)
Sets the belongingJmsEndpoint
.void
setOnTimeoutExecutorService(ExecutorService executorService)
Sets the thread pool to use for continue routingExchange
when a timeout was triggered when doing request/reply over JMS.void
setReplyTo(javax.jms.Destination replyTo)
Sets the reply to queue the manager should listen for replies.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
setScheduledExecutorService(ScheduledExecutorService executorService)
Sets the scheduled thread pool to use when checking for timeouts (no reply received within a given time period)void
updateCorrelationId(String correlationId, String newCorrelationId, long requestTimeout)
Updates the correlation id to the new correlation id.
-
-
-
Method Detail
-
setEndpoint
void setEndpoint(JmsEndpoint endpoint)
Sets the belongingJmsEndpoint
.
-
setReplyTo
void setReplyTo(javax.jms.Destination replyTo)
Sets the reply to queue the manager should listen for replies. The queue is either a temporary or a persistent queue.
-
setScheduledExecutorService
void setScheduledExecutorService(ScheduledExecutorService executorService)
Sets the scheduled thread pool to use when checking for timeouts (no reply received within a given time period)
-
setOnTimeoutExecutorService
void setOnTimeoutExecutorService(ExecutorService executorService)
Sets the thread pool to use for continue routingExchange
when a timeout was triggered when doing request/reply over JMS.
-
setCorrelationProperty
void setCorrelationProperty(String correlationProperty)
Sets the JMS message property used for message correlation. If set message correlation will be performed on the value of this JMS property, JMSCorrelationID will be ignored.
-
getReplyTo
javax.jms.Destination getReplyTo()
Gets the reply to queue being used
-
setReplyToSelectorHeader
void setReplyToSelectorHeader(org.apache.camel.Message camelMessage, javax.jms.Message jmsMessage) throws javax.jms.JMSException
To be used when a reply queue is used with a custom JMS selector is being used.- Throws:
javax.jms.JMSException
-
registerReply
String registerReply(ReplyManager replyManager, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback, String originalCorrelationId, String correlationId, long requestTimeout)
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
- the timeout- Returns:
- the correlation id used
-
updateCorrelationId
void updateCorrelationId(String correlationId, String newCorrelationId, long requestTimeout)
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
- the timeout
-
processReply
void processReply(ReplyHolder holder)
Process the reply- Parameters:
holder
- containing needed data to process the reply and continue routing
-
-