@Target(value={METHOD,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Documented public @interface Filter
A method annotated with @Filter may accept a parameter of type
Message
or of the expected
Message payload's type. Any type conversion supported by default or any
Converters registered with the "integrationConversionService" bean will be
applied to the Message payload if necessary. Header values can also be passed
as Message parameters by using the
@Header
parameter annotation.
The return type of the annotated method must be a boolean (or Boolean).
Modifier and Type | Optional Element and Description |
---|---|
String[] |
adviceChain |
String |
autoStartup
The
SmartLifecycle autoStartup option. |
String |
discardChannel |
String |
discardWithinAdvice
When
true (default) any discard action (and exception thrown) will occur
within the scope of the advice class(es) in the chain. |
String |
inputChannel |
String |
outputChannel |
String |
phase
Specify a
SmartLifecycle phase option. |
Poller[] |
poller |
String |
sendTimeout
Specify the maximum amount of time in milliseconds to wait when sending a reply
Message to the outputChannel() . |
String |
throwExceptionOnRejection
Throw an exception if the filter rejects the message.
|
public abstract String inputChannel
public abstract String outputChannel
public abstract String discardChannel
public abstract String throwExceptionOnRejection
false
.
Can be specified as 'property placeholder', e.g. ${spring.integration.throwExceptionOnRejection}
.public abstract String[] adviceChain
public abstract String discardWithinAdvice
true
(default) any discard action (and exception thrown) will occur
within the scope of the advice class(es) in the chain. Otherwise, these actions
will occur after the advice chain returns.
Can be specified as 'property placeholder', e.g. ${spring.integration.discardWithinAdvice}
.public abstract String sendTimeout
Message
to the outputChannel()
.
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 a MessageDeliveryException
is thrown.
The 'sendTimeout' is ignored in case of
AbstractSubscribableChannel
implementations.
Can be specified as 'property placeholder', e.g. ${spring.integration.sendTimeout}
.public abstract String autoStartup
SmartLifecycle
autoStartup
option.
Can be specified as 'property placeholder', e.g. ${foo.autoStartup}
.
Defaults to true
.boolean
flag.public abstract String phase
SmartLifecycle
phase
option.
Defaults 0
for PollingConsumer
and Integer.MIN_VALUE
for EventDrivenConsumer
.
Can be specified as 'property placeholder', e.g. ${foo.phase}
.SmartLifecycle
phase.public abstract Poller[] poller
Poller
options for a polled endpoint
(PollerMetadata
).
This attribute is an array
just to allow an empty default (no poller).
Only one Poller
element is allowed.