public class JmsMessageDrivenEndpoint extends MessageProducerSupport implements OrderlyShutdownCapable
lifecycleCondition, lifecycleLock
EXPRESSION_PARSER, logger
DEFAULT_PHASE
Constructor and Description |
---|
JmsMessageDrivenEndpoint(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()
Take no action by default.
|
protected void |
doStop()
Take no action by default.
|
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(ApplicationContext applicationContext) |
void |
setErrorChannel(MessageChannel errorChannel) |
void |
setErrorChannelName(String errorChannelName)
Set the error channel name.
|
void |
setOutputChannel(MessageChannel outputChannel)
Specify the
MessageChannel to which produced Messages should be sent. |
void |
setOutputChannelName(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(String sessionAcknowledgeMode)
Set the session acknowledge mode on the listener container.
|
void |
setShouldTrack(boolean shouldTrack) |
void |
setShutdownContainerOnStop(boolean shutdownContainerOnStop)
Set to false to prevent listener container shutdown when the endpoint is stopped.
|
buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, sendErrorMessageIfNecessary, sendMessage, setErrorMessageStrategy, subscribeToPublisher
doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stop
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBeanName, getComponentName
public JmsMessageDrivenEndpoint(AbstractMessageListenerContainer listenerContainer, ChannelPublishingJmsMessageListener listener)
listenerContainer
- the container.listener
- the listener.public void setSessionAcknowledgeMode(String sessionAcknowledgeMode)
DefaultMessageListenerContainer
.sessionAcknowledgeMode
- the acknowledge mode.public void setOutputChannel(MessageChannel outputChannel)
MessageProducer
MessageChannel
to which produced Messages should be sent.setOutputChannel
in interface MessageProducer
setOutputChannel
in class MessageProducerSupport
outputChannel
- The output channel.public void setOutputChannelName(String outputChannelName)
MessageProducerSupport
outputChannel
if provided.setOutputChannelName
in interface MessageProducer
setOutputChannelName
in class MessageProducerSupport
outputChannelName
- the channel name.public void setErrorChannel(MessageChannel errorChannel)
setErrorChannel
in class MessageProducerSupport
public void setErrorChannelName(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 void setShutdownContainerOnStop(boolean shutdownContainerOnStop)
shutdownContainerOnStop
- false to not shutdown.public ChannelPublishingJmsMessageListener getListener()
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
setApplicationContext
in class IntegrationObjectSupport
BeansException
public String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class IntegrationObjectSupport
public void afterSingletonsInstantiated()
afterSingletonsInstantiated
in interface 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()
destroy
in interface DisposableBean
destroy
in class AbstractEndpoint
public int beforeShutdown()
OrderlyShutdownCapable
beforeShutdown
in interface OrderlyShutdownCapable
public int afterShutdown()
OrderlyShutdownCapable
afterShutdown
in interface OrderlyShutdownCapable