public interface Interceptor
DefaultPartitionNexus
. Interceptor
filters most method calls performed on DefaultPartitionNexus
just
like Servlet filters do.
NextInterceptor
. The flow control is returned when the next
interceptor's filter method returns. You can therefore implement pre-, post-,
around- invocation handler by how you place the statement. Otherwise, you
can transform the invocation into other(s).
public void delete( NextInterceptor nextInterceptor, Name name ) { System.out.println( "Starting invocation." ); nextInterceptor.delete( name ); }
public void delete( NextInterceptor nextInterceptor, Name name ) { nextInterceptor.delete( name ); System.out.println( "Invocation ended." ); }
public void delete( NextInterceptor nextInterceptor, Name name ) { long startTime = System.currentTimeMillis(); try { nextInterceptor.delete( name ); } finally { long endTime = System.currentTimeMillis(); System.out.println( ( endTime - startTime ) + "ms elapsed." ); } }
public void delete( NextInterceptor nextInterceptor, Name name ) { // transform deletion into modification. Attribute mark = new AttributeImpl( "entryDeleted", "true" ); nextInterceptor.modify( name, DirIteratorContext.REPLACE_ATTRIBUTE, mark ); }
NextInterceptor
String getName()
void init(DirectoryService directoryService) throws Exception
InterceptorChain
when this intercepter is loaded into interceptor chain.Exception
void destroy()
InterceptorChain
when this intercepter is unloaded from interceptor chain.ClonedServerEntry getRootDSE(NextInterceptor next, GetRootDSEOperationContext opContext) throws Exception
DefaultPartitionNexus#getRootDSE( GetRootDSEOperationContext )
call.Exception
org.apache.directory.shared.ldap.name.DN getMatchedName(NextInterceptor next, GetMatchedNameOperationContext opContext) throws Exception
DefaultPartitionNexus#getMatchedName( GetMatchedNameOperationContext )
call.Exception
org.apache.directory.shared.ldap.name.DN getSuffix(NextInterceptor next, GetSuffixOperationContext opContext) throws Exception
DefaultPartitionNexus#getSuffix( GetSuffixOperationContext )
call.Exception
Set<String> listSuffixes(NextInterceptor next, ListSuffixOperationContext opContext) throws Exception
DefaultPartitionNexus#listSuffixes( ListSuffixOperationContext )
call.Exception
void addContextPartition(NextInterceptor next, AddContextPartitionOperationContext opContext) throws Exception
DefaultPartitionNexus#addContextPartition( AddContextPartitionOperationContext )
call.Exception
void removeContextPartition(NextInterceptor next, RemoveContextPartitionOperationContext opContext) throws Exception
DefaultPartitionNexus#removeContextPartition( RemoveContextPartitionOperationContext )
call.Exception
boolean compare(NextInterceptor next, CompareOperationContext opContext) throws Exception
DefaultPartitionNexus#compare( CompareOperationContext )
call.Exception
void delete(NextInterceptor next, DeleteOperationContext opContext) throws Exception
Partition.delete( DeleteOperationContext )
call.Exception
void add(NextInterceptor next, AddOperationContext opContext) throws Exception
Partition.add( AddOperationContext )
call.Exception
void modify(NextInterceptor next, ModifyOperationContext opContext) throws Exception
Partition.modify( ModifyOperationContext )
call.Exception
EntryFilteringCursor list(NextInterceptor next, ListOperationContext opContext) throws Exception
Partition.list( ListOperationContext )
call.Exception
EntryFilteringCursor search(NextInterceptor next, SearchOperationContext opContext) throws Exception
Partition.search( SearchOperationContext )
call.Exception
ClonedServerEntry lookup(NextInterceptor next, LookupOperationContext opContext) throws Exception
Partition.lookup( LookupOperationContext )
call.Exception
boolean hasEntry(NextInterceptor next, EntryOperationContext opContext) throws Exception
Partition.hasEntry( EntryOperationContext )
call.Exception
void rename(NextInterceptor next, RenameOperationContext opContext) throws Exception
Partition.rename( RenameOperationContext )
call.Exception
void move(NextInterceptor next, MoveOperationContext opContext) throws Exception
Partition.move( MoveOperationContext )
call.Exception
void moveAndRename(NextInterceptor next, MoveAndRenameOperationContext opContext) throws Exception
Partition.moveAndRename( MoveAndRenameOperationContext)
call.Exception
void bind(NextInterceptor next, BindOperationContext opContext) throws Exception
Partition.bind( BindOperationContext )
call.Exception
void unbind(NextInterceptor next, UnbindOperationContext opContext) throws Exception
Partition.unbind( UnbindOperationContext )
call.Exception
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.