Class AmqpPollableMessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S,T>,T extends AbstractAmqpChannel>
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,C>
org.springframework.integration.dsl.MessageChannelSpec<S,T>
org.springframework.integration.amqp.dsl.AmqpPollableMessageChannelSpec<S,T>
- Type Parameters:
S
- the targetAmqpPollableMessageChannelSpec
implementation type.T
- the target channel type.
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<T>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
- Direct Known Subclasses:
AmqpMessageChannelSpec
public class AmqpPollableMessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S,T>,T extends AbstractAmqpChannel>
extends MessageChannelSpec<S,T>
A
MessageChannelSpec
for a AbstractAmqpChannel
s.- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell, Artem Vozhdayenko
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.MessageChannelSpec
channel
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
ModifierConstructorDescriptionprotected
AmqpPollableMessageChannelSpec
(ConnectionFactory connectionFactory) -
Method Summary
Modifier and TypeMethodDescriptionamqpMessageConverter
(MessageConverter messageConverter) channelTransacted
(boolean channelTransacted) ConfigurechannelTransacted
on both theRabbitTemplate
(for sends) andSimpleMessageListenerContainer
(for receives) when using Spring Integration 4.0.Configure the delivery mode for messages that don't have anAmqpHeaders.DELIVERY_MODE
header.protected T
doGet()
extractPayload
(boolean extract) Configure whether normal spring-messaging to AMQP message mapping is enabled.headersMappedLast
(boolean headersLast) protected S
Configure the component identifier.inboundHeaderMapper
(AmqpHeaderMapper mapper) Configure the inbound header mapper to use whenextractPayload(boolean)
is true.messagePropertiesConverter
(MessagePropertiesConverter messagePropertiesConverter) ConfiguremessagePropertiesConverter
on both theRabbitTemplate
(for sends) andSimpleMessageListenerContainer
(for receives).outboundHeaderMapper
(AmqpHeaderMapper mapper) Configure the outbound header mapper to use whenextractPayload(boolean)
is true.Also implicitly sets theid(String)
(if not explicitly set).templateChannelTransacted
(boolean channelTransacted) ConfigurechannelTransacted
on theRabbitTemplate
used when sending messages to the channel.Methods inherited from class org.springframework.integration.dsl.MessageChannelSpec
datatype, getComponentsToRegister, interceptor, messageConverter, wireTap, wireTap, wireTap
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
amqpChannelFactoryBean
-
-
Constructor Details
-
AmqpPollableMessageChannelSpec
-
-
Method Details
-
id
Description copied from class:IntegrationComponentSpec
Configure the component identifier. Used as thebeanName
to register the bean in the application context for this component.- Overrides:
id
in classIntegrationComponentSpec<S extends AmqpPollableMessageChannelSpec<S,
T>, T extends AbstractAmqpChannel> - Parameters:
id
- the id.- Returns:
- the spec.
-
queueName
Also implicitly sets theid(String)
(if not explicitly set).- Parameters:
queueName
- the queueName.- Returns:
- the spec.
- See Also:
-
encoding
- Parameters:
encoding
- the encoding.- Returns:
- the spec.
- See Also:
-
amqpMessageConverter
- Parameters:
messageConverter
- the messageConverter.- Returns:
- the spec.
- See Also:
-
channelTransacted
ConfigurechannelTransacted
on both theRabbitTemplate
(for sends) andSimpleMessageListenerContainer
(for receives) when using Spring Integration 4.0. When using Spring Integration 4.1, only the container is configured. SeetemplateChannelTransacted(boolean)
.- Parameters:
channelTransacted
- the channelTransacted.- Returns:
- the spec.
- See Also:
-
templateChannelTransacted
ConfigurechannelTransacted
on theRabbitTemplate
used when sending messages to the channel. Only applies when Spring Integration 4.1 or greater is being used. Otherwise, seechannelTransacted(boolean)
.- Parameters:
channelTransacted
- the channelTransacted.- Returns:
- the spec.
- See Also:
-
messagePropertiesConverter
ConfiguremessagePropertiesConverter
on both theRabbitTemplate
(for sends) andSimpleMessageListenerContainer
(for receives).- Parameters:
messagePropertiesConverter
- the messagePropertiesConverter.- Returns:
- the spec.
- See Also:
-
defaultDeliveryMode
Configure the delivery mode for messages that don't have anAmqpHeaders.DELIVERY_MODE
header. Default isMessageDeliveryMode.PERSISTENT
.- Parameters:
mode
- the mode.- Returns:
- the spec.
-
extractPayload
Configure whether normal spring-messaging to AMQP message mapping is enabled. Default false.- Parameters:
extract
- true to enable mapping.- Returns:
- the spec.
- See Also:
-
outboundHeaderMapper
Configure the outbound header mapper to use whenextractPayload(boolean)
is true. Defaults to aDefaultAmqpHeaderMapper
.- Parameters:
mapper
- the mapper.- Returns:
- the spec.
- See Also:
-
inboundHeaderMapper
Configure the inbound header mapper to use whenextractPayload(boolean)
is true. Defaults to aDefaultAmqpHeaderMapper
.- Parameters:
mapper
- the mapper.- Returns:
- the spec.
- See Also:
-
headersMappedLast
- Parameters:
headersLast
- true to map headers last.- Returns:
- the spec.
- See Also:
-
doGet
- Overrides:
doGet
in classMessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S,
T>, T extends AbstractAmqpChannel>
-