|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Filters invocations on ContextPartitionNexus
. Interceptor
filters most method calls performed on ContextPartitionNexus
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 BasicAttribute( "entryDeleted", "true" ); nextInterceptor.modify( name, DirContext.REPLACE_ATTRIBUTE, mark ); }
NextInterceptor
Method Summary | |
void |
add(NextInterceptor next,
java.lang.String userProvidedName,
javax.naming.Name normalizedName,
javax.naming.directory.Attributes entry)
Filters ContextPartition.add(String, Name, Attributes) call. |
void |
addContextPartition(NextInterceptor next,
ContextPartitionConfiguration cfg)
Filters ContextPartitionNexus.addContextPartition(ContextPartitionConfiguration) call. |
void |
delete(NextInterceptor next,
javax.naming.Name name)
Filters ContextPartition.delete(Name) call. |
void |
destroy()
Deinitializes this interceptor. |
javax.naming.Name |
getMatchedName(NextInterceptor next,
javax.naming.Name name,
boolean normalized)
Filters ContextPartitionNexus.getMatchedName(Name, boolean) call. |
javax.naming.directory.Attributes |
getRootDSE(NextInterceptor next)
Filters ContextPartitionNexus.getRootDSE() call. |
javax.naming.Name |
getSuffix(NextInterceptor next,
javax.naming.Name name,
boolean normalized)
Filters ContextPartitionNexus.getSuffix(Name, boolean) call. |
boolean |
hasEntry(NextInterceptor next,
javax.naming.Name name)
Filters ContextPartition.lookup(Name, String[]) call. |
void |
init(ContextFactoryConfiguration factoryCfg,
InterceptorConfiguration cfg)
Intializes this interceptor. |
boolean |
isSuffix(NextInterceptor next,
javax.naming.Name name)
Filters ContextPartition.isSuffix(Name) call. |
javax.naming.NamingEnumeration |
list(NextInterceptor next,
javax.naming.Name baseName)
Filters ContextPartition.list(Name) call. |
java.util.Iterator |
listSuffixes(NextInterceptor next,
boolean normalized)
Filters ContextPartitionNexus.listSuffixes(boolean) call. |
javax.naming.directory.Attributes |
lookup(NextInterceptor next,
javax.naming.Name name)
Filters ContextPartition.lookup(Name) call. |
javax.naming.directory.Attributes |
lookup(NextInterceptor next,
javax.naming.Name dn,
java.lang.String[] attrIds)
Filters ContextPartition.lookup(Name, String[]) call. |
void |
modify(NextInterceptor next,
javax.naming.Name name,
int modOp,
javax.naming.directory.Attributes attributes)
Filters ContextPartition.modify(Name, int, Attributes) call. |
void |
modify(NextInterceptor next,
javax.naming.Name name,
javax.naming.directory.ModificationItem[] items)
Filters ContextPartition.modify(Name, ModificationItem[]) call. |
void |
modifyRn(NextInterceptor next,
javax.naming.Name name,
java.lang.String newRn,
boolean deleteOldRn)
Filters ContextPartition.modifyRn(Name, String, boolean) call. |
void |
move(NextInterceptor next,
javax.naming.Name oldName,
javax.naming.Name newParentName)
Filters ContextPartition.move(Name, Name) call. |
void |
move(NextInterceptor next,
javax.naming.Name oldName,
javax.naming.Name newParentName,
java.lang.String newRn,
boolean deleteOldRn)
Filters ContextPartition.move(Name, Name, String, boolean) call. |
void |
removeContextPartition(NextInterceptor next,
javax.naming.Name suffix)
Filters ContextPartitionNexus.removeContextPartition(Name) call. |
javax.naming.NamingEnumeration |
search(NextInterceptor next,
javax.naming.Name baseName,
java.util.Map environment,
org.apache.ldap.common.filter.ExprNode filter,
javax.naming.directory.SearchControls searchControls)
Filters ContextPartition.search(Name, Map, ExprNode, SearchControls) call. |
Method Detail |
public void init(ContextFactoryConfiguration factoryCfg, InterceptorConfiguration cfg) throws javax.naming.NamingException
InterceptorChain
when this intercepter is loaded into interceptor chain.
javax.naming.NamingException
public void destroy()
InterceptorChain
when this intercepter is unloaded from interceptor chain.
public javax.naming.directory.Attributes getRootDSE(NextInterceptor next) throws javax.naming.NamingException
ContextPartitionNexus.getRootDSE()
call.
javax.naming.NamingException
public javax.naming.Name getMatchedName(NextInterceptor next, javax.naming.Name name, boolean normalized) throws javax.naming.NamingException
ContextPartitionNexus.getMatchedName(Name, boolean)
call.
javax.naming.NamingException
public javax.naming.Name getSuffix(NextInterceptor next, javax.naming.Name name, boolean normalized) throws javax.naming.NamingException
ContextPartitionNexus.getSuffix(Name, boolean)
call.
javax.naming.NamingException
public java.util.Iterator listSuffixes(NextInterceptor next, boolean normalized) throws javax.naming.NamingException
ContextPartitionNexus.listSuffixes(boolean)
call.
javax.naming.NamingException
public void addContextPartition(NextInterceptor next, ContextPartitionConfiguration cfg) throws javax.naming.NamingException
ContextPartitionNexus.addContextPartition(ContextPartitionConfiguration)
call.
javax.naming.NamingException
public void removeContextPartition(NextInterceptor next, javax.naming.Name suffix) throws javax.naming.NamingException
ContextPartitionNexus.removeContextPartition(Name)
call.
javax.naming.NamingException
public void delete(NextInterceptor next, javax.naming.Name name) throws javax.naming.NamingException
ContextPartition.delete(Name)
call.
javax.naming.NamingException
public void add(NextInterceptor next, java.lang.String userProvidedName, javax.naming.Name normalizedName, javax.naming.directory.Attributes entry) throws javax.naming.NamingException
ContextPartition.add(String, Name, Attributes)
call.
javax.naming.NamingException
public void modify(NextInterceptor next, javax.naming.Name name, int modOp, javax.naming.directory.Attributes attributes) throws javax.naming.NamingException
ContextPartition.modify(Name, int, Attributes)
call.
javax.naming.NamingException
public void modify(NextInterceptor next, javax.naming.Name name, javax.naming.directory.ModificationItem[] items) throws javax.naming.NamingException
ContextPartition.modify(Name, ModificationItem[])
call.
javax.naming.NamingException
public javax.naming.NamingEnumeration list(NextInterceptor next, javax.naming.Name baseName) throws javax.naming.NamingException
ContextPartition.list(Name)
call.
javax.naming.NamingException
public javax.naming.NamingEnumeration search(NextInterceptor next, javax.naming.Name baseName, java.util.Map environment, org.apache.ldap.common.filter.ExprNode filter, javax.naming.directory.SearchControls searchControls) throws javax.naming.NamingException
ContextPartition.search(Name, Map, ExprNode, SearchControls)
call.
javax.naming.NamingException
public javax.naming.directory.Attributes lookup(NextInterceptor next, javax.naming.Name name) throws javax.naming.NamingException
ContextPartition.lookup(Name)
call.
javax.naming.NamingException
public javax.naming.directory.Attributes lookup(NextInterceptor next, javax.naming.Name dn, java.lang.String[] attrIds) throws javax.naming.NamingException
ContextPartition.lookup(Name, String[])
call.
javax.naming.NamingException
public boolean hasEntry(NextInterceptor next, javax.naming.Name name) throws javax.naming.NamingException
ContextPartition.lookup(Name, String[])
call.
javax.naming.NamingException
public boolean isSuffix(NextInterceptor next, javax.naming.Name name) throws javax.naming.NamingException
ContextPartition.isSuffix(Name)
call.
javax.naming.NamingException
public void modifyRn(NextInterceptor next, javax.naming.Name name, java.lang.String newRn, boolean deleteOldRn) throws javax.naming.NamingException
ContextPartition.modifyRn(Name, String, boolean)
call.
javax.naming.NamingException
public void move(NextInterceptor next, javax.naming.Name oldName, javax.naming.Name newParentName) throws javax.naming.NamingException
ContextPartition.move(Name, Name)
call.
javax.naming.NamingException
public void move(NextInterceptor next, javax.naming.Name oldName, javax.naming.Name newParentName, java.lang.String newRn, boolean deleteOldRn) throws javax.naming.NamingException
ContextPartition.move(Name, Name, String, boolean)
call.
javax.naming.NamingException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |