org.apache.cxf.phase
Class PhaseInterceptorChain
java.lang.Object
org.apache.cxf.phase.PhaseInterceptorChain
- All Implemented Interfaces:
- java.lang.Iterable<Interceptor<? extends Message>>, InterceptorChain
public class PhaseInterceptorChain
- extends java.lang.Object
- implements InterceptorChain
A PhaseInterceptorChain orders Interceptors according to the phase they
participate in and also according to the before & after properties on an
Interceptor.
A List of phases is supplied to the PhaseInterceptorChain in the constructor.
This class is typically instantiated from the PhaseChainCache class in this
package. Interceptors that are added to the chain are ordered by phase.
Within a phase, interceptors can order themselves. Each PhaseInterceptor
has an ID. PhaseInterceptors can supply a Collection of IDs which they
should run before or after, supplying fine grained ordering.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PhaseInterceptorChain
public PhaseInterceptorChain(java.util.SortedSet<Phase> ps)
cloneChain
public PhaseInterceptorChain cloneChain()
add
public void add(java.util.Collection<Interceptor> newhandlers)
- Specified by:
add in interface InterceptorChain
add
public void add(java.util.Collection<Interceptor> newhandlers,
boolean force)
add
public void add(Interceptor i)
- Specified by:
add in interface InterceptorChain
add
public void add(Interceptor i,
boolean force)
pause
public void pause()
- Specified by:
pause in interface InterceptorChain
resume
public void resume()
- Specified by:
resume in interface InterceptorChain
doIntercept
public boolean doIntercept(Message message)
- Intercept a message, invoking each phase's handlers in turn.
- Specified by:
doIntercept in interface InterceptorChain
- Parameters:
message - the message
- Throws:
java.lang.Exception
doInterceptStartingAfter
public boolean doInterceptStartingAfter(Message message,
java.lang.String startingAfterInterceptorID)
- Intercept a message, invoking each phase's handlers in turn,
starting after the specified interceptor.
- Specified by:
doInterceptStartingAfter in interface InterceptorChain
- Parameters:
message - the messagestartingAfterInterceptorID - the id of the interceptor
- Throws:
java.lang.Exception
doInterceptStartingAt
public boolean doInterceptStartingAt(Message message,
java.lang.String startingAtInterceptorID)
- Intercept a message, invoking each phase's handlers in turn,
starting at the specified interceptor.
- Specified by:
doInterceptStartingAt in interface InterceptorChain
- Parameters:
message - the messagestartingAtInterceptorID - the id of the interceptor
- Throws:
java.lang.Exception
reset
public void reset()
- Specified by:
reset in interface InterceptorChain
remove
public void remove(Interceptor i)
- Specified by:
remove in interface InterceptorChain
abort
public void abort()
- Specified by:
abort in interface InterceptorChain
iterator
public java.util.Iterator<Interceptor<? extends Message>> iterator()
- Specified by:
iterator in interface java.lang.Iterable<Interceptor<? extends Message>>
getIterator
public java.util.ListIterator<Interceptor<? extends Message>> getIterator()
- Specified by:
getIterator in interface InterceptorChain
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getFaultObserver
public MessageObserver getFaultObserver()
- Specified by:
getFaultObserver in interface InterceptorChain
setFaultObserver
public void setFaultObserver(MessageObserver faultObserver)
- Specified by:
setFaultObserver in interface InterceptorChain
Apache CXF