@Target(value=METHOD)
@Retention(value=RUNTIME)
@Documented
public @interface MessageInterceptor
MessageInterceptor.
The annotated method must expect a single argument with parameter type
TextMessage, or Message<String>. The return type can either be
Textmessage, Message<String> or void.
MessageInterceptors can be used as MessageFilter: If
the annotated method is returning null, the intercepted message will be dropped, without
sending and/or processing it.
Processing of @MessageInterceptor annotations is performed by
a MessageInterceptorBeanPostProcessor that is auto-configured in
SynapseAutoConfiguration.
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
channelNamePattern
The optional regexp pattern used to select channels by name.
|
EndpointType[] |
endpointType
The optional
EndpointType(s) that will be intercepted. |
public abstract java.lang.String channelNamePattern
By default, all channels will be intercepted.
public abstract EndpointType[] endpointType
EndpointType(s) that will be intercepted.
By default, both EndpointType.SENDER and EndpointType.RECEIVER endpoints will
be intercepted.
EndpointType(s)