Annotation Type Splitter
@Target({METHOD,ANNOTATION_TYPE}) @Retention(RUNTIME) @Documented public @interface Splitter
Indicates that a method is capable of splitting a single message or message
payload to produce multiple messages or payloads.
A method annotated with @Splitter may accept a parameter of type
Message or of the expected
Message payload's type. Any type conversion supported by
SimpleTypeConverter will be applied to
the Message payload if necessary. Header values can also be passed as
Message parameters by using the
@Header parameter annotation.
Return values from the annotated method may be either a Collection or Array with elements of any type. If the type is not a Message, each will be used as the payload for creating a new Message.
- Author:
- Mark Fisher, Gary Russell, Artem Bilan
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String[]adviceChainSpecify a "chain" ofAdvicebeans that will "wrap" the message handler.StringapplySequenceSet this flag tofalseto prevent adding sequence related headers in this splitter.StringautoStartupTheSmartLifecycleautoStartupoption.StringinputChannelSpecify the channel from which this splitter will consume messages.StringoutputChannelSpecify the channel to which this splitter will send any replies.StringphaseSpecify aSmartLifecyclephaseoption.Poller[]pollerReactivereactiveStringsendTimeoutSpecify the maximum amount of time in milliseconds to wait when sending a replyMessageto theoutputChannel.
-
Element Details
-
inputChannel
String inputChannelSpecify the channel from which this splitter will consume messages. If the channel does not exist, aDirectChannelwith this name will be registered in the application context.- Returns:
- The channel name.
- Default:
- ""
-
outputChannel
String outputChannelSpecify the channel to which this splitter will send any replies.- Returns:
- The channel name.
- Default:
- ""
-
applySequence
String applySequenceSet this flag tofalseto prevent adding sequence related headers in this splitter. This can be convenient in cases where the set sequence numbers conflict with downstream custom aggregations. Whentrue, existing correlation and sequence related headers are pushed onto a stack; downstream components, such as aggregators may pop the stack to revert the existing headers after aggregation. Defaults totrue. Can be specified as 'property placeholder', e.g.${spring.integration.applySequence}.- Returns:
- the apply sequence flag.
- Default:
- ""
-
adviceChain
String[] adviceChainSpecify a "chain" ofAdvicebeans 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 replyMessageto theoutputChannel. Defaults to-1- blocking indefinitely. It is applied only if the output channel has some 'sending' limitations, e.g.QueueChannelwith fixed a 'capacity'. In this case aMessageDeliveryExceptionis thrown. The 'sendTimeout' is ignored in case ofAbstractSubscribableChannelimplementations. 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 autoStartupTheSmartLifecycleautoStartupoption. Can be specified as 'property placeholder', e.g.${foo.autoStartup}. Defaults totrue.- Returns:
- the auto startup
booleanflag.
- Default:
- ""
-
phase
String phaseSpecify aSmartLifecyclephaseoption. DefaultsInteger.MAX_VALUE / 2forPollingConsumerandInteger.MIN_VALUEforEventDrivenConsumer. Can be specified as 'property placeholder', e.g.${foo.phase}.- Returns:
- the
SmartLifecyclephase.
- Default:
- ""
-
poller
Poller[] poller- Returns:
- the
Polleroptions for a polled endpoint (PollerMetadata). This attribute is anarrayjust 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")
-