directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 7015 - in incubator/directory/eve/trunk/eve/frontend/event: merlin-impl/src/java/org/apache/eve/event pojo-impl/src/java/org/apache/eve/event spi/src/java/org/apache/eve/event
Date Fri, 05 Mar 2004 20:24:23 GMT
Author: akarasulu
Date: Fri Mar  5 12:24:22 2004
New Revision: 7015

Modified:
   incubator/directory/eve/trunk/eve/frontend/event/merlin-impl/src/java/org/apache/eve/event/MerlinEventRouter.java
   incubator/directory/eve/trunk/eve/frontend/event/pojo-impl/src/java/org/apache/eve/event/DefaultEventRouter.java
   incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java
   incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java
   incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java
   incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java
   incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java
Log:
Added convenience method subscribe(Class, Subscriber) and the new license
header and updated the author tag to point to the directory project.


Modified: incubator/directory/eve/trunk/eve/frontend/event/merlin-impl/src/java/org/apache/eve/event/MerlinEventRouter.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/event/merlin-impl/src/java/org/apache/eve/event/MerlinEventRouter.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/event/merlin-impl/src/java/org/apache/eve/event/MerlinEventRouter.java
Fri Mar  5 12:24:22 2004
@@ -1,52 +1,19 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.eve.event ;
 
 
@@ -86,11 +53,21 @@
      * org.apache.eve.event.Filter, org.apache.eve.event.Subscriber)
      */
     public void subscribe(
-        Class a_type,
-        Filter a_filter,
-        Subscriber a_subscriber )
+        Class type,
+        Filter filter,
+        Subscriber subscriber )
+    {
+        m_router.subscribe( type, filter, subscriber ) ;
+    }
+    
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.event.EventRouter#subscribe(java.lang.Class, 
+     * org.apache.eve.event.Subscriber)
+     */
+    public void subscribe( Class type, Subscriber subscriber )
     {
-        m_router.subscribe( a_type, a_filter, a_subscriber ) ;
+        m_router.subscribe( type, null, subscriber ) ;
     }
     
 
@@ -98,9 +75,9 @@
      * @see org.apache.eve.event.EventRouter#unsubscribe(
      * org.apache.eve.event.Subscriber)
      */
-    public void unsubscribe( Subscriber a_subscriber )
+    public void unsubscribe( Subscriber subscriber )
     {
-        m_router.unsubscribe( a_subscriber ) ;
+        m_router.unsubscribe( subscriber ) ;
     }
     
 
@@ -108,18 +85,18 @@
      * @see org.apache.eve.event.EventRouter#unsubscribe(java.lang.Class, 
      * org.apache.eve.event.Subscriber)
      */
-    public void unsubscribe( Class a_type, Subscriber a_subscriber )
+    public void unsubscribe( Class type, Subscriber subscriber )
     {
-        m_router.unsubscribe( a_type, a_subscriber ) ;
+        m_router.unsubscribe( type, subscriber ) ;
     }
 
     
     /* (non-Javadoc)
      * @see org.apache.eve.event.EventRouter#publish(java.util.EventObject)
      */
-    public void publish( EventObject a_event )
+    public void publish( EventObject event )
     {
-        m_router.publish( a_event ) ;
+        m_router.publish( event ) ;
     }
 
     
@@ -157,9 +134,9 @@
          * @see org.apache.eve.event.EventRouterMonitor#eventPublished(
          * java.util.EventObject)
          */
-        public void eventPublished( EventObject a_event )
+        public void eventPublished( EventObject event )
         {
-            getLogger().debug( "published event: " + a_event ) ;
+            getLogger().debug( "published event: " + event ) ;
         }
 
     
@@ -167,9 +144,9 @@
          * @see org.apache.eve.event.EventRouterMonitor#addedSubscription(
          * org.apache.eve.event.Subscription)
          */
-        public void addedSubscription( Subscription a_subscription )
+        public void addedSubscription( Subscription subscription )
         {
-            getLogger().debug( "added subscription: " + a_subscription ) ;
+            getLogger().debug( "added subscription: " + subscription ) ;
         }
 
     
@@ -177,9 +154,9 @@
          * @see org.apache.eve.event.EventRouterMonitor#removedSubscription(
          * org.apache.eve.event.Subscription)
          */
-        public void removedSubscription( Subscription a_subscription )
+        public void removedSubscription( Subscription subscription )
         {
-            getLogger().debug( "removed subscription: " + a_subscription ) ;
+            getLogger().debug( "removed subscription: " + subscription ) ;
         }
     }
 }

