You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/03/06 03:52:47 UTC

svn commit: rev 7028 - incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda

Author: akarasulu
Date: Fri Mar  5 18:52:47 2004
New Revision: 7028

Added:
   incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/DefaultStageConfig.java   (contents, props changed)
Modified:
   incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/DefaultStage.java
   incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/EnqueuePredicate.java
   incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/Stage.java
   incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageConfig.java
   incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageHandler.java
   incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitor.java
   incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitorAdapter.java
Log:
Added some stuff to support the use of the seda stage for the decoder.  It 
was not too complete and could use some helper classes as well. 

Also massaged the license header to use the new 2.0 license and fixed the
@author tag references.


Modified: incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/DefaultStage.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/DefaultStage.java	(original)
+++ incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/DefaultStage.java	Fri Mar  5 18:52:47 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.seda ;
 
 
@@ -59,8 +26,8 @@
 /**
  * The default Stage implementation.
  *
- * @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 DefaultStage implements Stage
@@ -90,11 +57,11 @@
     /**
      * Creates a DefaultStage using a configuration bean.
      * 
-     * @param a_config the configuration bean
+     * @param config the configuration bean
      */
-    public DefaultStage( StageConfig a_config )
+    public DefaultStage( StageConfig config )
     {
-        m_config = a_config ;
+        m_config = config ;
         m_hasStarted = new Boolean( false ) ;
     }
     
@@ -108,9 +75,9 @@
      * @see org.apache.eve.seda.Stage#
      * addPredicate(org.apache.eve.seda.EnqueuePredicate)
      */
-    public void addPredicate( EnqueuePredicate a_predicate )
+    public void addPredicate( EnqueuePredicate predicate )
     {
-        m_config.getPredicates().add( a_predicate ) ;
+        m_config.getPredicates().add( predicate ) ;
     }
     
     
@@ -126,7 +93,7 @@
     /**
      * @see org.apache.eve.seda.Stage#enqueue(java.util.EventObject)
      */
-    public void enqueue( final EventObject an_event )
+    public void enqueue( final EventObject event )
     {
         boolean l_isAccepted = true ;
         
@@ -135,48 +102,26 @@
         {
             EnqueuePredicate l_test = 
                 ( EnqueuePredicate ) m_config.getPredicates().get( ii ) ;
-            l_isAccepted &= l_test.accept( an_event ) ;
+            l_isAccepted &= l_test.accept( event ) ;
         }
 
         if( l_isAccepted ) 
         {
             synchronized ( m_queue ) 
             {
-                m_monitor.lockedQueue( this, an_event ) ;
-                m_queue.addFirst( an_event ) ;
+                m_monitor.lockedQueue( this, event ) ;
+                m_queue.addFirst( event ) ;
                 m_queue.notifyAll() ;
             }
 
-            m_monitor.enqueueOccurred( this, an_event ) ;
+            m_monitor.enqueueOccurred( this, event ) ;
         } 
         else 
         {
-            m_monitor.enqueueRejected( this, an_event ) ;
+            m_monitor.enqueueRejected( this, event ) ;
         }
     }
     
-    
-    /**
-     * Gets this Stage's monitor. 
-     * 
-     * @return returns the monitor
-     */
-    public StageMonitor getMonitor()
-    {
-        return m_monitor ;
-    }
-
-    
-    /**
-     * Sets this Stage's monitor.
-     * 
-     * @param a_monitor the monitor to set
-     */
-    public void setMonitor( StageMonitor a_monitor )
-    {
-        m_monitor = a_monitor ;
-    }
-
 
     // ------------------------------------------------------------------------
     // Runnable Implementations 
@@ -238,9 +183,9 @@
     {
         final EventObject m_event ;
         
-        public ExecutableHandler( EventObject an_event )
+        public ExecutableHandler( EventObject event )
         {
-            m_event = an_event ;
+            m_event = event ;
         }
         
         public void run()
@@ -315,5 +260,27 @@
         }
         
         m_monitor.stopped( this ) ;
+    }
+    
+    
+    /**
+     * Gets this Stage's monitor.
+     * 
+     * @return the monitor for this Stage
+     */
+    public StageMonitor getStageMonitor()
+    {
+        return m_monitor ;
+    }
+
+    
+    /**
+     * Sets this Stage's monitor.
+     * 
+     * @param monitor the monitor to set for this Stage
+     */
+    public void setM_monitor( StageMonitor monitor )
+    {
+        this.m_monitor = monitor ;
     }
 }

