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.
Modifier and Type | Method and Description |
---|---|
MuleMessage |
intercept(Invocation invocation)
Deprecated.
Invoked when the component should be called.
|
MuleMessage intercept(Invocation invocation) throws MuleException
Invocation.execute()
to call the component.invocation
- the invocation containing info about the current message and
serviceMuleException
- if the invocation failsCopyright © 2003–2013 MuleSource, Inc.. All rights reserved.