Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Apache CXF API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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>

    public abstract class AbstractPhaseInterceptor<T extends Message>

extends java.lang.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 overide the handleFault() implementation. They should not overide the other methods.

Constructor Summary
`AbstractPhaseInterceptor(java.lang.String phase)` Instantiates the interceptor to live in a specified phase.
`AbstractPhaseInterceptor(java.lang.String phase, boolean uniqueId)` Instantiates the interceptor and specifies if it gets a system determined unique id.
`AbstractPhaseInterceptor(java.lang.String i, java.lang.String p)` Instantiates the interceptor with a specified id.
`AbstractPhaseInterceptor(java.lang.String i, java.lang.String p, boolean uniqueId)` Instantiates the interceptor with a specified id or with a system determined unique id.

Method Summary
`void` | `addAfter(java.util.Collection<java.lang.String> i)` Specifies that the current interceptor needs to be added to the interceptor chain after the specified collection of interceptors.
`void` | `addAfter(java.lang.String i)` Specifies that the current interceptor needs to be added to the interceptor chain after the specified interceptor.
`void` | `addBefore(java.util.Collection<java.lang.String> i)` Specifies that the current interceptor needs to be added to the interceptor chain before the specified collection of interceptors.
`void` | `addBefore(java.lang.String i)` Specifies that the current interceptor needs to be added to the interceptor chain before the specified interceptor.
`java.util.Set<java.lang.String>` | `getAfter()` Returns a set containing the IDs of the interceptors that should be executed before this interceptor.
`java.util.Set<java.lang.String>` | `getBefore()` Returns a set containing the IDs of the interceptors that should be executed after this interceptor.
`java.lang.String` | `getId()` Returns the ID of this interceptor.
`java.lang.String` | `getPhase()` Returns the phase in which this interceptor is excecuted.
`void` | `handleFault(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.
`boolean` | `isGET(T message)`
`protected boolean` | `isRequestor(T message)` Determine if current messaging role is that of requestor.
`void` | `setAfter(java.util.Collection<java.lang.String> i)` Specifies that the current interceptor needs to be added to the interceptor chain after the specified collection of interceptors.
`void` | `setBefore(java.util.Collection<java.lang.String> i)` Specifies that the current interceptor needs to be added to the interceptor chain before the specified collection of interceptors.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.cxf.interceptor.Interceptor
`handleMessage`

Constructor Detail

### AbstractPhaseInterceptor

    public AbstractPhaseInterceptor(java.lang.String phase)

  Instantiates 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

### AbstractPhaseInterceptor

    public AbstractPhaseInterceptor(java.lang.String i,
                                    java.lang.String p)

  Instantiates the interceptor with a specified id.

  Parameters:
    `i` - the interceptor's id
    `p` - the interceptor's phase

### AbstractPhaseInterceptor

    public AbstractPhaseInterceptor(java.lang.String phase,
                                    boolean uniqueId)

  Instantiates the interceptor and specifies if it gets a system determined unique id. If `uniqueId` is set to true the interceptor's id will be determined by the runtime. If `uniqueId` is set to false, the implementing class' name is used as the id.

  Parameters:
    `p` - the interceptor's phase
    `uniqueId` -

### AbstractPhaseInterceptor

    public AbstractPhaseInterceptor(java.lang.String i,
                                    java.lang.String p,
                                    boolean uniqueId)

  Instantiates the interceptor with a specified id or with a system determined unique id. The specified id will be used unless `uniqueId` is set to true.

  Parameters:
    `i` - the interceptor's id
    `p` - the interceptor's phase
    `uniqueId` -

Method Detail

### setBefore

    public void setBefore(java.util.Collection<java.lang.String> i)

  Specifies 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

### setAfter

    public void setAfter(java.util.Collection<java.lang.String> i)

  Specifies 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

### addBefore

    public void addBefore(java.util.Collection<java.lang.String> i)

  Specifies 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

### addAfter

    public void addAfter(java.util.Collection<java.lang.String> i)

  Specifies 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

### addBefore

    public void addBefore(java.lang.String i)

  Specifies that the current interceptor needs to be added to the interceptor chain before the specified interceptor.

  Parameters:
    `i` - an interceptor id

### addAfter

    public void addAfter(java.lang.String i)

  Specifies that the current interceptor needs to be added to the interceptor chain after the specified interceptor.

  Parameters:
    `i` - an interceptor id

### getAfter

    public final java.util.Set<java.lang.String> getAfter()

  Description copied from interface: `PhaseInterceptor`
  Returns 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:
    `getAfter` in interface `PhaseInterceptor<T extends Message>`
  Returns:
    the IDs of the interceptors

### getBefore

    public final java.util.Set<java.lang.String> getBefore()

  Description copied from interface: `PhaseInterceptor`
  Returns 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:
    `getBefore` in interface `PhaseInterceptor<T extends Message>`
  Returns:
    the ids of the interceptors

### getId

    public final java.lang.String getId()

  Description copied from interface: `PhaseInterceptor`
  Returns the ID of this interceptor.

  Specified by:
    `getId` in interface `PhaseInterceptor<T extends Message>`
  Returns:
    the ID

### getPhase

    public final java.lang.String getPhase()

  Description copied from interface: `PhaseInterceptor`
  Returns the phase in which this interceptor is excecuted.

  Specified by:
    `getPhase` in interface `PhaseInterceptor<T extends Message>`
  Returns:
    the phase

### handleFault

    public void handleFault(T message)

  Description copied from interface: `Interceptor`
  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.

  Specified by:
    `handleFault` in interface `Interceptor<T extends Message>`

### isGET

    public boolean isGET(T message)

### isRequestor

    protected boolean isRequestor(T message)

  Determine if current messaging role is that of requestor.

  Parameters:
    `message` - the current Message
  Returns:
    true if the current messaging role is that of requestor

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Apache CXF API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Apache CXF