org.mule.interceptor
Class InterceptorStack
java.lang.Object
org.mule.interceptor.InterceptorStack
- All Implemented Interfaces:
- Interceptor, Disposable, Initialisable
public class InterceptorStack
- extends Object
- implements Interceptor, Initialisable, Disposable
Maintains a list of interceptors that can be applied to components.
InterceptorStack
public InterceptorStack()
InterceptorStack
public InterceptorStack(List interceptors)
intercept
public MuleMessage intercept(Invocation invocation)
throws MuleException
- Description copied from interface:
Interceptor
- Invoked when the component should be called. The implementation can call
Invocation#execute()
to call the component.
- Specified by:
intercept
in interface Interceptor
- 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
getInterceptors
public List getInterceptors()
setInterceptors
public void setInterceptors(List interceptors)
initialise
public void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
- Specified by:
initialise
in interface Initialisable
- Throws:
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
dispose
public void dispose()
- Description copied from interface:
Disposable
- A lifecycle method where implementor should free up any resources. If an
exception is thrown it should just be logged and processing should continue.
This method should not throw Runtime exceptions.
- Specified by:
dispose
in interface Disposable
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.