Added: incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/DefaultStageConfig.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/DefaultStageConfig.java	Fri Mar  5 18:52:47 2004
@@ -0,0 +1,96 @@
+/*
+ *   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.seda ;
+
+
+import java.util.List ;
+
+import org.apache.eve.thread.ThreadPool ;
+
+
+/**
+ * The default bean implementation for a stage's configuration.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class DefaultStageConfig implements StageConfig
+{
+    /** the name of this Stage */
+    private final String name ;
+    /** this Stage's handler */
+    private final StageHandler handler ;
+    /** the enqueue predicates for this Stage */
+    private final List predicates ;
+    /** the thread pool used for this Stages workers */
+    private final ThreadPool tp ;
+    
+
+    /**
+     * Creates a default stage configuration bean.
+     * 
+     * @param name the name of this Stage
+     * @param handler this Stage's handler 
+     * @param predicates the enqueue predicates for this Stage
+     * @param tp the thread pool used for this Stages workers
+     */
+    public DefaultStageConfig( String name, StageHandler handler, 
+                               List predicates, ThreadPool tp )
+    {
+        this.tp = tp ;
+        this.name = name ;
+        this.handler = handler ;
+        this.predicates = predicates ;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageConfig#getName()
+     */
+    public String getName()
+    {
+        return name ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageConfig#getHandler()
+     */
+    public StageHandler getHandler()
+    {
+        return handler ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageConfig#getPredicates()
+     */
+    public List getPredicates()
+    {
+        return predicates ;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageConfig#getThreadPool()
+     */
+    public ThreadPool getThreadPool()
+    {
+        return tp ;
+    }
+}

Modified: incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/EnqueuePredicate.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/EnqueuePredicate.java	(original)
+++ incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/EnqueuePredicate.java	Fri Mar  5 18:52:47 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.seda ;
 
 
@@ -56,8 +23,8 @@
 /**
  * Predicate used to determine whether or not an event is enqueued onto a Stage.
  *
- * @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 EnqueuePredicate
@@ -65,8 +32,8 @@
     /**
      * Determines whether or not an event gets enqueued onto a Stage queue.
      * 
-     * @param an_event the event to enqueue
+     * @param event the event to enqueue
      * @return true if an enqueue operation is allowed false if it is denied
      */
-    public boolean accept( EventObject an_event ) ; 
+    public boolean accept( EventObject event ) ; 
 }

Modified: incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/Stage.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/Stage.java	(original)
+++ incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/Stage.java	Fri Mar  5 18:52:47 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.seda ;
 
 
@@ -56,8 +23,8 @@
 /**
  * Simple SEDA Stage interface.
  *
- * @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 Stage
@@ -72,16 +39,16 @@
     /**
      * Enqueues an event onto this stage.
      * 
-     * @param an_event the event to enqueue
+     * @param event the event to enqueue
      */
-    void enqueue( EventObject an_event ) ;
+    void enqueue( EventObject event ) ;
     
     /**
      * Adds an EnqueuePredicate to control what events can and cannot be 
      * enqueued onto this Stage.
      * 
-     * @param a_predicate the enqueue predecate to add
+     * @param predicate the enqueue predecate to add
      */
-    void addPredicate( EnqueuePredicate a_predicate ) ;
+    void addPredicate( EnqueuePredicate predicate ) ;
 }
 

Modified: incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageConfig.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageConfig.java	(original)
+++ incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageConfig.java	Fri Mar  5 18:52:47 2004
@@ -1,56 +1,23 @@
 /*
-
- ============================================================================
-                   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.seda ;
 
 
-import java.util.ArrayList ;
+import java.util.List ;
 
 import org.apache.eve.thread.ThreadPool ;
 
@@ -58,8 +25,8 @@
 /**
  * The configuration required for a stage.
  *
- * @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 StageConfig
@@ -84,7 +51,7 @@
      * 
      * @return the enqueue predicates used by the Stage
      */
-    ArrayList getPredicates() ;
+    List getPredicates() ;
     
     /**
      * Gets the Stage's thread pool.

Modified: incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageHandler.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageHandler.java	(original)
+++ incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageHandler.java	Fri Mar  5 18:52:47 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.seda ;
 
 
@@ -57,8 +24,8 @@
 /**
  * Thread safe Event handler used by Stages.
  *
- * @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 StageHandler
@@ -67,7 +34,7 @@
     /**
      * Handles an event for the Stage.
      *
-     * @param a_event the event to process or handle.
+     * @param event the event to process or handle.
      */
-    void handleEvent( EventObject a_event ) ;
+    void handleEvent( EventObject event ) ;
 }

