org.mule.api.interceptor
Interface Interceptor

All Known Subinterfaces:
LifecycleAdapter
All Known Implementing Classes:
DefaultLifecycleAdapter

Deprecated. - This is only used for backwards compatability with old style (Mule 1.x) interceptors

public interface Interceptor

Interceptor is based on a similar concept of servlet filters and works much the same way. This method is more commonally known as the interceptor pattern and it allows for pre and processing of invocations on the object being intercepted.

In 2.x this is deprecated, but we provide an adapter, in the Spring Extras package, to help use old implementations. There is one significant change, however - because the interception is now "lower" in the call chain, Invocation.execute() returns an Object rather than a MuleMessage. To simplify handling this, the adapter we provide will construct a suitable MuleMessage for you if you return null.


Method Summary
 MuleMessage intercept(Invocation invocation)
          Deprecated. Invoked when the component should be called.
 

Method Detail

intercept

MuleMessage intercept(Invocation invocation)
                      throws MuleException
Deprecated. 
Invoked when the component should be called. The implementation can call Invocation.execute() to call the component.

Parameters:
invocation - the invocation containing info about the current message and service
Returns:
A result message that may have been altered by this invocation
Throws:
MuleException - if the invocation fails


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.