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:
Aware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,ApplicationContextAware,Lifecycle,Phased,SmartLifecycle,BroadcastCapableChannel,ExpressionCapable,IntegrationPattern,NamedComponent,IntegrationManagement,ManageableLifecycle,ManageableSmartLifecycle,TrackableComponent,MessageChannel,SubscribableChannel,InterceptableChannel
public class SubscribableJmsChannel
extends AbstractJmsChannel
implements BroadcastCapableChannel, 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
- Author:
- Mark Fisher, Gary Russell, Artem Bilan
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.integration.channel.AbstractMessageChannel
AbstractMessageChannel.ChannelInterceptorListNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class org.springframework.integration.channel.AbstractMessageChannel
interceptors, metersFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.messaging.MessageChannel
INDEFINITE_TIMEOUTFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionSubscribableJmsChannel(AbstractMessageListenerContainer container, JmsTemplate jmsTemplate) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()intgetPhase()booleanbooleanReturn a state of this channel in regards of broadcasting capabilities.booleanvoidonInit()Subclasses may implement this for initialization logic.voidsetMaxSubscribers(int maxSubscribers) Specify the maximum number of subscribers supported by the channel's dispatcher.voidstart()voidstop()voidbooleansubscribe(MessageHandler handler) booleanunsubscribe(MessageHandler handler) Methods inherited from class org.springframework.integration.jms.AbstractJmsChannel
doSendMethods inherited from class org.springframework.integration.channel.AbstractMessageChannel
addInterceptor, addInterceptor, getComponentType, getFullChannelName, getIChannelInterceptorList, getIntegrationPatternType, getInterceptors, getMetricsCaptor, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, removeInterceptor, removeInterceptor, send, send, setDatatypes, setInterceptors, setLoggingEnabled, setMessageConverter, setObservationConvention, setShouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getManagedName, getManagedType, getThisAs, setManagedName, setManagedTypeMethods inherited from interface org.springframework.messaging.MessageChannel
send, sendMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName
-
Constructor Details
-
SubscribableJmsChannel
-
-
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
- Specified by:
subscribein interfaceSubscribableChannel
-
unsubscribe
- Specified by:
unsubscribein interfaceSubscribableChannel
-
isBroadcast
public boolean isBroadcast()Description copied from interface:BroadcastCapableChannelReturn a state of this channel in regards of broadcasting capabilities.- Specified by:
isBroadcastin interfaceBroadcastCapableChannel- Returns:
- the state of this channel in regards of broadcasting capabilities.
-
onInit
public void onInit()Description copied from class:IntegrationObjectSupportSubclasses may implement this for initialization logic.- Overrides:
onInitin classAbstractMessageChannel
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartupin interfaceSmartLifecycle
-
getPhase
public int getPhase()- Specified by:
getPhasein interfacePhased- Specified by:
getPhasein interfaceSmartLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceLifecycle- Specified by:
isRunningin interfaceManageableLifecycle
-
start
public void start()- Specified by:
startin interfaceLifecycle- Specified by:
startin interfaceManageableLifecycle
-
stop
public void stop()- Specified by:
stopin interfaceLifecycle- Specified by:
stopin interfaceManageableLifecycle
-
stop
- Specified by:
stopin interfaceSmartLifecycle
-
destroy
public void destroy()- Specified by:
destroyin interfaceDisposableBean- Specified by:
destroyin interfaceIntegrationManagement- Overrides:
destroyin classAbstractMessageChannel
-