Class SubscribableJmsChannel
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.channel.AbstractMessageChannel
org.springframework.integration.jms.AbstractJmsChannel
org.springframework.integration.jms.SubscribableJmsChannel
- 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.channel.BroadcastCapableChannel
,org.springframework.integration.context.ExpressionCapable
,org.springframework.integration.IntegrationPattern
,org.springframework.integration.support.context.NamedComponent
,org.springframework.integration.support.management.IntegrationManagement
,org.springframework.integration.support.management.ManageableLifecycle
,org.springframework.integration.support.management.ManageableSmartLifecycle
,org.springframework.integration.support.management.TrackableComponent
,org.springframework.messaging.MessageChannel
,org.springframework.messaging.SubscribableChannel
,org.springframework.messaging.support.InterceptableChannel
public class SubscribableJmsChannel extends AbstractJmsChannel implements org.springframework.integration.channel.BroadcastCapableChannel, org.springframework.integration.support.management.ManageableSmartLifecycle
An
AbstractJmsChannel
implementation for message-driven subscriptions.
Also implements a BroadcastCapableChannel
to represent possible pub-sub semantics
when configured against JMS topic.- Since:
- 2.0
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.springframework.integration.channel.AbstractMessageChannel
interceptors, meters
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger
-
Constructor Summary
Constructors Constructor Description SubscribableJmsChannel(org.springframework.jms.listener.AbstractMessageListenerContainer container, org.springframework.jms.core.JmsTemplate jmsTemplate)
-
Method Summary
Modifier and Type Method Description void
destroy()
int
getPhase()
boolean
isAutoStartup()
boolean
isBroadcast()
boolean
isRunning()
void
onInit()
void
setMaxSubscribers(int maxSubscribers)
Specify the maximum number of subscribers supported by the channel's dispatcher.void
start()
void
stop()
void
stop(java.lang.Runnable callback)
boolean
subscribe(org.springframework.messaging.MessageHandler handler)
boolean
unsubscribe(org.springframework.messaging.MessageHandler handler)
Methods inherited from class org.springframework.integration.channel.AbstractMessageChannel
addInterceptor, addInterceptor, getComponentType, getFullChannelName, getIChannelInterceptorList, getIntegrationPatternType, getInterceptors, getMetricsCaptor, getOverrides, isLoggingEnabled, registerMetricsCaptor, removeInterceptor, removeInterceptor, send, send, setDatatypes, setInterceptors, setLoggingEnabled, setMessageConverter, setShouldTrack
Methods 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, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
SubscribableJmsChannel
public SubscribableJmsChannel(org.springframework.jms.listener.AbstractMessageListenerContainer container, org.springframework.jms.core.JmsTemplate jmsTemplate)
-
-
Method Details
-
setMaxSubscribers
public void setMaxSubscribers(int maxSubscribers)Specify the maximum number of subscribers supported by the channel's dispatcher.- Parameters:
maxSubscribers
- The maximum number of subscribers allowed.
-
subscribe
public boolean subscribe(org.springframework.messaging.MessageHandler handler)- Specified by:
subscribe
in interfaceorg.springframework.messaging.SubscribableChannel
-
unsubscribe
public boolean unsubscribe(org.springframework.messaging.MessageHandler handler)- Specified by:
unsubscribe
in interfaceorg.springframework.messaging.SubscribableChannel
-
isBroadcast
public boolean isBroadcast()- Specified by:
isBroadcast
in interfaceorg.springframework.integration.channel.BroadcastCapableChannel
-
onInit
public void onInit()- Overrides:
onInit
in classorg.springframework.integration.channel.AbstractMessageChannel
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartup
in interfaceorg.springframework.context.SmartLifecycle
-
getPhase
public int getPhase()- Specified by:
getPhase
in interfaceorg.springframework.context.Phased
- Specified by:
getPhase
in interfaceorg.springframework.context.SmartLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceorg.springframework.context.Lifecycle
- Specified by:
isRunning
in interfaceorg.springframework.integration.support.management.ManageableLifecycle
-
start
public void start()- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
- Specified by:
start
in interfaceorg.springframework.integration.support.management.ManageableLifecycle
-
stop
public void stop()- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
- Specified by:
stop
in interfaceorg.springframework.integration.support.management.ManageableLifecycle
-
stop
public void stop(java.lang.Runnable callback)- Specified by:
stop
in interfaceorg.springframework.context.SmartLifecycle
-
destroy
public void destroy()- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Specified by:
destroy
in interfaceorg.springframework.integration.support.management.IntegrationManagement
- Overrides:
destroy
in classorg.springframework.integration.channel.AbstractMessageChannel
-