Modified: incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitor.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitor.java	(original)
+++ incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitor.java	Fri Mar  5 18:52:47 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.seda ;
 
 
@@ -56,8 +23,8 @@
 /**
  * Interface used to monitor Stage services.
  *
- * @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 StageMonitor
@@ -65,63 +32,63 @@
     /**
      * Monitors Stage has starts.
      * 
-     * @param a_stage the started Stage 
+     * @param stage the started Stage 
      */
-    void started( Stage a_stage ) ;
+    void started( Stage stage ) ;
 
     /**
      * Monitors Stage has stops.
      * 
-     * @param a_stage the stopped Stage 
+     * @param stage the stopped Stage 
      */
-    void stopped( Stage a_stage ) ;
+    void stopped( Stage stage ) ;
     
     /**
      * Monitors StageDriver starts.
      * 
-     * @param a_stage the Stage whose driver started
+     * @param stage the Stage whose driver started
      */
-    void startedDriver( Stage a_stage ) ;
+    void startedDriver( Stage stage ) ;
     
     /**
      * Monitor for successful enqueue operations on the stage.
      * 
-     * @param a_stage the stage enqueued on
-     * @param an_event the event enqueued
+     * @param stage the stage enqueued on
+     * @param event the event enqueued
      */
-    void enqueueOccurred( Stage a_stage, EventObject an_event ) ;
+    void enqueueOccurred( Stage stage, EventObject event ) ;
     
     /**
      * Monitor for failed enqueue operations on the stage.
      * 
-     * @param a_stage the stage where enqueue failed
-     * @param an_event the event enqueue failed on
+     * @param stage the stage where enqueue failed
+     * @param event the event enqueue failed on
      */
-    void enqueueRejected( Stage a_stage, EventObject an_event ) ;
+    void enqueueRejected( Stage stage, EventObject event ) ;
     
     /**
      * Queue lock acquired to enqueue an event.
      * 
-     * @param a_stage the Stage whose queue lock was acquired
-     * @param an_event the event to be enqueued
+     * @param stage the Stage whose queue lock was acquired
+     * @param event the event to be enqueued
      */
-    void lockedQueue( Stage a_stage, EventObject an_event ) ;
+    void lockedQueue( Stage stage, EventObject event ) ;
     
     /**
      * Monitor for dequeue operations.
      * 
-     * @param a_stage the Stage dequeued
-     * @param an_event the event that was dequeued
+     * @param stage the Stage dequeued
+     * @param event the event that was dequeued
      */
-    void eventDequeued( Stage a_stage, EventObject an_event ) ;
+    void eventDequeued( Stage stage, EventObject event ) ;
     
     /**
      * Monitor for successfully completing the handling of an event.
      * 
-     * @param a_stage the Stage processing the event 
-     * @param an_event the event that was handled
+     * @param stage the Stage processing the event 
+     * @param event the event that was handled
      */
-    void eventHandled( Stage a_stage, EventObject an_event ) ;
+    void eventHandled( Stage stage, EventObject event ) ;
     
     // ------------------------------------------------------------------------
     // failure monitors
@@ -130,18 +97,17 @@
     /**
      * Monitors driver thread interruption failures.
      * 
-     * @param a_stage the stage that caused the failure
-     * @param a_fault the faulting exception
+     * @param stage the stage that caused the failure
+     * @param fault the faulting exception
      */
-    void driverFailed( Stage a_stage, InterruptedException a_fault ) ;
+    void driverFailed( Stage stage, InterruptedException fault ) ;
     
     /**
      * Monitors handler failures.
      * 
-     * @param a_stage the stage that caused the failure
-     * @param an_event the event the handler failed on
-     * @param a_fault the faulting exception
+     * @param stage the stage that caused the failure
+     * @param event the event the handler failed on
+     * @param fault the faulting exception
      */
