public class JmsMessageDrivenEndpoint extends MessageProducerSupport implements org.springframework.beans.factory.DisposableBean, OrderlyShutdownCapable
lifecycleCondition, lifecycleLock
EXPRESSION_PARSER, logger
Constructor and Description |
---|
JmsMessageDrivenEndpoint(org.springframework.jms.listener.AbstractMessageListenerContainer listenerContainer,
ChannelPublishingJmsMessageListener listener)
Construct an instance with an externally configured container.
|
Modifier and Type | Method and Description |
---|---|
int |
afterShutdown()
Called after normal shutdown of schedulers, executors etc,
and after the shutdown delay has elapsed, but before any
forced shutdown of any remaining active scheduler/executor
threads.Can optionally return the number of active messages
still in process.
|
void |
afterSingletonsInstantiated() |
int |
beforeShutdown()
Called before shutdown begins.
|
void |
destroy() |
protected void |
doStart()
Takes no action by default.
|
protected void |
doStop()
Takes no action by default.
|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
ChannelPublishingJmsMessageListener |
getListener() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setErrorChannel(org.springframework.messaging.MessageChannel errorChannel) |
void |
setErrorChannelName(java.lang.String errorChannelName)
Set the error channel name.
|
void |
setOutputChannel(org.springframework.messaging.MessageChannel outputChannel)
Specify the MessageChannel to which produced Messages should be sent.
|
void |
setOutputChannelName(java.lang.String outputChannelName)
Set the output channel name; overrides
outputChannel if provided. |
void |
setSendTimeout(long sendTimeout)
Configure the default timeout value to use for send operations.
|
void |
setSessionAcknowledgeMode(java.lang.String sessionAcknowledgeMode)
Set the session acknowledge mode on the listener container.
|
void |
setShouldTrack(boolean shouldTrack) |
buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getMessagingTemplate, getOutputChannel, sendErrorMessageIfNecessary, sendMessage, setErrorMessageStrategy
doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, setTaskScheduler, start, stop, stop
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
public JmsMessageDrivenEndpoint(org.springframework.jms.listener.AbstractMessageListenerContainer listenerContainer, ChannelPublishingJmsMessageListener listener)
listenerContainer
- the container.listener
- the listener.public void setSessionAcknowledgeMode(java.lang.String sessionAcknowledgeMode)
DefaultMessageListenerContainer
.sessionAcknowledgeMode
- the acknowledge mode.public void setOutputChannel(org.springframework.messaging.MessageChannel outputChannel)
MessageProducer
setOutputChannel
in interface MessageProducer
setOutputChannel
in class MessageProducerSupport
outputChannel
- The output channel.public void setOutputChannelName(java.lang.String outputChannelName)
MessageProducerSupport
outputChannel
if provided.setOutputChannelName
in class MessageProducerSupport
outputChannelName
- the channel name.public void setErrorChannel(org.springframework.messaging.MessageChannel errorChannel)
setErrorChannel
in class MessageProducerSupport
public void setErrorChannelName(java.lang.String errorChannelName)
MessageProducerSupport
setErrorChannelName
in class MessageProducerSupport
errorChannelName
- The error channel bean name.public void setSendTimeout(long sendTimeout)
MessageProducerSupport
setSendTimeout
in class MessageProducerSupport
sendTimeout
- the send timeout in millisecondsGenericMessagingTemplate.setSendTimeout(long)
public void setShouldTrack(boolean shouldTrack)
setShouldTrack
in interface TrackableComponent
setShouldTrack
in class MessageProducerSupport
public ChannelPublishingJmsMessageListener getListener()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
setApplicationContext
in class IntegrationObjectSupport
org.springframework.beans.BeansException
public java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class IntegrationObjectSupport
public void afterSingletonsInstantiated()
afterSingletonsInstantiated
in interface org.springframework.beans.factory.SmartInitializingSingleton
afterSingletonsInstantiated
in class MessageProducerSupport
protected void onInit()
IntegrationObjectSupport
onInit
in class MessageProducerSupport
protected void doStart()
MessageProducerSupport
doStart
in class MessageProducerSupport
protected void doStop()
MessageProducerSupport
doStop
in class MessageProducerSupport
public void destroy() throws java.lang.Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
destroy
in class AbstractEndpoint
java.lang.Exception
public int beforeShutdown()
OrderlyShutdownCapable
beforeShutdown
in interface OrderlyShutdownCapable
public int afterShutdown()
OrderlyShutdownCapable
afterShutdown
in interface OrderlyShutdownCapable