@Target(value=TYPE) @Retention(value=RUNTIME) @Documented public @interface MessagingGateway
<gateway/>
).Modifier and Type | Optional Element and Description |
---|---|
String |
asyncExecutor
|
GatewayHeader[] |
defaultHeaders
Provides custom message headers.
|
String |
defaultPayloadExpression
An expression that will be used to generate the
payload for all methods in the service interface
unless explicitly overridden by a method declaration. |
String |
defaultReplyChannel
Identifies default channel the gateway proxy will subscribe to to receive reply
Message s, which will then be
converted to the return type of the method signature. |
long |
defaultReplyTimeout
Allows to specify how long this gateway will wait for the reply
Message
before returning. |
String |
defaultRequestChannel
Identifies default channel the messages will be sent to upon invocation of methods of the gateway proxy.
|
long |
defaultRequestTimeout
Provides the amount of time dispatcher would wait to send a
Message . |
String |
errorChannel
Identifies a channel that error messages will be sent to if a failure occurs in the
gateway's proxy invocation.
|
String |
mapper
An
MethodArgsMessageMapper
to map the method arguments to a Message . |
String |
name
The value may indicate a suggestion for a logical component name,
to be turned into a Spring bean in case of an autodetected component.
|
public abstract String name
public abstract String defaultRequestChannel
public abstract String defaultReplyChannel
Message
s, which will then be
converted to the return type of the method signature.public abstract String errorChannel
errorChannel
reference is provided, the gateway will
propagate Exception
s to the caller. To completely suppress Exception
s, provide a
reference to the nullChannel
here.public abstract long defaultRequestTimeout
Message
.
This timeout would only apply if there is a potential to block in the send call.
For example if this gateway is hooked up to a QueueChannel
. public abstract long defaultReplyTimeout
Message
before returning. By default it will wait indefinitely. null
is returned
if the gateway times out.public abstract String asyncExecutor
Executor
to use for any of the interface methods that have a Future
return type.
This Executor
will only be used for those async methods; the sync methods
will be invoked in the caller's thread.public abstract String defaultPayloadExpression
payload
for all methods in the service interface
unless explicitly overridden by a method declaration. Variables include #args
, #methodName
,
#methodString
and #methodObject
;
a bean resolver is also available, enabling expressions like @someBean(#args)
.public abstract GatewayHeader[] defaultHeaders
public abstract String mapper
MethodArgsMessageMapper
to map the method arguments to a Message
. When this
is provided, no payload-expression
s or header
s are allowed; the custom mapper is
responsible for creating the message.