-    void handlerFailed( Stage a_stage, EventObject an_event, 
-                        Throwable a_fault ) ;
+    void handlerFailed( Stage stage, EventObject event, Throwable fault ) ;
 }

Modified: incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitorAdapter.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitorAdapter.java	(original)
+++ incubator/directory/eve/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitorAdapter.java	Fri Mar  5 18:52:47 2004
@@ -1,61 +1,30 @@
 /*
+ *   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.seda ;
 
- ============================================================================
-                   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/>.
 
-*/
-package org.apache.eve.seda;
+import java.util.EventObject ;
 
-import java.util.EventObject;
 
 /**
- * $todo$ doc me
+ * A do nothing adapter for a stage.
  *
- * @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 StageMonitorAdapter implements StageMonitor
@@ -63,7 +32,7 @@
     /* (non-Javadoc)
      * @see org.apache.eve.seda.StageMonitor#started(org.apache.eve.seda.Stage)
      */
-    public void started( Stage a_stage )
+    public void started( Stage stage )
     {
     }
 
@@ -71,7 +40,7 @@
     /* (non-Javadoc)
      * @see org.apache.eve.seda.StageMonitor#stopped(org.apache.eve.seda.Stage)
      */
-    public void stopped( Stage a_stage )
+    public void stopped( Stage stage )
     {
     }
 
@@ -80,7 +49,7 @@
      * @see org.apache.eve.seda.StageMonitor#startedDriver(
      * org.apache.eve.seda.Stage)
      */
-    public void startedDriver( Stage a_stage )
+    public void startedDriver( Stage stage )
     {
     }
 
@@ -89,7 +58,7 @@
      * @see org.apache.eve.seda.StageMonitor#enqueueOccurred(
      * org.apache.eve.seda.Stage, java.util.EventObject)
      */
-    public void enqueueOccurred( Stage a_stage, EventObject an_event )
+    public void enqueueOccurred( Stage stage, EventObject event )
     {
     }
 
@@ -98,7 +67,7 @@
      * @see org.apache.eve.seda.StageMonitor#enqueueRejected(
      * org.apache.eve.seda.Stage, java.util.EventObject)
      */
-    public void enqueueRejected( Stage a_stage, EventObject an_event )
+    public void enqueueRejected( Stage stage, EventObject event )
     {
     }
 
@@ -107,7 +76,7 @@
      * @see org.apache.eve.seda.StageMonitor#lockedQueue(
      * org.apache.eve.seda.Stage, java.util.EventObject)
      */
-    public void lockedQueue( Stage a_stage, EventObject an_event )
+    public void lockedQueue( Stage stage, EventObject event )
     {
     }
 
@@ -116,7 +85,7 @@
      * @see org.apache.eve.seda.StageMonitor#eventDequeued(
      * org.apache.eve.seda.Stage, java.util.EventObject)
      */
-    public void eventDequeued( Stage a_stage, EventObject an_event )
+    public void eventDequeued( Stage stage, EventObject event )
     {
     }
 
@@ -125,7 +94,7 @@
      * @see org.apache.eve.seda.StageMonitor#eventHandled(
      * org.apache.eve.seda.Stage, java.util.EventObject)
      */
-    public void eventHandled( Stage a_stage, EventObject an_event )
+    public void eventHandled( Stage stage, EventObject event )
     {
     }
 
@@ -134,7 +103,7 @@
      * @see org.apache.eve.seda.StageMonitor#driverFailed(
      * org.apache.eve.seda.Stage, java.lang.InterruptedException)
      */
-    public void driverFailed( Stage a_stage, InterruptedException a_fault )
+    public void driverFailed( Stage stage, InterruptedException fault )
     {
     }
 
@@ -143,8 +112,7 @@
      * @see org.apache.eve.seda.StageMonitor#handlerFailed(
      * org.apache.eve.seda.Stage, java.util.EventObject, java.lang.Throwable)
      */
-    public void handlerFailed( Stage a_stage, EventObject an_event, 
-                               Throwable a_fault)
+    public void handlerFailed( Stage stage, EventObject event, Throwable fault )
     {
     }
 }