directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r224693 - /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorChain.java
Date Mon, 25 Jul 2005 05:14:53 GMT
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;
+    }
 
 
     /**



Mime
View raw message