You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2005/07/25 07:14:53 UTC
svn commit: r224693 -
/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorChain.java
Author: trustin
Date: Sun Jul 24 22:14:48 2005
New Revision: 224693
URL: http://svn.apache.org/viewcvs?rev=224693&view=rev
Log:
Added InterceptorChain.get(String) and InterceptorChain.getAll() to let users gain access to interceptors to interact with them.
Modified:
directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorChain.java
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorChain.java?rev=224693&r1=224692&r2=224693&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorChain.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorChain.java Sun Jul 24 22:14:48 2005
@@ -256,6 +256,39 @@
}
}
}
+
+
+ /**
+ * Returns the registered interceptor with the specified name.
+ * @return <tt>null</tt> if the specified name doesn't exist.
+ */
+ public Interceptor get( String interceptorName )
+ {
+ Entry e = (Entry) name2entry.get( interceptorName );
+ if( e == null )
+ {
+ return null;
+ }
+
+ return e.configuration.getInterceptor();
+ }
+
+ /**
+ * Returns the list of all registered interceptors.
+ */
+ public List getAll()
+ {
+ List result = new ArrayList();
+ Entry e = head;
+ do
+ {
+ result.add( e.configuration.getInterceptor() );
+ e = e.nextEntry;
+ }
+ while ( e != tail );
+
+ return result;
+ }
/**