Package org.apache.cxf.phase
Class AbstractPhaseInterceptor<T extends Message>
java.lang.Object
org.apache.cxf.phase.AbstractPhaseInterceptor<T>
- All Implemented Interfaces:
- Interceptor<T>,- PhaseInterceptor<T>
- Direct Known Subclasses:
- AbstractAuthorizingInInterceptor,- AbstractInDatabindingInterceptor,- AbstractLoggingInterceptor,- AbstractOutDatabindingInterceptor,- AbstractSecurityContextInInterceptor,- AbstractValidationInterceptor,- AbstractXSLTInterceptor,- AttachmentInInterceptor,- AttachmentOutInterceptor,- AttachmentOutInterceptor.AttachmentOutEndingInterceptor,- DelegatingAuthenticationInterceptor,- DepthRestrictingStreamInterceptor,- FaultOutInterceptor,- FIStaxInInterceptor,- FIStaxOutInterceptor,- GZIPInInterceptor,- GZIPOutInterceptor,- JAASLoginInterceptor,- MAPAggregator,- MessageSenderInterceptor,- MessageSenderInterceptor.MessageSenderEndingInterceptor,- OneWayProcessorInterceptor,- OutgoingChainInterceptor,- ServiceInvokerInterceptor,- StaxInEndingInterceptor,- StaxInInterceptor,- StaxOutEndingInterceptor,- StaxOutInterceptor,- StaxSchemaValidationInInterceptor,- StaxSchemaValidationOutInterceptor,- TransformInInterceptor,- TransformOutInterceptor
public abstract class AbstractPhaseInterceptor<T extends Message>
extends Object
implements PhaseInterceptor<T>
Provides a starting point implementation for a interceptors that
 participate in phased message processing. Developers should extend from
 this class when implementing custom interceptors.
 Developers need to provide an implementation for handleMessage() and
 can override the handleFault() implementation. They should not override
 the other methods.
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractPhaseInterceptor(String phase) Instantiates the interceptor to live in a specified phase.AbstractPhaseInterceptor(String phase, boolean uniqueId) Instantiates the interceptor and specifies if it gets a system determined unique id.Instantiates the interceptor with a specified id.AbstractPhaseInterceptor(String i, String p, boolean uniqueId) Instantiates the interceptor with a specified id or with a system determined unique id.
- 
Method SummaryModifier and TypeMethodDescriptionvoidSpecifies that the current interceptor needs to be added to the interceptor chain after the specified interceptor.voidaddAfter(Collection<String> i) Specifies that the current interceptor needs to be added to the interceptor chain after the specified collection of interceptors.voidSpecifies that the current interceptor needs to be added to the interceptor chain before the specified interceptor.voidSpecifies that the current interceptor needs to be added to the interceptor chain before the specified collection of interceptors.Collection<PhaseInterceptor<? extends Message>>Returns a collection of Interceptors that should be added to the chain whenever this interceptor is added.getAfter()Returns a set containing the IDs of the interceptors that should be executed before this interceptor.Returns a set containing the IDs of the interceptors that should be executed after this interceptor.final StringgetId()Returns the ID of this interceptor.final StringgetPhase()Returns the phase in which this interceptor is excecuted.voidhandleFault(T message) Called for all interceptors (in reverse order) on which handleMessage had been successfully invoked, when normal execution of the chain was aborted for some reason.booleanprotected booleanisRequestor(T message) Determine if current messaging role is that of requestor.voidsetAfter(Collection<String> i) Specifies that the current interceptor needs to be added to the interceptor chain after the specified collection of interceptors.voidSpecifies that the current interceptor needs to be added to the interceptor chain before the specified collection of interceptors.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cxf.interceptor.InterceptorhandleMessage
- 
Constructor Details- 
AbstractPhaseInterceptorInstantiates the interceptor to live in a specified phase. The interceptor's id will be set to the name of the implementing class.- Parameters:
- phase- the interceptor's phase
 
- 
AbstractPhaseInterceptorInstantiates the interceptor with a specified id.- Parameters:
- i- the interceptor's id
- p- the interceptor's phase
 
- 
AbstractPhaseInterceptorInstantiates the interceptor and specifies if it gets a system determined unique id. IfuniqueIdis set to true the interceptor's id will be determined by the runtime. IfuniqueIdis set to false, the implementing class' name is used as the id.- Parameters:
- phase- the interceptor's phase
- uniqueId- true to have a unique ID generated
 
- 
AbstractPhaseInterceptorInstantiates the interceptor with a specified id or with a system determined unique id. The specified id will be used unlessuniqueIdis set to true.- Parameters:
- i- the interceptor's id
- p- the interceptor's phase
- uniqueId-
 
 
- 
- 
Method Details- 
setBeforeSpecifies that the current interceptor needs to be added to the interceptor chain before the specified collection of interceptors. This method replaces any existing list with the provided list.- Parameters:
- i- a collection of interceptor ids
 
- 
setAfterSpecifies that the current interceptor needs to be added to the interceptor chain after the specified collection of interceptors. This method replaces any existing list with the provided list.- Parameters:
- i- a collection of interceptor ids
 
- 
addBeforeSpecifies that the current interceptor needs to be added to the interceptor chain before the specified collection of interceptors.- Parameters:
- i- a collection of interceptor ids
 
- 
addAfterSpecifies that the current interceptor needs to be added to the interceptor chain after the specified collection of interceptors.- Parameters:
- i- a collection of interceptor ids
 
- 
addBeforeSpecifies that the current interceptor needs to be added to the interceptor chain before the specified interceptor.- Parameters:
- i- an interceptor id
 
- 
addAfterSpecifies that the current interceptor needs to be added to the interceptor chain after the specified interceptor.- Parameters:
- i- an interceptor id
 
- 
getAfterDescription copied from interface:PhaseInterceptorReturns a set containing the IDs of the interceptors that should be executed before this interceptor. This interceptor will be placed in the chain after the interceptors in the set.- Specified by:
- getAfterin interface- PhaseInterceptor<T extends Message>
- Returns:
- the IDs of the interceptors
 
- 
getBeforeDescription copied from interface:PhaseInterceptorReturns a set containing the IDs of the interceptors that should be executed after this interceptor. This interceptor will be placed in the inteceptor chain before the interceptors in the set.- Specified by:
- getBeforein interface- PhaseInterceptor<T extends Message>
- Returns:
- the ids of the interceptors
 
- 
getAdditionalInterceptorsDescription copied from interface:PhaseInterceptorReturns a collection of Interceptors that should be added to the chain whenever this interceptor is added. May return null.- Specified by:
- getAdditionalInterceptorsin interface- PhaseInterceptor<T extends Message>
- Returns:
- the collection of interceptors
 
- 
getIdDescription copied from interface:PhaseInterceptorReturns the ID of this interceptor.- Specified by:
- getIdin interface- PhaseInterceptor<T extends Message>
- Returns:
- the ID
 
- 
getPhaseDescription copied from interface:PhaseInterceptorReturns the phase in which this interceptor is excecuted.- Specified by:
- getPhasein interface- PhaseInterceptor<T extends Message>
- Returns:
- the phase
 
- 
handleFaultDescription copied from interface:InterceptorCalled for all interceptors (in reverse order) on which handleMessage had been successfully invoked, when normal execution of the chain was aborted for some reason.- Specified by:
- handleFaultin interface- Interceptor<T extends Message>
 
- 
isGET
- 
isRequestorDetermine if current messaging role is that of requestor.- Parameters:
- message- the current Message
- Returns:
- true if the current messaging role is that of requestor
 
 
-