org.mule.interceptors
Class InterceptorStack

java.lang.Object
  extended byorg.mule.interceptors.InterceptorStack
All Implemented Interfaces:
Disposable, Initialisable, UMOInterceptor, UMOInterceptorStack

public class InterceptorStack
extends Object
implements UMOInterceptorStack, Initialisable, Disposable

Maintains a list of interceptors that can be applied to components

Version:
$Revision: 7976 $
Author:
Guillaume Nodet

Constructor Summary
InterceptorStack()
           
InterceptorStack(List interceptors)
           
 
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
 List getInterceptors()
           
 void initialise()
          Method used to perform any initialisation work.
 UMOMessage intercept(Invocation invocation)
          Invoked by the previous interceptor in the chain
 void setInterceptors(List interceptors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterceptorStack

public InterceptorStack()

InterceptorStack

public InterceptorStack(List interceptors)
Method Detail

intercept

public UMOMessage intercept(Invocation invocation)
                     throws UMOException
Description copied from interface: UMOInterceptor
Invoked by the previous interceptor in the chain

Specified by:
intercept in interface UMOInterceptor
Parameters:
invocation - the invocation containing info about the current message and component
Returns:
A result message that may have been altered by this invocation
Throws:
UMOException - if the invocation fails

getInterceptors

public List getInterceptors()
Specified by:
getInterceptors in interface UMOInterceptorStack

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

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


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