Modified: incubator/directory/eve/trunk/eve/frontend/event/pojo-impl/src/java/org/apache/eve/event/DefaultEventRouter.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/event/pojo-impl/src/java/org/apache/eve/event/DefaultEventRouter.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/event/pojo-impl/src/java/org/apache/eve/event/DefaultEventRouter.java
Fri Mar  5 12:24:22 2004
@@ -1,52 +1,19 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.eve.event ;
 
 
@@ -71,21 +38,30 @@
     private EventRouterMonitor m_monitor = new EventRouterMonitorAdapter() ;
     
     
-    /**
+    /* (non-Javadoc)
+     * @see org.apache.eve.event.EventRouter#subscribe(java.lang.Class, 
+     * org.apache.eve.event.Subscriber)
+     */
+    public void subscribe( Class type, Subscriber subscriber )
+    {
+        subscribe( type, null, subscriber ) ;
+    }
+
+    
+    /*
      * @see org.apache.eve.event.EventRouter#subscribe(java.lang.Class, 
      * org.apache.eve.event.Filter, org.apache.eve.event.Subscriber)
      */
-    public void subscribe( Class a_type, Filter a_filter,
-                           Subscriber a_subscriber )
+    public void subscribe( Class type, Filter filter, Subscriber subscriber )
     {
-        if ( ! EventObject.class.isAssignableFrom( a_type ) ) 
+        if ( ! EventObject.class.isAssignableFrom( type ) ) 
         {
             throw new IllegalArgumentException( "Invalid event class: " 
-                    + a_type.getName() ) ;
+                    + type.getName() ) ;
         }
 
         Subscription l_subscription = 
-            new Subscription( a_type, a_filter, a_subscriber ) ;
+            new Subscription( type, filter, subscriber ) ;
 
         if ( ! m_subscriptions.contains( l_subscription ) )
         {
@@ -103,7 +79,7 @@
      * @see org.apache.eve.event.EventRouter#unsubscribe(
      * org.apache.eve.event.Subscriber)
      */
