Annotation Interface ServiceActivator
@Target({METHOD,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Documented
@Repeatable(ServiceActivators.class)
public @interface ServiceActivator
Indicates that a method is capable of handling a message or message payload.
 
 A method annotated with @ServiceActivator 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 of any type. If the return value is not a Message, a reply Message will be created with that object as its payload.
- Author:
- Mark Fisher, Gary Russell, Artem Bilan, Yilin Wei, Chris Bono
- 
Optional Element SummaryOptional ElementsModifier and TypeOptional ElementDescriptionString[]Specify a "chain" ofAdvicebeans that will "wrap" the message handler.Specify whether the service method is async.TheSmartLifecycleautoStartupoption.Specify the channel from which this service activator will consume messages.Specify the channel to which this service activator will send any replies.Specify aSmartLifecyclephaseoption.Specify whether the service method must return a non-null value.Specify the maximum amount of time in milliseconds to wait when sending a replyMessageto theoutputChannel.
- 
Element Details- 
inputChannelString inputChannelSpecify the channel from which this service activator will consume messages. If the channel does not exist, aDirectChannelwith this name will be registered in the application context.- Returns:
- The channel name.
 - Default:
- ""
 
- 
outputChannelString outputChannelSpecify the channel to which this service activator will send any replies.- Returns:
- The channel name.
 - Default:
- ""
 
- 
requiresReplyString requiresReplySpecify whether the service method must return a non-null value. This value isfalseby default, but if set totrue, aReplyRequiredExceptionwill is thrown when the underlying service method (or expression) returns a null value. Can be specified as 'property placeholder', e.g.${spring.integration.requiresReply}.- Returns:
- the requires reply flag.
 - Default:
- ""
 
- 
adviceChainString[] adviceChainSpecify a "chain" ofAdvicebeans that will "wrap" the message handler. Only the handler is advised, not the downstream flow.- Returns:
- the advice chain.
 - Default:
- {}
 
- 
sendTimeoutString sendTimeoutSpecify the maximum amount of time in milliseconds to wait when sending a replyMessageto theoutputChannel. Defaults to30seconds. 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:
- ""
 
- 
autoStartupString autoStartupTheSmartLifecycleautoStartupoption. Can be specified as 'property placeholder', e.g.${foo.autoStartup}. Defaults totrue.- Returns:
- the auto startup booleanflag.
 - Default:
- ""
 
- 
phaseString phaseSpecify aSmartLifecyclephaseoption. DefaultsInteger.MAX_VALUE / 2forPollingConsumerandInteger.MIN_VALUEforEventDrivenConsumer. Can be specified as 'property placeholder', e.g.${foo.phase}.- Returns:
- the SmartLifecyclephase.
 - Default:
- ""
 
- 
asyncString asyncSpecify whether the service method is async. This value isfalseby default.- Returns:
- the async flag.
 - Default:
- ""
 
- 
pollerPoller poller- Returns:
- the Polleroptions for a polled endpoint (PollerMetadata). Mutually exclusive withreactive().
 - Default:
- @org.springframework.integration.annotation.Poller("\n\t\t\n\t\t\n\ue000\ue001\ue002\n\t\t\t\t\n")
 
- 
reactiveReactive reactive- Default:
- @org.springframework.integration.annotation.Reactive("\n\t\t\n\t\t\n\ue000\ue001\ue002\n\t\t\t\t\n")
 
 
-