Class JmsInboundGateway
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.gateway.MessagingGatewaySupport
org.springframework.integration.jms.JmsInboundGateway
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,org.springframework.integration.context.ExpressionCapable,org.springframework.integration.context.OrderlyShutdownCapable,org.springframework.integration.IntegrationPattern,org.springframework.integration.support.context.NamedComponent,org.springframework.integration.support.management.IntegrationInboundManagement,org.springframework.integration.support.management.IntegrationManagement,org.springframework.integration.support.management.ManageableLifecycle,org.springframework.integration.support.management.ManageableSmartLifecycle,org.springframework.integration.support.management.TrackableComponent
public class JmsInboundGateway
extends org.springframework.integration.gateway.MessagingGatewaySupport
implements org.springframework.integration.context.OrderlyShutdownCapable
A wrapper around the
JmsMessageDrivenEndpoint implementing
MessagingGatewaySupport.- Since:
- 5.0
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.springframework.integration.gateway.MessagingGatewaySupport
messagingTemplateFields inherited from class org.springframework.integration.endpoint.AbstractEndpoint
lifecycleCondition, lifecycleLockFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger -
Constructor Summary
Constructors Constructor Description JmsInboundGateway(org.springframework.jms.listener.AbstractMessageListenerContainer listenerContainer, ChannelPublishingJmsMessageListener listener) -
Method Summary
Modifier and Type Method Description intafterShutdown()intbeforeShutdown()voiddestroy()protected voiddoStart()protected voiddoStop()java.lang.StringgetComponentType()ChannelPublishingJmsMessageListenergetListener()protected voidonInit()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetComponentName(java.lang.String componentName)voidsetErrorChannel(org.springframework.messaging.MessageChannel errorChannel)voidsetErrorChannelName(java.lang.String errorChannelName)voidsetErrorOnTimeout(boolean errorOnTimeout)voidsetReplyChannel(org.springframework.messaging.MessageChannel replyChannel)voidsetReplyChannelName(java.lang.String replyChannelName)voidsetReplyTimeout(long replyTimeout)voidsetRequestChannel(org.springframework.messaging.MessageChannel requestChannel)voidsetRequestChannelName(java.lang.String requestChannelName)voidsetRequestTimeout(long requestTimeout)voidsetShouldTrack(boolean shouldTrack)voidsetShutdownContainerOnStop(boolean shutdownContainerOnStop)Set to false to prevent listener container shutdown when the endpoint is stopped.Methods inherited from class org.springframework.integration.gateway.MessagingGatewaySupport
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, setRequestMapperMethods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setBeanFactory, setBeanName, setChannelResolver, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
JmsInboundGateway
public JmsInboundGateway(org.springframework.jms.listener.AbstractMessageListenerContainer listenerContainer, ChannelPublishingJmsMessageListener listener)
-
-
Method Details
-
setRequestChannel
public void setRequestChannel(org.springframework.messaging.MessageChannel requestChannel)- Overrides:
setRequestChannelin classorg.springframework.integration.gateway.MessagingGatewaySupport
-
setRequestChannelName
public void setRequestChannelName(java.lang.String requestChannelName)- Overrides:
setRequestChannelNamein classorg.springframework.integration.gateway.MessagingGatewaySupport
-
setReplyChannel
public void setReplyChannel(org.springframework.messaging.MessageChannel replyChannel)- Overrides:
setReplyChannelin classorg.springframework.integration.gateway.MessagingGatewaySupport
-
setReplyChannelName
public void setReplyChannelName(java.lang.String replyChannelName)- Overrides:
setReplyChannelNamein classorg.springframework.integration.gateway.MessagingGatewaySupport
-
setErrorChannel
public void setErrorChannel(org.springframework.messaging.MessageChannel errorChannel)- Overrides:
setErrorChannelin classorg.springframework.integration.gateway.MessagingGatewaySupport
-
setErrorChannelName
public void setErrorChannelName(java.lang.String errorChannelName)- Overrides:
setErrorChannelNamein classorg.springframework.integration.gateway.MessagingGatewaySupport
-
setRequestTimeout
public void setRequestTimeout(long requestTimeout)- Overrides:
setRequestTimeoutin classorg.springframework.integration.gateway.MessagingGatewaySupport
-
setReplyTimeout
public void setReplyTimeout(long replyTimeout)- Overrides:
setReplyTimeoutin classorg.springframework.integration.gateway.MessagingGatewaySupport
-
setErrorOnTimeout
public void setErrorOnTimeout(boolean errorOnTimeout)- Overrides:
setErrorOnTimeoutin classorg.springframework.integration.gateway.MessagingGatewaySupport
-
setShouldTrack
public void setShouldTrack(boolean shouldTrack)- Specified by:
setShouldTrackin interfaceorg.springframework.integration.support.management.TrackableComponent- Overrides:
setShouldTrackin classorg.springframework.integration.gateway.MessagingGatewaySupport
-
setShutdownContainerOnStop
public void setShutdownContainerOnStop(boolean shutdownContainerOnStop)Set to false to prevent listener container shutdown when the endpoint is stopped. Then, if so configured, any cached consumer(s) in the container will remain. Otherwise the shared connection and will be closed and the listener invokers shut down; this behavior is new starting with version 5.1. Default: true.- Parameters:
shutdownContainerOnStop- false to not shutdown.- Since:
- 5.1
-
getComponentType
public java.lang.String getComponentType()- Specified by:
getComponentTypein interfaceorg.springframework.integration.support.context.NamedComponent- Overrides:
getComponentTypein classorg.springframework.integration.gateway.MessagingGatewaySupport
-
setComponentName
public void setComponentName(java.lang.String componentName)- Overrides:
setComponentNamein classorg.springframework.integration.context.IntegrationObjectSupport
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Overrides:
setApplicationContextin classorg.springframework.integration.context.IntegrationObjectSupport- Throws:
org.springframework.beans.BeansException
-
onInit
protected void onInit()- Overrides:
onInitin classorg.springframework.integration.gateway.MessagingGatewaySupport
-
getListener
-
doStart
protected void doStart()- Overrides:
doStartin classorg.springframework.integration.gateway.MessagingGatewaySupport
-
doStop
protected void doStop()- Overrides:
doStopin classorg.springframework.integration.gateway.MessagingGatewaySupport
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Specified by:
destroyin interfaceorg.springframework.integration.support.management.IntegrationManagement- Overrides:
destroyin classorg.springframework.integration.gateway.MessagingGatewaySupport
-
beforeShutdown
public int beforeShutdown()- Specified by:
beforeShutdownin interfaceorg.springframework.integration.context.OrderlyShutdownCapable
-
afterShutdown
public int afterShutdown()- Specified by:
afterShutdownin interfaceorg.springframework.integration.context.OrderlyShutdownCapable
-