-    public void unsubscribe( Subscriber a_subscriber )
+    public void unsubscribe( Subscriber subscriber )
     {
         Iterator l_list = m_subscriptions.iterator() ;
         
@@ -112,7 +88,7 @@
             while ( l_list.hasNext() )
             {
                 Subscription l_subscription = ( Subscription ) l_list.next() ;
-                if ( a_subscriber == l_subscription.getSubscriber() )
+                if ( subscriber == l_subscription.getSubscriber() )
                 {
                     l_list.remove() ;
                     m_monitor.removedSubscription( l_subscription ) ;
@@ -127,7 +103,7 @@
      * @see org.apache.eve.event.EventRouter#unsubscribe(java.lang.Class, 
      * org.apache.eve.event.Subscriber)
      */
-    public void unsubscribe( Class a_type, Subscriber a_subscriber )
+    public void unsubscribe( Class type, Subscriber subscriber )
     {
         Iterator l_list = m_subscriptions.iterator() ;
         
@@ -136,8 +112,8 @@
             while ( l_list.hasNext() )
             {
                 Subscription l_subscription = ( Subscription ) l_list.next() ;
-                if ( a_subscriber == l_subscription.getSubscriber()
-                  && a_type.equals( l_subscription.getType() ) )
+                if ( subscriber == l_subscription.getSubscriber()
+                  && type.equals( l_subscription.getType() ) )
                 {
                     l_list.remove() ;
                     m_monitor.removedSubscription( l_subscription ) ;
@@ -152,17 +128,17 @@
      * @see org.apache.eve.event.EventRouter#unsubscribe(java.lang.Class, 
      * org.apache.eve.event.Subscriber)
      */
-    public void unsubscribe( Class a_type, Filter a_filter, 
-                             Subscriber a_subscriber )
+    public void unsubscribe( Class type, Filter filter, 
+                             Subscriber subscriber )
     {
-        if ( ! EventObject.class.isAssignableFrom( a_type ) ) 
+        if ( ! EventObject.class.isAssignableFrom( type ) ) 
         {
             throw new IllegalArgumentException( "Invalid event class: " 
-                    + a_type.getName() ) ;
+                    + type.getName() ) ;
         }
         
-        final Subscription l_subscription = new Subscription( a_type, a_filter, 
-                a_subscriber ) ;
+        final Subscription l_subscription = new Subscription( type, filter, 
+                subscriber ) ;
         
         synchronized ( m_subscriptions )
         {
@@ -175,7 +151,7 @@
      * (non-Javadoc)
      * @see org.apache.eve.event.EventRouter#publish(org.apache.eve.event.Event)
      */
-    public void publish( EventObject a_event ) 
+    public void publish( EventObject event ) 
     {
         final Subscription [] l_subscriptions ;
         
@@ -188,7 +164,7 @@
         for ( int ii = 0; ii < l_subscriptions.length; ii++ )
         {
             boolean isAssignable = l_subscriptions[ii].getType()
-                .isAssignableFrom( a_event.getClass() ) ;
+                .isAssignableFrom( event.getClass() ) ;
             
             if ( ! isAssignable )
             {
@@ -197,11 +173,11 @@
             
             if ( l_subscriptions[ii].getFilter() == null )
             {
-                l_subscriptions[ii].getSubscriber().inform( a_event ) ;
+                l_subscriptions[ii].getSubscriber().inform( event ) ;
             }
-            else if ( l_subscriptions[ii].getFilter().apply( a_event ) )  
+            else if ( l_subscriptions[ii].getFilter().accept( event ) )  
             {
-                l_subscriptions[ii].getSubscriber().inform( a_event ) ;
+                l_subscriptions[ii].getSubscriber().inform( event ) ;
             }
         }
     }
@@ -210,11 +186,11 @@
     /**
      * Sets the event router's monitor.
      * 
-     * @param a_monitor the monitor
+     * @param monitor the monitor
      */
-    public void setMonitor( EventRouterMonitor a_monitor )
+    public void setMonitor( EventRouterMonitor monitor )
     {
-        m_monitor = a_monitor ;
+        m_monitor = monitor ;
     }
     
     

Modified: incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java
Fri Mar  5 12:24:22 2004
@@ -1,52 +1,19 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.eve.event ;
 
 
@@ -57,8 +24,8 @@
  * Event service based on an exact version of the event notifier pattern found
  * <a href="http://members.ispwest.com/jeffhartkopf/notifier/">here</a>.
  * 
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $Author$
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
  * @version $Rev$
  */
 public interface EventRouter
@@ -69,32 +36,40 @@
     /**
      * Subscribes an event subscriber.
      * 
-     * @param a_type an event type enumeration value
-     * @param a_filter an event filter if any to apply
-     * @param a_subscriber the Subscriber to subscribe
+     * @param type an event type enumeration value
+     * @param filter an event filter if any to apply
+     * @param subscriber the Subscriber to subscribe
+     */
+    void subscribe( Class type, Filter filter, 
+                    Subscriber subscriber ) ;
+    
+    /**
+     * Subscribes an event subscriber.
+     * 
+     * @param type an event type enumeration value
+     * @param subscriber the Subscriber to subscribe
      */
-    void subscribe( Class a_type, Filter a_filter, 
-                    Subscriber a_subscriber ) ;
+    void subscribe( Class type, Subscriber subscriber ) ;
     
     /**
      * Unsubscribes an event subscriber.
      * 
-     * @param a_subscriber the Subscriber to unsubscribe
+     * @param subscriber the Subscriber to unsubscribe
      */
-    void unsubscribe( Subscriber a_subscriber ) ;
+    void unsubscribe( Subscriber subscriber ) ;
     
     /**
      * Unsubscribes an event subscriber.
      * 
-     * @param a_subscriber the Subscriber to unsubscribe
+     * @param subscriber the Subscriber to unsubscribe
      */
-    void unsubscribe( Class a_type, Subscriber a_subscriber ) ;
+    void unsubscribe( Class type, Subscriber subscriber ) ;
     
     /**
      * Fires an event synchronously in the thread of the caller to all 
      * subscribers registered for a specific event type.
      * 
-     * @param a_event the event to publish
+     * @param event the event to publish
      */
-    void publish( EventObject a_event ) ;
+    void publish( EventObject event ) ;
 }

Modified: incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java
Fri Mar  5 12:24:22 2004
@@ -1,52 +1,19 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.eve.event ;
 
 
@@ -56,8 +23,8 @@
 /**
  * Monitors the activities of the event router.
  *
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $Author$
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
  * @version $Rev$
  */
 public interface EventRouterMonitor
@@ -65,21 +32,21 @@
     /**
      * Monitors events that are published.
      * 
-     * @param a_event the published event object 
+     * @param event the published event object 
      */
-    void eventPublished( EventObject a_event ) ;
+    void eventPublished( EventObject event ) ;
     
     /**
      * Monitores the addition of new subscriptions.
      * 
-     * @param a_subscription
+     * @param subscription
      */
-    void addedSubscription( Subscription a_subscription ) ;
+    void addedSubscription( Subscription subscription ) ;
     
     /**
      * Monitors the removal of new subscriptions
      * 
-     * @param a_subscription
+     * @param subscription
      */
-    void removedSubscription( Subscription a_subscription ) ;
+    void removedSubscription( Subscription subscription ) ;
 }

Modified: incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java
Fri Mar  5 12:24:22 2004
@@ -1,52 +1,19 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.eve.event ;
 
 
@@ -56,30 +23,35 @@
 /**
  * Does nothing and created by the default constructor.
  *
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $Author$
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
  * @version $Rev$
  */
 public class EventRouterMonitorAdapter implements EventRouterMonitor
 {
     /* (non-Javadoc)
-     * @see org.apache.eve.event.EventRouterMonitor#eventPublished(java.util.EventObject)
+     * @see org.apache.eve.event.EventRouterMonitor#eventPublished(
+     * java.util.EventObject)
      */
-    public void eventPublished(EventObject a_a_event)
+    public void eventPublished( EventObject event )
     {
     }
 
+    
     /* (non-Javadoc)
-     * @see org.apache.eve.event.EventRouterMonitor#addedSubscription(org.apache.eve.event.Subscription)
+     * @see org.apache.eve.event.EventRouterMonitor#addedSubscription(
+     * org.apache.eve.event.Subscription)
      */
-    public void addedSubscription(Subscription a_a_subscription)
+    public void addedSubscription( Subscription subscription )
     {
     }
 
+    
     /* (non-Javadoc)
-     * @see org.apache.eve.event.EventRouterMonitor#removedSubscription(org.apache.eve.event.Subscription)
+     * @see org.apache.eve.event.EventRouterMonitor#removedSubscription(
+     * org.apache.eve.event.Subscription)
      */
-    public void removedSubscription(Subscription a_a_subscription)
+    public void removedSubscription( Subscription subscription )
     {
     }
 }

Modified: incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java
Fri Mar  5 12:24:22 2004
@@ -1,52 +1,19 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.eve.event ;
 
 
@@ -57,8 +24,8 @@
  * A filter in the event router is used to further prune the subscriber's 
  * interest list.
  *
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $Author$
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
  * @version $Rev$
  */
 public interface Filter
@@ -69,5 +36,5 @@
      * @param a_event the event to test 
      * @return true if the event can be sent, false if it cannot
      */
-    boolean apply( EventObject a_event ) ;
+    boolean accept( EventObject a_event ) ;
 }

Modified: incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java
Fri Mar  5 12:24:22 2004
@@ -1,60 +1,27 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.eve.event ;
 
 
 /**
  * A subscription bean.
  *
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $Author$
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
  * @version $Rev$
  */
 public class Subscription
@@ -71,16 +38,15 @@
      * Creates a subscription for a type of event using a filter and a 
      * subscriber.
      * 
-     * @param a_type the class of event to be informed on
-     * @param a_filter the Filter to use weed out unwanted events
-     * @param a_subscriber the subscriber to deliever the event to
+     * @param type the class of event to be informed on
+     * @param filter the Filter to use weed out unwanted events
+     * @param subscriber the subscriber to deliever the event to
      */
-    public Subscription( Class a_type, Filter a_filter, 
-                         Subscriber a_subscriber ) 
+    public Subscription( Class type, Filter filter, Subscriber subscriber ) 
     { 
-        m_type = a_type ;
-        m_filter = a_filter ;
-        m_subscriber = a_subscriber ;
+        m_type = type ;
+        m_filter = filter ;
+        m_subscriber = subscriber ;
     }
     
     
@@ -120,22 +86,22 @@
     /**
      * Compare two Subscriptions to each other.
      *
-     * @param a_obj the object to compare this Subscription to
+     * @param obj the object to compare this Subscription to
      * @return <code>true</code> if the two Subscription objects are the same
      */
-    public boolean equals( Object a_obj ) 
+    public boolean equals( Object obj ) 
     {
-        if ( this == a_obj ) 
+        if ( this == obj ) 
         {
             return true ;
         }
         
-        if ( ! ( a_obj instanceof Subscription ) ) 
+        if ( ! ( obj instanceof Subscription ) ) 
         { 
             return false ;
         }
 
-        final Subscription l_subscription = ( Subscription ) a_obj ;
+        final Subscription l_subscription = ( Subscription ) obj ;
 
         if ( ! m_type.equals( l_subscription.getType() ) )
         {    

Mime
View raw message