Class AmqpClientMessageHandlerSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<AmqpClientMessageHandlerSpec, AmqpClientMessageHandler>
org.springframework.integration.dsl.MessageHandlerSpec<AmqpClientMessageHandlerSpec, AmqpClientMessageHandler>
org.springframework.integration.amqp.dsl.AmqpClientMessageHandlerSpec
- All Implemented Interfaces:
- DisposableBean,- FactoryBean<AmqpClientMessageHandler>,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle
public class AmqpClientMessageHandlerSpec
extends MessageHandlerSpec<AmqpClientMessageHandlerSpec, AmqpClientMessageHandler>
Spec for an 
AmqpClientMessageHandler.- Since:
- 7.0
- Author:
- Artem Bilan
- 
Field SummaryFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpeclogger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBeanOBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructorsConstructorDescriptionAmqpClientMessageHandlerSpec(AsyncAmqpTemplate amqpTemplate) Construct an instance with the providedAsyncAmqpTemplate.
- 
Method SummaryModifier and TypeMethodDescriptionSet an exchange for publishing a request message.exchangeExpression(String exchangeExpression) Set a SpEL expression to determine an exchange for publishing a request message at runtime.exchangeExpression(Expression exchangeExpression) Set a SpEL expression to determine exchange for publishing a request message at runtime.exchangeFunction(Function<Message<P>, String> exchangeFunction) Set a function to determine an exchange for publishing a request message at runtime.headerMapper(AmqpHeaderMapper headerMapper) Set anAmqpHeaderMapperto map request (and reply) headers.messageConverter(MessageConverter messageConverter) Set aMessageConverterto replace the defaultSimpleMessageConverter.Set a queue for publishing a request message.queueExpression(String queueExpression) Set a SpEL expression to determine a queue for publishing a request message at runtime.queueExpression(Expression queueExpression) Set a SpEL expression to determine a queue for publishing a request message at runtime.queueFunction(Function<Message<P>, String> queueFunction) Set a function to determine a queue for publishing a request message at runtime.replyPayloadType(Class<?> replyPayloadType) Set a reply payload type.replyPayloadType(ResolvableType replyPayloadType) Set a reply payload type.replyPayloadTypeExpression(String replyPayloadTypeExpression) Set a SpEL expression for the reply payload type.replyPayloadTypeExpression(Expression replyPayloadTypeExpression) Set a SpEL expression for the reply payload type.replyPayloadTypeFunction(Function<Message<P>, ?> replyPayloadTypeFunction) Set a function for the reply payload type.returnMessage(boolean returnMessage) Set to true to return the reply as a whole AMQP message.routingKey(String routingKey) Set a routing key for publishing a request message.routingKeyExpression(String routingKeyExpression) Set a SpEL expression to determine a routing key for publishing a request message at runtime.routingKeyExpression(Expression routingKeyExpression) Set a SpEL expression to determine routing key for publishing a request message at runtime.routingKeyFunction(Function<Message<P>, String> routingKeyFunction) Set a function to determine routing key for publishing a request message at runtime.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBeanisSingletonMethods inherited from interface org.springframework.context.SmartLifecycleisPauseable
- 
Constructor Details- 
AmqpClientMessageHandlerSpecConstruct an instance with the providedAsyncAmqpTemplate. TheAsyncAmqpTemplatemust be an implementation for AMQP 1.0 protocol, e.g.RabbitAmqpTemplate.- Parameters:
- amqpTemplate- the- AsyncAmqpTemplateto use.
 
 
- 
- 
Method Details- 
headerMapperSet anAmqpHeaderMapperto map request (and reply) headers.- Parameters:
- headerMapper- the- AmqpHeaderMapperto use.
- Returns:
- the spec
 
- 
messageConverterSet aMessageConverterto replace the defaultSimpleMessageConverter. If set to null, an AMQP message is sent as is into a message payload. And a reply message has to return an AMQP message as its payload.- Parameters:
- messageConverter- the- MessageConverterto use or null.
- Returns:
- the spec
 
- 
exchangeSet an exchange for publishing a request message. Mutually exclusive withqueue(String).- Parameters:
- exchange- the exchange to send a request message.
- Returns:
- the spec
 
