public abstract class ReplyManagerSupport extends org.apache.camel.support.service.ServiceSupport implements ReplyManager
ReplyManager implementations.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.camel.CamelContext |
camelContext |
protected org.apache.camel.component.jms.reply.CorrelationTimeoutMap |
correlation |
protected String |
correlationProperty |
protected JmsEndpoint |
endpoint |
protected ExecutorService |
executorService |
protected org.springframework.jms.listener.AbstractMessageListenerContainer |
listenerContainer |
protected org.slf4j.Logger |
log |
protected javax.jms.Destination |
replyTo |
protected CountDownLatch |
replyToLatch |
protected long |
replyToTimeout |
protected ScheduledExecutorService |
scheduledExecutorService |
| Constructor and Description |
|---|
ReplyManagerSupport(org.apache.camel.CamelContext camelContext) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract org.springframework.jms.listener.AbstractMessageListenerContainer |
createListenerContainer() |
protected abstract ReplyHandler |
createReplyHandler(ReplyManager replyManager,
org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback,
String originalCorrelationId,
String correlationId,
long requestTimeout) |
protected void |
doStart() |
protected void |
doStop() |
javax.jms.Destination |
getReplyTo()
Gets the reply to queue being used
|
protected abstract void |
handleReplyMessage(String correlationID,
javax.jms.Message message,
javax.jms.Session session) |
void |
onMessage(javax.jms.Message message,
javax.jms.Session session) |
void |
processReply(ReplyHolder holder)
Process the reply
|
String |
registerReply(ReplyManager replyManager,
org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback,
String originalCorrelationId,
String correlationId,
long requestTimeout)
Register a reply
|
void |
setCorrelationProperty(String correlationProperty)
Sets the JMS message property used for message correlation.
|
void |
setEndpoint(JmsEndpoint endpoint)
Sets the belonging
JmsEndpoint. |
void |
setOnTimeoutExecutorService(ExecutorService executorService)
Sets the thread pool to use for continue routing
Exchange 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 |
setScheduledExecutorService(ScheduledExecutorService executorService)
Sets the scheduled thread pool to use when checking for timeouts (no reply received within a given time period)
|
protected ReplyHandler |
waitForProvisionCorrelationToBeUpdated(String correlationID,
javax.jms.Message message)
IMPORTANT: This logic is only being used due to high performance in-memory only testing using InOut over
JMS.
|
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetReplyToSelectorHeader, updateCorrelationIdprotected final org.slf4j.Logger log
protected final org.apache.camel.CamelContext camelContext
protected ScheduledExecutorService scheduledExecutorService
protected ExecutorService executorService
protected JmsEndpoint endpoint
protected javax.jms.Destination replyTo
protected org.springframework.jms.listener.AbstractMessageListenerContainer listenerContainer
protected final CountDownLatch replyToLatch
protected final long replyToTimeout
protected org.apache.camel.component.jms.reply.CorrelationTimeoutMap correlation
protected String correlationProperty
public ReplyManagerSupport(org.apache.camel.CamelContext camelContext)
public void setScheduledExecutorService(ScheduledExecutorService executorService)
ReplyManagersetScheduledExecutorService in interface ReplyManagerpublic void setOnTimeoutExecutorService(ExecutorService executorService)
ReplyManagerExchange when a timeout was triggered when doing
request/reply over JMS.setOnTimeoutExecutorService in interface ReplyManagerpublic void setEndpoint(JmsEndpoint endpoint)
ReplyManagerJmsEndpoint.setEndpoint in interface ReplyManagerpublic void setReplyTo(javax.jms.Destination replyTo)
ReplyManagersetReplyTo in interface ReplyManagerpublic void setCorrelationProperty(String correlationProperty)
ReplyManagersetCorrelationProperty in interface ReplyManagerpublic javax.jms.Destination getReplyTo()
ReplyManagergetReplyTo in interface ReplyManagerpublic String registerReply(ReplyManager replyManager, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback, String originalCorrelationId, String correlationId, long requestTimeout)
ReplyManagerregisterReply in interface ReplyManagerreplyManager - the reply manager being usedexchange - the exchangecallback - the callbackoriginalCorrelationId - an optional original correlation idcorrelationId - the correlation id to expect being usedrequestTimeout - the timeoutprotected abstract ReplyHandler createReplyHandler(ReplyManager replyManager, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback, String originalCorrelationId, String correlationId, long requestTimeout)
public void onMessage(javax.jms.Message message,
javax.jms.Session session)
throws javax.jms.JMSException
onMessage in interface org.springframework.jms.listener.SessionAwareMessageListenerjavax.jms.JMSExceptionpublic void processReply(ReplyHolder holder)
ReplyManagerprocessReply in interface ReplyManagerholder - containing needed data to process the reply and continue routingprotected abstract void handleReplyMessage(String correlationID, javax.jms.Message message, javax.jms.Session session)
protected abstract org.springframework.jms.listener.AbstractMessageListenerContainer createListenerContainer()
throws Exception
Exceptionprotected ReplyHandler waitForProvisionCorrelationToBeUpdated(String correlationID, javax.jms.Message message)
protected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.BaseServiceExceptionApache Camel