|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Filters any directory operations. You can filter any Invocation
performed on BackingStore
s just like Servlet filters do.
NextInterceptor.process(Invocation)
. The flow control is returned
when the next interceptor's process(NextInterceptor, Invocation)
returns. You can therefore implement pre-, post-, around- invocation handler
by how you place the statement.
public void process( NextInterceptor nextInterceptor, Invocation invocation ) { System.out.println( "Starting invocation." ); nextInterceptor.process( invocation ); }
public void process( NextInterceptor nextInterceptor, Invocation invocation ) { nextInterceptor.process( invocation ); System.out.println( "Invocation ended." ); }
public void process( NextInterceptor nextInterceptor, Invocation invocation ) { long startTime = System.currentTimeMillis(); try { nextInterceptor.process( invocation ); } finally { long endTime = System.currentTimeMillis(); System.out.println( ( endTime - startTime ) + "ms elapsed." ); } }
Interceptor
or
Service
.interceptor
or ones that reflect its purpose would be a good
practice.
EnvKeys.INTERCEPTORS
and
InterceptorChain.newDefaultChain()
.
NextInterceptor
Method Summary | |
void |
destroy()
Deinitializes this interceptor. |
void |
init(InterceptorContext context)
Intializes this interceptor. |
void |
process(NextInterceptor nextInterceptor,
Invocation invocation)
Filters a particular invocation. |
Method Detail |
public void init(InterceptorContext context) throws javax.naming.NamingException
context
- the configuration properties for this interceptor
javax.naming.NamingException
- if failed to initialize this interceptorpublic void destroy()
public void process(NextInterceptor nextInterceptor, Invocation invocation) throws javax.naming.NamingException
nextInterceptor
by calling NextInterceptor.process(
org.apache.ldap.server.invocation.Invocation)
nextInterceptor
- the next interceptor in the interceptor chaininvocation
- the invocation to process
javax.naming.NamingException
- on failures while handling the invocation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |