Back to Fuji Interceptors, or Fuji Interceptors Info
| At line 49 changed 1 line. |
| public MessageExchange bar(MessageExchange exchange) |
| public MessageExchange someInterceptorMethod(MessageExchange exchange) |
| At line 55 changed 1 line. |
| public void bar(Properties msgProperties) |
| public void myInterceptorMethod(Properties msgProperties) |
| At line 61 changed 1 line. |
| The scope |
| The interceptor methods in the example above are invoked on each message exchange, this might be overwhelming for the interceptor. The scope of the interception can be limited by specifying additional properties on the Intercept annotation, these being : provider, consumer, message and service. |
| At line 64 added 26 lines. |
| The following interceptor method is invoked when the message being exchanged is from provider "p1" providing a service "s1" to consumer "c1" |
| {{{ |
| @Intercept (provider="p1", consumer="c1", service="s1") |
| public void myInterceptorMethod(Properties msgProperties) |
| }}} |
| If an annotation property is not specified, it implies "*" i.e. all. |
| !! Interceptor priority : |
| Since there will be many such interceptor methods defined, and one interceptor might need to be called before another. For example a message needs to be decrypted befor validating the signature, in this case a higher priority can be assigned to the decryption interceptor method, by specifying the priority on the Intercept Annotation : |
| Eaxmple : |
| {{{ |
| @Intercept (priority="10") |
| public ServiceMessage decrypt(ServiceMessage message) |
| @Intercept (priority="9") |
| public ServiceMessage validateSignature(ServiceMessage message) |
| throws Exception; |
| }}} |