Class PointToPointSubscribableAmqpChannel
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.channel.AbstractMessageChannel
org.springframework.integration.amqp.channel.AbstractAmqpChannel
org.springframework.integration.amqp.channel.PointToPointSubscribableAmqpChannel
- All Implemented Interfaces:
- ConnectionListener,- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- ApplicationContextAware,- Lifecycle,- Phased,- SmartLifecycle,- ComponentSourceAware,- ExpressionCapable,- IntegrationPattern,- NamedComponent,- IntegrationManagement,- ManageableLifecycle,- ManageableSmartLifecycle,- TrackableComponent,- MessageChannel,- SubscribableChannel,- InterceptableChannel
The 
AbstractSubscribableAmqpChannel implementation for one-to-one subscription
 over AMQP queue.
 
 If queue name is not provided, the channel bean name is used internally to declare
 a queue via provided AmqpAdmin (if any).
- Since:
- 2.1
- Author:
- Mark Fisher, Artem Bilan
- 
Nested Class SummaryNested classes/interfaces inherited from class org.springframework.integration.channel.AbstractMessageChannelAbstractMessageChannel.ChannelInterceptorListNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from class org.springframework.integration.channel.AbstractMessageChannelinterceptors, metersFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.messaging.MessageChannelINDEFINITE_TIMEOUTFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructorsConstructorDescriptionPointToPointSubscribableAmqpChannel(String channelName, AbstractMessageListenerContainer container, AmqpTemplate amqpTemplate) Construct an instance with the supplied name, container and template; default header mappers will be used if the message is mapped.PointToPointSubscribableAmqpChannel(String channelName, AbstractMessageListenerContainer container, AmqpTemplate amqpTemplate, AmqpHeaderMapper outboundMapper, AmqpHeaderMapper inboundMapper) Construct an instance with the supplied name, container and template; default header mappers will be used if the message is mapped.
- 
Method SummaryModifier and TypeMethodDescriptionprotected AbstractDispatchervoiddestroy()protected voidintgetPhase()protected StringSubclasses may override this method to return a routing key.booleanbooleanprotected StringobtainQueueName(String channelName) voidonInit()Subclasses may implement this for initialization logic.voidsetMaxSubscribers(int maxSubscribers) Specify the maximum number of subscribers supported by the channel's dispatcher (if it is anAbstractDispatcher).voidsetQueueName(String queueName) Provide a Queue name to be used.voidstart()voidstop()voidbooleansubscribe(MessageHandler handler) booleanunsubscribe(MessageHandler handler) Methods inherited from class org.springframework.integration.amqp.channel.AbstractAmqpChanneldoSend, getAdmin, getAmqpTemplate, getConnectionFactory, getExchangeName, getInboundHeaderMapper, getRabbitTemplate, isExtractPayload, isLoggingEnabled, onCreate, setAdmin, setConnectionFactory, setDefaultDeliveryMode, setExtractPayload, setHeadersMappedLast, setLoggingEnabledMethods inherited from class org.springframework.integration.channel.AbstractMessageChanneladdInterceptor, addInterceptor, getComponentType, getFullChannelName, getIChannelInterceptorList, getIntegrationPatternType, getInterceptors, getMetricsCaptor, getOverrides, isApplicationRunning, isObserved, registerMetricsCaptor, registerObservationRegistry, removeInterceptor, removeInterceptor, send, send, setDatatypes, setInterceptors, setMessageConverter, setObservationConvention, setShouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.amqp.rabbit.connection.ConnectionListeneronClose, onFailed, onShutDownMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementgetManagedName, getManagedType, getThisAs, setManagedName, setManagedTypeMethods inherited from interface org.springframework.messaging.MessageChannelsend, sendMethods inherited from interface org.springframework.integration.support.context.NamedComponentgetBeanName, getComponentName
- 
Constructor Details- 
PointToPointSubscribableAmqpChannelpublic PointToPointSubscribableAmqpChannel(String channelName, AbstractMessageListenerContainer container, AmqpTemplate amqpTemplate) Construct an instance with the supplied name, container and template; default header mappers will be used if the message is mapped.- Parameters:
- channelName- the channel name.
- container- the container.
- amqpTemplate- the template.
- See Also:
 
- 
PointToPointSubscribableAmqpChannelpublic PointToPointSubscribableAmqpChannel(String channelName, AbstractMessageListenerContainer container, AmqpTemplate amqpTemplate, AmqpHeaderMapper outboundMapper, AmqpHeaderMapper inboundMapper) Construct an instance with the supplied name, container and template; default header mappers will be used if the message is mapped.- Parameters:
- channelName- the channel name.
- container- the container.
- amqpTemplate- the template.
- outboundMapper- the outbound mapper.
- inboundMapper- the inbound mapper.
- Since:
- 4.3
- See Also:
 
 
- 
- 
Method Details- 
setQueueNameProvide a Queue name to be used. If this is not provided, the Queue's name will be the same as the channel name.- Parameters:
- queueName- The queue name.
 
- 
obtainQueueName
- 
createDispatcher
- 
getRoutingKeyDescription copied from class:AbstractAmqpChannelSubclasses may override this method to return a routing key. By default, there will be no routing key (empty string).- Overrides:
- getRoutingKeyin class- AbstractAmqpChannel
- Returns:
- The routing key.
 
- 
doDeclaresprotected void doDeclares()- Specified by:
- doDeclaresin class- AbstractAmqpChannel
 
- 
setMaxSubscriberspublic void setMaxSubscribers(int maxSubscribers) Specify the maximum number of subscribers supported by the channel's dispatcher (if it is anAbstractDispatcher).- Parameters:
- maxSubscribers- The maximum number of subscribers allowed.
 
- 
subscribe- Specified by:
- subscribein interface- SubscribableChannel
 
- 
unsubscribe- Specified by:
- unsubscribein interface- SubscribableChannel
 
- 
onInitpublic void onInit()Description copied from class:IntegrationObjectSupportSubclasses may implement this for initialization logic.- Overrides:
- onInitin class- AbstractAmqpChannel
 
- 
isAutoStartuppublic boolean isAutoStartup()- Specified by:
- isAutoStartupin interface- SmartLifecycle
 
- 
getPhasepublic int getPhase()- Specified by:
- getPhasein interface- Phased
- Specified by:
- getPhasein interface- SmartLifecycle
 
- 
isRunningpublic boolean isRunning()- Specified by:
- isRunningin interface- Lifecycle
- Specified by:
- isRunningin interface- ManageableLifecycle
 
- 
startpublic void start()- Specified by:
- startin interface- Lifecycle
- Specified by:
- startin interface- ManageableLifecycle
 
- 
stoppublic void stop()- Specified by:
- stopin interface- Lifecycle
- Specified by:
- stopin interface- ManageableLifecycle
 
- 
stop- Specified by:
- stopin interface- SmartLifecycle
 
- 
destroypublic void destroy()- Specified by:
- destroyin interface- DisposableBean
- Specified by:
- destroyin interface- IntegrationManagement
- Overrides:
- destroyin class- AbstractAmqpChannel
 
 
-