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.sjms.reply.CorrelationTimeoutMap |
correlation |
protected SjmsEndpoint |
endpoint |
protected ExecutorService |
executorService |
protected MessageListenerContainer |
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 MessageListenerContainer |
createListenerContainer() |
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 |
setEndpoint(SjmsEndpoint endpoint)
Sets the belonging
SjmsEndpoint. |
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)
|
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, waitupdateCorrelationIdprotected final org.slf4j.Logger log
protected final org.apache.camel.CamelContext camelContext
protected ScheduledExecutorService scheduledExecutorService
protected ExecutorService executorService
protected SjmsEndpoint endpoint
protected javax.jms.Destination replyTo
protected MessageListenerContainer listenerContainer
protected final CountDownLatch replyToLatch
protected final long replyToTimeout
protected org.apache.camel.component.sjms.reply.CorrelationTimeoutMap correlation
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(SjmsEndpoint endpoint)
ReplyManagerSjmsEndpoint.setEndpoint in interface ReplyManagerpublic void setReplyTo(javax.jms.Destination replyTo)
ReplyManagersetReplyTo 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 timeoutpublic void onMessage(javax.jms.Message message,
javax.jms.Session session)
throws javax.jms.JMSException
onMessage in interface SessionMessageListenerjavax.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 MessageListenerContainer createListenerContainer() throws Exception
Exceptionprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.BaseServiceExceptionApache Camel