Package de.otto.synapse.annotation
Annotation Interface MessageInterceptor
An annotation that marks a method to be used as a
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.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe optional regexp pattern used to select channels by name.The optionalEndpointType(s) that will be intercepted.
-
Element Details
-
channelNamePattern
String channelNamePatternThe optional regexp pattern used to select channels by name.By default, all channels will be intercepted.
- Returns:
- regexp
- Default:
- ".*"
-
endpointType
EndpointType[] endpointTypeThe optionalEndpointType(s) that will be intercepted.By default, both
EndpointType.SENDERandEndpointType.RECEIVERendpoints will be intercepted.- Returns:
- intercepted
EndpointType(s)
- Default:
- {SENDER, RECEIVER}
-