Annotation Interface Gateway
GatewayProxyFactoryBean
 where the annotation attributes can override the default channel settings.
 A method annotated with @Gateway may accept a single non-annotated
 parameter of type Message
 or of the intended Message payload type. Method parameters may be mapped
 to individual Message header values by using the
 @Header
 parameter annotation. Alternatively, to pass the entire Message headers
 map, a Map-typed parameter may be annotated with
 Headers.
 
Return values from the annotated method may be of any type. If the
 declared return value is not a Message, the reply Message's payload will be
 returned and any type conversion as supported by Spring's
 SimpleTypeConverter will be applied to
 the return value if necessary.
 
Note: unlike @Publisher, this annotation is for exposing a Messaging Endpoint based on a Proxy for the marked interface method. The method invocation causes messaging interaction using an AOP Advice. Method parameters become the part of sent message (payload, headers). The method return value is the result (payload) of the messaging flow invoked by the Proxy.
- Author:
- Mark Fisher, Gary Russell, Artem Bilan
- See Also:
- 
Optional Element SummaryOptional ElementsModifier and TypeOptional ElementDescriptionSpecify additional headers that will be added to the request message.Specify a SpEL expression to determine the payload of the request message.Specify the channel from which reply messages will be received; overrides the encompassing gateway's default reply channel.longSpecify the time (ms) that the thread sending the request will wait for a reply.Specify a SpEL Expression to determine the time (ms) that the thread sending the request will wait for a reply.Specify the channel to which messages will be sent; overrides the encompassing gateway's default request channel.longSpecify the timeout (ms) when sending to the request channel - only applies if the send might block (such as a boundedQueueChannelthat is currently full.Specify a SpEL Expression to determine the timeout (ms) when sending to the request channel - only applies if the send might block (such as a boundedQueueChannelthat is currently full.
- 
Element Details- 
requestChannelString requestChannelSpecify the channel to which messages will be sent; overrides the encompassing gateway's default request channel.- Returns:
- the channel name.
 - Default:
- ""
 
- 
replyChannelString replyChannelSpecify the channel from which reply messages will be received; overrides the encompassing gateway's default reply channel.- Returns:
- the channel name.
 - Default:
- ""
 
- 
requestTimeoutlong requestTimeoutSpecify the timeout (ms) when sending to the request channel - only applies if the send might block (such as a boundedQueueChannelthat is currently full. Overrides the encompassing gateway's default request timeout.- Returns:
- the timeout.
- See Also:
 - Default:
- 30000L
 
- 
requestTimeoutExpressionString requestTimeoutExpressionSpecify a SpEL Expression to determine the timeout (ms) when sending to the request channel - only applies if the send might block (such as a boundedQueueChannelthat is currently full. Overrides the encompassing gateway's default request timeout. OverridesrequestTimeout().- Returns:
- the timeout.
- Since:
- 5.0
 - Default:
- ""
 
- 
replyTimeoutlong replyTimeoutSpecify the time (ms) that the thread sending the request will wait for a reply. The timer starts when the thread returns to the gateway, not when the request message is sent. Overrides the encompassing gateway's default reply timeout.- Returns:
- the timeout.
- See Also:
 - Default:
- 30000L
 
- 
replyTimeoutExpressionString replyTimeoutExpressionSpecify a SpEL Expression to determine the time (ms) that the thread sending the request will wait for a reply. The timer starts when the thread returns to the gateway, not when the request message is sent. Overrides the encompassing gateway's default reply timeout. OverridesreplyTimeout().- Returns:
- the timeout.
- Since:
- 5.0
 - Default:
- ""
 
- 
payloadExpressionString payloadExpressionSpecify a SpEL expression to determine the payload of the request message.- Returns:
- the expression.
 - Default:
- ""
 
- 
headersGatewayHeader[] headersSpecify additional headers that will be added to the request message.- Returns:
- the headers.
 - Default:
- {}
 
 
-