Annotation Interface InboundChannelAdapter
@Target({METHOD,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Documented
@Repeatable(InboundChannelAdapters.class)
public @interface InboundChannelAdapter
Indicates that a method is capable of producing a
Message
or Message
payload
.
A method annotated with @InboundChannelAdapter
can't accept any parameters.
Return values from the annotated method may be of any type. If the return
value is not a Message
, a Message
will be created with that object as its payload
.
The result Message
will be sent to the provided value()
.
@InboundChannelAdapter
is an analogue of <int:inbound-channel-adapter/>
. With that
the PollerMetadata
is required to initiate
the method invocation. Or poller()
should be provided, or the
PollerMetadata.DEFAULT_POLLER
bean has to be configured
in the application context.
- Since:
- 4.0
- Author:
- Artem Bilan, Gary Russell, Chris Bono
-
Optional Element Summary
-
Element Details
-
value
Alias for thechannel()
attribute.- Returns:
- the 'channel' bean name to send the
Message
.
- Default:
- ""
-
channel
- Returns:
- the 'channel' bean name to send the
Message
. - Since:
- 4.2.6
- Default:
- ""
-
autoStartup
String autoStartupSmartLifecycle
options. Can be specified as 'property placeholder', e.g.${foo.autoStartup}
.- Returns:
- if the channel adapter is started automatically or not.
- Default:
- "true"
-
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
). NOTE: aPoller
here hasPoller.maxMessagesPerPoll()
set to 1 by default.
- Default:
- @org.springframework.integration.annotation.Poller("\n\t\t\n\t\t\n\ue000\ue001\ue002\n\t\t\t\t\n")
-