Red Hat DocumentationFuse ESBToggle FramesPrintFeedback

Implementing the Interceptors Processing Logic

Interceptors are straightforward to implement. The bulk of their processing logic is in the handleMessage() method. This method receives the message data and manipulates it as needed. Developers may also want to add some special logic to handle fault processing cases.

Figure 3 shows the process flow through an interceptor.

Figure 3. Flow through an interceptor

Flow through an interceptor

In normal message processing, only the handleMessage() method is called. The handleMessage() method is where the interceptor's message processing logic is placed.

If an error occurs in the handleMessage() method of the interceptor, or any subsequent interceptor in the interceptor chain, the handleFault() method is called. The handleFault() method is useful for cleaning up after an interceptor in the event of an error. It can also be used to alter the fault message.

Comments powered by Disqus