Annotation Type Transformer
@Target({METHOD,ANNOTATION_TYPE}) @Retention(RUNTIME) @Documented public @interface Transformer
Indicates that a method is capable of transforming a message, message header,
or message payload.
- Author:
- Mark Fisher, Gary Russell, Artem Bilan
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String[]
adviceChain
Specify a "chain" ofAdvice
objects that will "wrap" the message handler.String
autoStartup
TheSmartLifecycle
autoStartup
option.String
inputChannel
Specify the channel from which this transformer will consume messages.String
outputChannel
Specify the channel to which this transformer will send the transformed message.String
phase
Specify aSmartLifecycle
phase
option.Poller[]
poller
Reactive
reactive
String
sendTimeout
Specify the maximum amount of time in milliseconds to wait when sending a replyMessage
to theoutputChannel
.
-
Element Details
-
inputChannel
String inputChannelSpecify the channel from which this transformer will consume messages. If the channel does not exist, aDirectChannel
with this name will be registered in the application context.- Returns:
- The channel name.
- Default:
- ""
-
outputChannel
String outputChannelSpecify the channel to which this transformer will send the transformed message.- Returns:
- The channel name.
- Default:
- ""
-
adviceChain
String[] adviceChainSpecify a "chain" ofAdvice
objects that will "wrap" the message handler. Only the handler is advised, not the downstream flow.- Returns:
- the advice chain.
- Default:
- {}
-
sendTimeout
String sendTimeoutSpecify the maximum amount of time in milliseconds to wait when sending a replyMessage
to theoutputChannel
. Defaults to-1
- blocking indefinitely. It is applied only if the output channel has some 'sending' limitations, e.g.QueueChannel
with fixed a 'capacity'. In this case aMessageDeliveryException
is thrown. The 'sendTimeout' is ignored in case ofAbstractSubscribableChannel
implementations. Can be specified as 'property placeholder', e.g.${spring.integration.sendTimeout}
.- Returns:
- The timeout for sending results to the reply target (in milliseconds)
- Default:
- ""
-
autoStartup
String autoStartupTheSmartLifecycle
autoStartup
option. Can be specified as 'property placeholder', e.g.${foo.autoStartup}
. Defaults totrue
.- Returns:
- the auto startup
boolean
flag.
- Default:
- ""
-
phase
String phaseSpecify aSmartLifecycle
phase
option. DefaultsInteger.MAX_VALUE / 2
forPollingConsumer
andInteger.MIN_VALUE
forEventDrivenConsumer
. Can be specified as 'property placeholder', e.g.${foo.phase}
.- Returns:
- the
SmartLifecycle
phase.
- Default:
- ""
-
poller
Poller[] poller- Returns:
- the
Poller
options for a polled endpoint (PollerMetadata
). This attribute is anarray
just to allow an empty default (no poller). Mutually exclusive withreactive()
.
- Default:
- {}
-
reactive
Reactive reactive- Default:
- @org.springframework.integration.annotation.Reactive("\n\t\t\n\t\t\n\ue000\ue001\ue002\n\t\t\t\t\n")
-