LibraryToggle FramesPrintFeedback

All of the interceptors in Fuse Services Framework implement the base Interceptor interface shown in Example 2.1.


The Interceptor interface defines the two methods that a developer needs to implement for a custom interceptor:

handleMessage()

The handleMessage() method does most of the work in an interceptor. It is called on each interceptor in a message chain and receives the contents of the message being processed. Developers implement the message processing logic of the interceptor in this method. For detailed information about implementing the handleMessage() method, see Processing messages.

handleFault()

The handleFault() method is called on an interceptor when normal message processing has been interrupted. The runtime calls the handleFault() method of each invoked interceptor in reverse order as it unwinds an interceptor chain. For detailed information about implementing the handleFault() method, see Unwinding after an error.

Most interceptors do not directly implement the Interceptor interface. Instead, they implement the PhaseInterceptor interface shown in Example 2.2. The PhaseInterceptor interface adds four methods that allow an interceptor the participate in interceptor chains.


Comments powered by Disqus