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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterPropertiesConfigured
(org.apache.camel.CamelContext camelContext) protected void
configureConsumer
(jakarta.jms.MessageConsumer consumer, jakarta.jms.Session session) protected void
protected jakarta.jms.MessageConsumer
createMessageConsumer
(jakarta.jms.Session session) protected jakarta.jms.Session
createSession
(jakarta.jms.Connection connection, SjmsEndpoint endpoint) protected void
doStart()
protected void
doStop()
int
jakarta.jms.ConnectionFactory
protected void
void
onException
(jakarta.jms.JMSException exception) protected boolean
recoverConnection
(org.apache.camel.util.backoff.BackOffTimer.Task task) protected final void
protected void
void
setClientId
(String clientId) void
setConcurrentConsumers
(int concurrentConsumers) void
setDestinationCreationStrategy
(DestinationCreationStrategy destinationCreationStrategy) void
setDestinationName
(String destinationName) void
setExceptionListener
(jakarta.jms.ExceptionListener exceptionListener) void
setMessageListener
(SessionMessageListener messageListener) protected void
protected void
protected void
Methods inherited from class org.apache.camel.support.service.BaseService
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, suspend
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
SimpleMessageListenerContainer
-
-
Method Details
-
getEndpoint
-
setMessageListener
- Specified by:
setMessageListener
in interfaceMessageListenerContainer
-
setExceptionListener
public void setExceptionListener(jakarta.jms.ExceptionListener exceptionListener) - Specified by:
setExceptionListener
in 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:
afterPropertiesConfigured
in interfaceorg.apache.camel.AfterPropertiesConfigured
-
getConnectionFactory
public jakarta.jms.ConnectionFactory getConnectionFactory()- Specified by:
getConnectionFactory
in 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:
onException
in 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:
doStart
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
doStop
- Overrides:
doStop
in 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()
-