Package de.otto.synapse.annotation
Annotation Type MessageInterceptor
-
@Target(METHOD) @Retention(RUNTIME) @Documented public @interface MessageInterceptorAn annotation that marks a method to be used as aMessageInterceptor.The annotated method must expect a single argument with parameter type
TextMessage, orMessage<String>. The return type can either beTextmessage,Message<String>or void.MessageInterceptorscan be used asMessageFilter: If the annotated method is returningnull, the intercepted message will be dropped, without sending and/or processing it.Processing of
@MessageInterceptorannotations is performed by aMessageInterceptorBeanPostProcessorthat is auto-configured inSynapseAutoConfiguration.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringchannelNamePatternThe optional regexp pattern used to select channels by name.EndpointType[]endpointTypeThe optionalEndpointType(s) that will be intercepted.
-
-
-
-
endpointType
EndpointType[] endpointType
The optionalEndpointType(s) that will be intercepted.By default, both
EndpointType.SENDERandEndpointType.RECEIVERendpoints will be intercepted.- Returns:
- intercepted
EndpointType(s)
- Default:
- {de.otto.synapse.endpoint.EndpointType.SENDER, de.otto.synapse.endpoint.EndpointType.RECEIVER}
-
-