- 
exchangeFunctionpublic <P> AmqpClientMessageHandlerSpec exchangeFunction(Function<Message<P>, String> exchangeFunction) Set a function to determine an exchange for publishing a request message at runtime. Mutually exclusive withqueue(String).- Parameters:
- exchangeFunction- the function to determine an exchange against a request message.
- Returns:
- the spec
 
- 
exchangeExpressionSet a SpEL expression to determine exchange for publishing a request message at runtime. Mutually exclusive withqueue(String).- Parameters:
- exchangeExpression- the SpEL expression to determine an exchange against a request message.
- Returns:
- the spec
 
- 
exchangeExpressionSet a SpEL expression to determine an exchange for publishing a request message at runtime. Mutually exclusive withqueue(String).- Parameters:
- exchangeExpression- the SpEL expression to determine an exchange against a request message.
- Returns:
- the spec
 
- 
routingKeySet a routing key for publishing a request message. Used only together withexchange(String).- Parameters:
- routingKey- the routing key to send a request message.
- Returns:
- the spec
 
- 
routingKeyFunctionpublic <P> AmqpClientMessageHandlerSpec routingKeyFunction(Function<Message<P>, String> routingKeyFunction) Set a function to determine routing key for publishing a request message at runtime. Mutually exclusive withqueue(String). Used only together withexchange(String).- Parameters:
- routingKeyFunction- the function to determine a routing key against a request message.
- Returns:
- the spec
 
- 
routingKeyExpressionSet a SpEL expression to determine a routing key for publishing a request message at runtime. Mutually exclusive withqueue(String). Used only together withexchange(String).- Parameters:
- routingKeyExpression- the SpEL expression to determine a routing key against a request message.
- Returns:
- the spec
 
- 
routingKeyExpressionSet a SpEL expression to determine routing key for publishing a request message at runtime. Mutually exclusive withqueue(String). Used only together withexchange(String).- Parameters:
- routingKeyExpression- the SpEL expression determine a routing key against a request message.
- Returns:
- the spec
 
- 
queueSet a queue for publishing a request message. Mutually exclusive withexchange(String).- Parameters:
- queue- the queue to send a request message.
- Returns:
- the spec
 
- 
queueExpressionSet a SpEL expression to determine a queue for publishing a request message at runtime. Mutually exclusive withexchange(String).- Parameters:
- queueExpression- the SpEL expression to determine a queue against a request message.
- Returns:
- the spec
 
- 
queueFunctionSet a function to determine a queue for publishing a request message at runtime. Mutually exclusive withexchange(String).- Parameters:
- queueFunction- the function to determine a queue against a request message.
- Returns:
- the spec
 
- 
queueExpressionSet a SpEL expression to determine a queue for publishing a request message at runtime. Mutually exclusive withexchange(String).- Parameters:
- queueExpression- the SpEL expression to determine a queue against a request message.
- Returns:
- the spec
 
- 
replyPayloadTypeSet a reply payload type. Used only in the gateway mode.- Parameters:
- replyPayloadType- the reply payload type.
- Returns:
- the spec
 
- 
replyPayloadTypeSet a reply payload type. Used only in the gateway mode.- Parameters:
- replyPayloadType- the reply payload type.
- Returns:
- the spec
 
- 
replyPayloadTypeExpressionSet a SpEL expression for the reply payload type. Used only in the gateway mode. Must be evaluated to aClassorResolvableType.- Parameters:
- replyPayloadTypeExpression- the expression for a reply payload type.
- Returns:
- the spec
 
- 
replyPayloadTypeFunctionpublic <P> AmqpClientMessageHandlerSpec replyPayloadTypeFunction(Function<Message<P>, ?> replyPayloadTypeFunction) Set a function for the reply payload type. Used only in the gateway mode. Must be evaluated to aClassorResolvableType.- Parameters:
- replyPayloadTypeFunction- the expression for a reply payload type.
- Returns:
- the spec
 
- 
replyPayloadTypeExpressionpublic AmqpClientMessageHandlerSpec replyPayloadTypeExpression(Expression replyPayloadTypeExpression) Set a SpEL expression for the reply payload type. Used only in the gateway mode. Must be evaluated to aClassorResolvableType.- Parameters:
- replyPayloadTypeExpression- the expression for a reply payload type.
- Returns:
- the spec
 
- 
returnMessageSet to true to return the reply as a whole AMQP message. Used only in the gateway mode.- Parameters:
- returnMessage- true to return the reply as a whole AMQP message.
- Returns:
- the spec
 
 
-