Class SimpleMessageListenerContainer
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.sjms.consumer.SimpleMessageListenerContainer
- All Implemented Interfaces:
jakarta.jms.ExceptionListener,AutoCloseable,org.apache.camel.AfterPropertiesConfigured,MessageListenerContainer,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
- Direct Known Subclasses:
ExclusiveQueueMessageListenerContainer,TemporaryQueueMessageListenerContainer
public class SimpleMessageListenerContainer
extends org.apache.camel.support.service.ServiceSupport
implements MessageListenerContainer, jakarta.jms.ExceptionListener
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterPropertiesConfigured(org.apache.camel.CamelContext camelContext) protected voidconfigureConsumer(jakarta.jms.MessageConsumer consumer, jakarta.jms.Session session) protected voidprotected jakarta.jms.MessageConsumercreateMessageConsumer(jakarta.jms.Session session) protected jakarta.jms.SessioncreateSession(jakarta.jms.Connection connection, SjmsEndpoint endpoint) protected voiddoStart()protected voiddoStop()intjakarta.jms.ConnectionFactoryprotected voidvoidonException(jakarta.jms.JMSException exception) protected booleanrecoverConnection(org.apache.camel.util.backoff.BackOffTimer.Task task) protected final voidprotected voidvoidsetClientId(String clientId) voidsetConcurrentConsumers(int concurrentConsumers) voidsetDestinationCreationStrategy(DestinationCreationStrategy destinationCreationStrategy) voidsetDestinationName(String destinationName) voidsetExceptionListener(jakarta.jms.ExceptionListener exceptionListener) voidsetMessageListener(SessionMessageListener messageListener) protected voidprotected voidprotected voidMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
SimpleMessageListenerContainer
-
-
Method Details
-
getEndpoint
-
setMessageListener
- Specified by:
setMessageListenerin interfaceMessageListenerContainer
-
setExceptionListener
public void setExceptionListener(jakarta.jms.ExceptionListener exceptionListener) - Specified by:
setExceptionListenerin interfaceMessageListenerContainer
-
getClientId
-
setClientId
-
getDestinationName
-
setDestinationName
-
getDestinationCreationStrategy
-
setDestinationCreationStrategy
-
getConcurrentConsumers
public int getConcurrentConsumers() -
setConcurrentConsumers
public void setConcurrentConsumers(int concurrentConsumers) -
afterPropertiesConfigured
public void afterPropertiesConfigured(org.apache.camel.CamelContext camelContext) - Specified by:
afterPropertiesConfiguredin interfaceorg.apache.camel.AfterPropertiesConfigured
-
getConnectionFactory
public jakarta.jms.ConnectionFactory getConnectionFactory()- Specified by:
getConnectionFactoryin interfaceMessageListenerContainer
-
configureConsumer
protected void configureConsumer(jakarta.jms.MessageConsumer consumer, jakarta.jms.Session session) throws Exception - Throws:
Exception
-
onException
public void onException(jakarta.jms.JMSException exception) - Specified by:
onExceptionin interfacejakarta.jms.ExceptionListener
-
recoverConnection
protected boolean recoverConnection(org.apache.camel.util.backoff.BackOffTimer.Task task) throws Exception - Throws:
Exception
-
scheduleConnectionRecovery
protected void scheduleConnectionRecovery() -
doStart
- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
initConsumers
- Throws:
Exception
-
createSession
protected jakarta.jms.Session createSession(jakarta.jms.Connection connection, SjmsEndpoint endpoint) throws Exception - Throws:
Exception
-
createMessageConsumer
protected jakarta.jms.MessageConsumer createMessageConsumer(jakarta.jms.Session session) throws Exception - Throws:
Exception
-
stopConsumers
protected void stopConsumers() -
createConnection
- Throws:
Exception
-
refreshConnection
- Throws:
Exception
-
startConnection
- Throws:
Exception
-
stopConnection
protected void stopConnection()
-