public class JmsInboundGateway extends MessagingGatewaySupport implements OrderlyShutdownCapable
JmsMessageDrivenEndpoint
implementing
MessagingGatewaySupport
.IntegrationManagement.ManagementOverrides
messagingTemplate
lifecycleCondition, lifecycleLock
EXPRESSION_PARSER, logger
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
DEFAULT_PHASE
Constructor and Description |
---|
JmsInboundGateway(AbstractMessageListenerContainer listenerContainer,
ChannelPublishingJmsMessageListener listener) |
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.
|
int |
beforeShutdown()
Called before shutdown begins.
|
void |
destroy() |
protected void |
doStart()
Subclasses must implement this method with the start behavior.
|
protected void |
doStop()
Subclasses must implement this method with the stop behavior.
|
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 |
setComponentName(String componentName)
Sets the name of this component.
|
void |
setErrorChannel(MessageChannel errorChannel)
Set the error channel.
|
void |
setErrorChannelName(String errorChannelName)
Set the error channel name.
|
void |
setErrorOnTimeout(boolean errorOnTimeout)
If errorOnTimeout is true, construct an instance that will send an
ErrorMessage with a MessageTimeoutException payload to the error
channel if a reply is expected but none is received. |
void |
setReplyChannel(MessageChannel replyChannel)
Set the reply channel.
|
void |
setReplyChannelName(String replyChannelName)
Set the reply channel name.
|
void |
setReplyTimeout(long replyTimeout)
Set the timeout value for receiving reply messages.
|
void |
setRequestChannel(MessageChannel requestChannel)
Set the request channel.
|
void |
setRequestChannelName(String requestChannelName)
Set the request channel name.
|
void |
setRequestTimeout(long requestTimeout)
Set the timeout value for sending request messages.
|
void |
setShouldTrack(boolean shouldTrack)
Specify whether this gateway should be tracked in the Message History
of Messages that originate from its send or sendAndReceive operations.
|
void |
setShutdownContainerOnStop(boolean shutdownContainerOnStop)
Set to false to prevent listener container shutdown when the endpoint is stopped.
|
buildErrorMessage, buildSendTimer, getErrorChannel, getErrorMessageAttributes, getIntegrationPatternType, getManagedName, getManagedType, getOverrides, getReplyChannel, getRequestChannel, isLoggingEnabled, receive, receive, receiveMessage, receiveMessage, registerMetricsCaptor, registerReplyMessageCorrelatorIfNecessary, send, sendAndReceive, sendAndReceiveMessage, sendAndReceiveMessageReactive, sendTimer, setErrorMessageStrategy, setLoggingEnabled, setManagedName, setManagedType, setReplyMapper, setRequestMapper
doStop, getPhase, getRole, 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, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getThisAs
getBeanName, getComponentName
public JmsInboundGateway(AbstractMessageListenerContainer listenerContainer, ChannelPublishingJmsMessageListener listener)
public void setRequestChannel(MessageChannel requestChannel)
MessagingGatewaySupport
setRequestChannel
in class MessagingGatewaySupport
requestChannel
- the channel to which request messages will be sentpublic void setRequestChannelName(String requestChannelName)
MessagingGatewaySupport
setRequestChannelName
in class MessagingGatewaySupport
requestChannelName
- the channel bean name to which request messages will be sentpublic void setReplyChannel(MessageChannel replyChannel)
MessagingGatewaySupport
setReplyChannel
in class MessagingGatewaySupport
replyChannel
- the channel from which reply messages will be receivedpublic void setReplyChannelName(String replyChannelName)
MessagingGatewaySupport
setReplyChannelName
in class MessagingGatewaySupport
replyChannelName
- the channel bean name from which reply messages will be receivedpublic void setErrorChannel(MessageChannel errorChannel)
MessagingGatewaySupport
setErrorChannel
in class MessagingGatewaySupport
errorChannel
- The error channel.public void setErrorChannelName(String errorChannelName)
MessagingGatewaySupport
setErrorChannelName
in class MessagingGatewaySupport
errorChannelName
- The error channel bean name.public void setRequestTimeout(long requestTimeout)
MessagingGatewaySupport
setRequestTimeout
in class MessagingGatewaySupport
requestTimeout
- the timeout value in millisecondspublic void setReplyTimeout(long replyTimeout)
MessagingGatewaySupport
setReplyTimeout
in class MessagingGatewaySupport
replyTimeout
- the timeout value in millisecondspublic void setErrorOnTimeout(boolean errorOnTimeout)
MessagingGatewaySupport
ErrorMessage
with a MessageTimeoutException
payload to the error
channel if a reply is expected but none is received. If no error channel is
configured, the MessageTimeoutException
will be thrown.setErrorOnTimeout
in class MessagingGatewaySupport
errorOnTimeout
- true to create the error message on reply timeout.public void setShouldTrack(boolean shouldTrack)
MessagingGatewaySupport
setShouldTrack
in interface TrackableComponent
setShouldTrack
in class MessagingGatewaySupport
public void setShutdownContainerOnStop(boolean shutdownContainerOnStop)
shutdownContainerOnStop
- false to not shutdown.public String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class MessagingGatewaySupport
public void setComponentName(String componentName)
IntegrationObjectSupport
setComponentName
in class IntegrationObjectSupport
componentName
- The component name.public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
setApplicationContext
in class IntegrationObjectSupport
BeansException
protected void onInit()
IntegrationObjectSupport
onInit
in class MessagingGatewaySupport
public ChannelPublishingJmsMessageListener getListener()
protected void doStart()
AbstractEndpoint
AbstractEndpoint.lifecycleLock
.doStart
in class MessagingGatewaySupport
protected void doStop()
AbstractEndpoint
AbstractEndpoint.lifecycleLock
.doStop
in class MessagingGatewaySupport
public void destroy()
destroy
in interface DisposableBean
destroy
in interface IntegrationManagement
destroy
in class MessagingGatewaySupport
public int beforeShutdown()
OrderlyShutdownCapable
beforeShutdown
in interface OrderlyShutdownCapable
public int afterShutdown()
OrderlyShutdownCapable
afterShutdown
in interface OrderlyShutdownCapable