|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ldap.server.interceptor.InterceptorChain
Manages the chain of Interceptor
s. InterceptorChain
is also an Interceptor
, and thus you can create hiararchical
interceptor structure to break down complex interceptors.
JndiProvider.invoke(Invocation)
redirects Invocation
s to process(NextInterceptor, Invocation)
and the chain starts.
Field Summary | |
static java.lang.String |
NEXT_INTERCEPTOR
The name of default interceptor that passes its control to the next interceptor in parent chain. |
Constructor Summary | |
InterceptorChain()
Create a new interceptor chain. |
Method Summary | |
void |
addAfter(java.lang.String baseName,
java.lang.String name,
Interceptor interceptor)
Adds the specified interceptor with the specified name just after the interceptor whose name is baseName in this chain. |
void |
addBefore(java.lang.String baseName,
java.lang.String name,
Interceptor interceptor)
Adds the specified interceptor with the specified name just before the interceptor whose name is baseName in this chain. |
void |
addFirst(java.lang.String name,
Interceptor interceptor)
Adds the specified interceptor with the specified name at the beginning of this chain. |
void |
addLast(java.lang.String name,
Interceptor interceptor)
Adds the specified interceptor with the specified name at the end of this chain. |
void |
clear()
Removes all interceptors added to this chain. |
void |
destroy()
Deinitializes all interceptors this chain contains. |
Interceptor |
get(java.lang.String name)
Returns the interceptor with the specified name . |
java.util.List |
getAll()
Returns the list of interceptors this chain in the order of evaluation. |
java.util.List |
getAllReversed()
Returns the list of interceptors this chain in the reversed order of evaluation. |
void |
init(InterceptorContext ctx)
Initializes all interceptors this chain contains. |
static InterceptorChain |
newDefaultChain()
Returns a new chain of default interceptors required to run core. |
void |
process(NextInterceptor nextInterceptor,
Invocation invocation)
Start invocation chain with the specified invocation. |
void |
remove(java.lang.String name)
Removes the interceptor with the specified name from this chain. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String NEXT_INTERCEPTOR
Constructor Detail |
public InterceptorChain()
Method Detail |
public static InterceptorChain newDefaultChain()
public void init(InterceptorContext ctx) throws javax.naming.NamingException
init
in interface Interceptor
ctx
- the configuration properties for this interceptor
javax.naming.NamingException
- if failed to initialize this interceptorpublic void destroy()
destroy
in interface Interceptor
public Interceptor get(java.lang.String name)
name
.
null
if there is no interceptor with the specified name
.public void addFirst(java.lang.String name, Interceptor interceptor)
public void addLast(java.lang.String name, Interceptor interceptor)
public void addBefore(java.lang.String baseName, java.lang.String name, Interceptor interceptor)
baseName
in this chain.
public void addAfter(java.lang.String baseName, java.lang.String name, Interceptor interceptor)
baseName
in this chain.
public void remove(java.lang.String name)
public void clear()
public void process(NextInterceptor nextInterceptor, Invocation invocation) throws javax.naming.NamingException
process
in interface Interceptor
nextInterceptor
- the next interceptor in the interceptor chaininvocation
- the invocation to process
javax.naming.NamingException
- if invocation failedpublic java.util.List getAll()
public java.util.List getAllReversed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |