@Target(value={METHOD,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Inherited @Documented public @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.
MessagingGateway
Modifier and Type | Optional Element and Description |
---|---|
GatewayHeader[] |
headers |
String |
payloadExpression |
String |
replyChannel |
long |
replyTimeout |
String |
requestChannel |
long |
requestTimeout |
public abstract String requestChannel
public abstract String replyChannel
public abstract String payloadExpression
public abstract GatewayHeader[] headers