public class DefaultJmsMessageListenerContainer
extends org.springframework.jms.listener.DefaultMessageListenerContainer
container which listen for messages
on the JMS destination.
This implementation extends Springs DefaultMessageListenerContainer supporting
automatic recovery and throttling.CACHE_AUTO, CACHE_CONNECTION, CACHE_CONSUMER, CACHE_NONE, CACHE_SESSION, DEFAULT_RECOVERY_INTERVAL, DEFAULT_THREAD_NAME_PREFIXDEFAULT_RECEIVE_TIMEOUTlifecycleMonitor, sharedConnectionMonitor| Constructor and Description |
|---|
DefaultJmsMessageListenerContainer(JmsEndpoint endpoint) |
DefaultJmsMessageListenerContainer(JmsEndpoint endpoint,
boolean allowQuickStop) |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.core.task.TaskExecutor |
createDefaultTaskExecutor()
Create a default TaskExecutor.
|
void |
destroy() |
protected boolean |
isAllowQuickStop()
Whether this
DefaultMessageListenerContainer allows the runningAllowed() to quick stop
in case JmsConfiguration.isAcceptMessagesWhileStopping() is enabled, and CamelContext
is currently being stopped. |
protected boolean |
runningAllowed() |
void |
stop() |
protected void |
stopSharedConnection() |
applyBackOffTime, doInitialize, doRescheduleTask, doShutdown, establishSharedConnection, getActiveConsumerCount, getCacheLevel, getConcurrentConsumers, getIdleConsumerLimit, getIdleTaskExecutionLimit, getMaxConcurrentConsumers, getMaxMessagesPerTask, getScheduledConsumerCount, handleListenerSetupFailure, initialize, isRecovering, isRegisteredWithDestination, messageReceived, noMessageReceived, recoverAfterListenerSetupFailure, refreshConnectionUntilSuccessful, refreshDestination, scheduleNewInvokerIfAppropriate, setBackOff, setCacheLevel, setCacheLevelName, setConcurrency, setConcurrentConsumers, setIdleConsumerLimit, setIdleTaskExecutionLimit, setMaxConcurrentConsumers, setMaxMessagesPerTask, setRecoveryInterval, setTaskExecutor, sharedConnectionEnabled, start, startSharedConnection, stopcreateListenerConsumer, doReceiveAndExecute, getConnection, getReceiveTimeout, getSession, getTransactionManager, isSessionLocallyTransacted, receiveAndExecute, receiveMessage, setReceiveTimeout, setSessionTransacted, setTransactionManager, setTransactionName, setTransactionTimeout, shouldCommitAfterNoMessageReceivedcheckMessageListener, commitIfNecessary, createConsumer, doExecuteListener, doInvokeListener, doInvokeListener, executeListener, getDefaultSubscriptionName, getDestination, getDestinationDescription, getDestinationName, getDurableSubscriptionName, getErrorHandler, getExceptionListener, getMessageConverter, getMessageListener, getMessageSelector, getSubscriptionName, handleListenerException, invokeErrorHandler, invokeExceptionListener, invokeListener, isAcceptMessagesWhileStopping, isExposeListenerSession, isPubSubNoLocal, isReplyPubSubDomain, isSubscriptionDurable, isSubscriptionShared, rollbackIfNecessary, rollbackOnExceptionIfNecessary, setAcceptMessagesWhileStopping, setDestination, setDestinationName, setDurableSubscriptionName, setErrorHandler, setExceptionListener, setExposeListenerSession, setMessageConverter, setMessageListener, setMessageSelector, setPubSubNoLocal, setReplyPubSubDomain, setSubscriptionDurable, setSubscriptionName, setSubscriptionShared, setupMessageListener, validateConfigurationafterPropertiesSet, createSharedConnection, doStart, doStop, getBeanName, getClientId, getPausedTaskCount, getPhase, getSharedConnection, isActive, isAutoStartup, isRunning, logRejectedTask, prepareSharedConnection, refreshSharedConnection, rescheduleTaskIfNecessary, resumePausedTasks, setAutoStartup, setBeanName, setClientId, setPhase, shutdowngetDestinationResolver, isPubSubDomain, receiveFromConsumer, resolveDestinationName, setDestinationResolver, setPubSubDomainconvertJmsAccessException, createConnection, createSession, getConnectionFactory, getSessionAcknowledgeMode, isClientAcknowledge, isSessionTransacted, setConnectionFactory, setSessionAcknowledgeMode, setSessionAcknowledgeModeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic DefaultJmsMessageListenerContainer(JmsEndpoint endpoint)
public DefaultJmsMessageListenerContainer(JmsEndpoint endpoint, boolean allowQuickStop)
protected boolean isAllowQuickStop()
DefaultMessageListenerContainer allows the runningAllowed() to quick stop
in case JmsConfiguration.isAcceptMessagesWhileStopping() is enabled, and CamelContext
is currently being stopped.protected boolean runningAllowed()
runningAllowed in class org.springframework.jms.listener.AbstractJmsListeningContainerprotected org.springframework.core.task.TaskExecutor createDefaultTaskExecutor()
TaskExecutor will depend on the value of
JmsConfiguration.getDefaultTaskExecutorType(). For more details, refer to the Javadoc of
DefaultTaskExecutorType.
In all cases, it uses the specified bean name and Camel's ExecutorServiceManager
to resolve the thread name.createDefaultTaskExecutor in class org.springframework.jms.listener.DefaultMessageListenerContainerJmsConfiguration.setDefaultTaskExecutorType(DefaultTaskExecutorType),
ExecutorConfigurationSupport.setBeanName(String)public void stop()
throws org.springframework.jms.JmsException
stop in interface org.springframework.context.Lifecyclestop in class org.springframework.jms.listener.AbstractJmsListeningContainerorg.springframework.jms.JmsExceptionpublic void destroy()
destroy in interface org.springframework.beans.factory.DisposableBeandestroy in class org.springframework.jms.listener.AbstractJmsListeningContainerprotected void stopSharedConnection()
stopSharedConnection in class org.springframework.jms.listener.DefaultMessageListenerContainerApache Camel