It is imperative that we understand the key concepts of interceptors before we proceed with writing one. Interceptors in Fuji are, in theory, based on the Aspect Oriented Programming(AOP) technique. They allow you to apply advice at a set of point cuts. The following key elements define interceptors in Fuji :
Interceptors are injected onto the message path and can intercept the Messages being exchanged on that path or the entire Message Exchange. So, interceptors can intercept the :
Let's go over each of these in detail.
Intercepting the Message Exchange
This gives the interceptor the most flexibility in altering the course of the message flow and it's content. An interceptor which intercepts a message exchange can
The updates need to be made within the limits of the Message Exchange Pattern Add MEP Link
The message exchange interceptor can short the message exchange, for example a interceptor intercepting the message exchange on the "in" message path, can set the "out" message on the exchange and short it ( we will see in the examples section how a exchange is "shorted"). When the message exchange is shorted this way, the message exchange is marked as "DONE" and sent back to the sender.
Intercepting the Message
Either the "in" or "out" message in the exchange can be intercepted. An interceptor that intercepts a message can
Intercepting the Message Payload
Either the "in" or "out" message in the exchange can be intercepted. An interceptor that intercepts a message can
"current message" refers to the message being exchanged on the message path when the interceptor is invoked.