public abstract class AbstractPhaseInterceptor<T extends Message> extends Object implements PhaseInterceptor<T>
Constructor and Description |
---|
AbstractPhaseInterceptor(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.
|
AbstractPhaseInterceptor(String i,
String p)
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.
|
Modifier and Type | Method and Description |
---|---|
void |
addAfter(Collection<String> i)
Specifies that the current interceptor needs to be added to the
interceptor chain after the specified collection of interceptors.
|
void |
addAfter(String i)
Specifies that the current interceptor needs to be added to the
interceptor chain after the specified interceptor.
|
void |
addBefore(Collection<String> i)
Specifies that the current interceptor needs to be added to the
interceptor chain before the specified collection of interceptors.
|
void |
addBefore(String i)
Specifies that the current interceptor needs to be added to the
interceptor chain before the specified interceptor.
|
Collection<PhaseInterceptor<? extends Message>> |
getAdditionalInterceptors()
Returns a collection of Interceptors that should be added to the chain
whenever this interceptor is added.
|
Set<String> |
getAfter()
Returns a set containing the IDs of the interceptors that should be
executed before this interceptor.
|
Set<String> |
getBefore()
Returns a set containing the IDs of the interceptors that should be
executed after this interceptor.
|
String |
getId()
Returns the ID of this interceptor.
|
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(Collection<String> i)
Specifies that the current interceptor needs to be added to the
interceptor chain after the specified collection of interceptors.
|
void |
setBefore(Collection<String> i)
Specifies that the current interceptor needs to be added to the
interceptor chain before the specified collection of interceptors.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleMessage
public AbstractPhaseInterceptor(String phase)
phase
- the interceptor's phasepublic AbstractPhaseInterceptor(String i, String p)
i
- the interceptor's idp
- the interceptor's phasepublic AbstractPhaseInterceptor(String phase, boolean uniqueId)
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.phase
- the interceptor's phaseuniqueId
- true to have a unique ID generatedpublic AbstractPhaseInterceptor(String i, String p, boolean uniqueId)
uniqueId
is set to true.i
- the interceptor's idp
- the interceptor's phaseuniqueId
- public void setBefore(Collection<String> i)
i
- a collection of interceptor idspublic void setAfter(Collection<String> i)
i
- a collection of interceptor idspublic void addBefore(Collection<String> i)
i
- a collection of interceptor idspublic void addAfter(Collection<String> i)
i
- a collection of interceptor idspublic void addBefore(String i)
i
- an interceptor idpublic void addAfter(String i)
i
- an interceptor idpublic final Set<String> getAfter()
PhaseInterceptor
getAfter
in interface PhaseInterceptor<T extends Message>
public final Set<String> getBefore()
PhaseInterceptor
getBefore
in interface PhaseInterceptor<T extends Message>
public Collection<PhaseInterceptor<? extends Message>> getAdditionalInterceptors()
PhaseInterceptor
getAdditionalInterceptors
in interface PhaseInterceptor<T extends Message>
public final String getId()
PhaseInterceptor
getId
in interface PhaseInterceptor<T extends Message>
public final String getPhase()
PhaseInterceptor
getPhase
in interface PhaseInterceptor<T extends Message>
public void handleFault(T message)
Interceptor
handleFault
in interface Interceptor<T extends Message>
public boolean isGET(T message)
protected boolean isRequestor(T message)
message
- the current MessageCopyright © 2016 JBoss by Red Hat. All rights reserved.