directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r688582 - in /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event: EventInterceptor.java EventService.java RegistrationEntry.java
Date Sun, 24 Aug 2008 23:24:52 GMT
Author: akarasulu
Date: Sun Aug 24 16:24:52 2008
New Revision: 688582

URL: http://svn.apache.org/viewvc?rev=688582&view=rev
Log:
adding means to check registrations on event service so we can predictably handle persistant
search tests

Added:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/RegistrationEntry.java
Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java?rev=688582&r1=688581&r2=688582&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
Sun Aug 24 16:24:52 2008
@@ -343,43 +343,11 @@
                 }
             }
         }
-    }
-    
-    
-    class RegistrationEntry
-    {
-        private final DirectoryListener listener;
-        private final NotificationCriteria criteria;
-
-        
-        RegistrationEntry( DirectoryListener listener )
-        {
-            this( listener, new NotificationCriteria() );
-        }
-
-        
-        RegistrationEntry( DirectoryListener listener, NotificationCriteria criteria )
-        {
-            this.listener = listener;
-            this.criteria = criteria;
-        }
-
-
-        /**
-         * @return the criteria
-         */
-        NotificationCriteria getCriteria()
-        {
-            return criteria;
-        }
 
 
-        /**
-         * @return the listener
-         */
-        DirectoryListener getListener()
+        public List<RegistrationEntry> getRegistrationEntries()
         {
-            return listener;
+            return Collections.unmodifiableList( registrations );
         }
     }
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java?rev=688582&r1=688581&r2=688582&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java
Sun Aug 24 16:24:52 2008
@@ -20,6 +20,11 @@
 package org.apache.directory.server.core.event;
 
 
+import java.util.List;
+
+
+
+
 /**
  * Interface used by the DirectoryService to manage subscriptions for DIT 
  * change notifications.
@@ -56,4 +61,10 @@
      * @param listener the DirectoryListener to stop delivering notifications to
      */
     void removeListener( DirectoryListener listener );
+    
+    
+    /**
+     * Lists the listeners registered with this EventService.
+     */
+    List<RegistrationEntry> getRegistrationEntries();
 }

Added: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/RegistrationEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/RegistrationEntry.java?rev=688582&view=auto
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/RegistrationEntry.java
(added)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/RegistrationEntry.java
Sun Aug 24 16:24:52 2008
@@ -0,0 +1,64 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.server.core.event;
+
+
+/**
+ * Entry for a {@link DirectoryListener} in the {@link EventService}.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class RegistrationEntry
+{
+    private final DirectoryListener listener;
+    private final NotificationCriteria criteria;
+
+    
+    RegistrationEntry( DirectoryListener listener )
+    {
+        this( listener, new NotificationCriteria() );
+    }
+
+    
+    RegistrationEntry( DirectoryListener listener, NotificationCriteria criteria )
+    {
+        this.listener = listener;
+        this.criteria = criteria;
+    }
+
+
+    /**
+     * @return the criteria
+     */
+    NotificationCriteria getCriteria()
+    {
+        return criteria;
+    }
+
+
+    /**
+     * @return the listener
+     */
+    DirectoryListener getListener()
+    {
+        return listener;
+    }
+}
\ No newline at end of file



Mime
View raw message