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 2003/12/17 02:21:16 UTC

svn commit: rev 1448 - in incubator/directory/ldap/trunk/eve: backend/schema/common/api/src/java/org/apache/eve/schema backend/schema/oid/api/src/java/org/apache/eve/schema backend/schema/oid/impl/src/java/org/apache/eve/schema backend/schema/syntax/api/src/java/org/apache/eve/schema frontend/buffer/impl/src/java/org/apache/eve/buffer frontend/buffer/spi/src/java/org/apache/eve/buffer frontend/common/api/src/java/org/apache/eve frontend/common/api/src/java/org/apache/eve/event frontend/common/api/src/java/org/apache/eve/listener frontend/common/api/src/java/org/apache/eve/security frontend/common/api/src/java/org/apache/eve/seda frontend/common/api/src/java/org/apache/eve/thread frontend/event/impl/src/java/org/apache/eve/event frontend/event/spi/src/java/org/apache/eve/event frontend/input/impl/src/java/org/apache/eve/input frontend/input/spi/src/java/org/apache/eve/input frontend/listener/impl/src/java/org/apache/eve/listener frontend/listener/spi/src/java/org/apache/eve/listener

Author: akarasulu
Date: Tue Dec 16 17:21:15 2003
New Revision: 1448

Modified:
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/AttributeType.java
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ContentRule.java
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/DescriptionUtils.java
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/MatchingRule.java
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/NameForm.java
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/Normalizer.java
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ObjectClass.java
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ObjectClassTypeEnum.java
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/StructureRule.java
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/Syntax.java
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/SyntaxChecker.java
   incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/UsageEnum.java
   incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistry.java
   incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistryMonitor.java
   incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistryMonitorAdapter.java
   incubator/directory/ldap/trunk/eve/backend/schema/oid/impl/src/java/org/apache/eve/schema/DefaultOidRegistry.java
   incubator/directory/ldap/trunk/eve/backend/schema/syntax/api/src/java/org/apache/eve/schema/SyntaxRegistry.java
   incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/DefaultBufferPool.java
   incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPool.java
   incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPoolMonitor.java
   incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPool.java
   incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolConfig.java
   incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitor.java
   incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitorAdapter.java
   incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/DefaultBufferPoolConfig.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/ResourceException.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/SessionCreationSubscriber.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/SessionDestructionListener.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/Subscriber.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/listener/KeyExpiryException.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/security/LdapPrincipal.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/DefaultStage.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/EnqueuePredicate.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/Stage.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageConfig.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitor.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitorAdapter.java
   incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/thread/ThreadPool.java
   incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/DefaultEventRouter.java
   incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/MerlinEventRouter.java
   incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java
   incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java
   incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java
   incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java
   incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java
   incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java
   incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/DefaultInputManager.java
   incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/MerlinInputManager.java
   incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManager.java
   incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java
   incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java
   incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/AvalonListenerManagerMonitor.java
   incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/DefaultListenerManager.java
   incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/ListenerManagerMonitorAdapter.java
   incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/MerlinListenerManager.java
   incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManager.java
   incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManagerMonitor.java
   incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ServerListener.java
Log:
mass converted long svn keywords to short ones

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/AttributeType.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/AttributeType.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/AttributeType.java	Tue Dec 16 17:21:15 2003
@@ -1,171 +1,171 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-/**
- * An attributeType specification.  attributeType specifications describe the
- * nature of attributes within the directory.  The attributeType specification's
- * properties are accessible through this interface.
- * 
- * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC 2252 Section 4.2</a>
- * @see DescriptionUtils#getDescription(AttributeType)
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public interface AttributeType
-{
-    /**
-     * Gets the object identifier for this AttributeType.
-     * 
-     * @return the object identifier for this AttributeType
-     */
-    String getOid() ;
-    
-    /**
-     * Gets the first name in the list of names for this AttributeTypeImpl.
-     *
-     * @return the first name in the list of names
-     */
-    String getName() ;
-    
-    /**
-     * Gets all the names for this AttributeType.
-     *
-     * @return String names for this AttributeType
-     */
-    String[] getAllNames() ;
-
-    /**
-     * Gets a description for this AttributeType.
-     *
-     * @return the verbal description
-     */
-    String getDescription() ;
-
-    /**
-     * Gets whether or not this AttributeType is single-valued.
-     *
-     * @return true if only one value can exist for this AttributeType, false
-     *      otherwise
-     */
-    boolean isSingleValue() ;
-
-    /**
-     * Gets whether or not this AttributeType can be modified by a user.
-     *
-     * @return true if users can modify it, false if only the directory can.
-     */
-    boolean isCanUserModify() ;
-
-    /**
-     * Gets whether or not this AttributeType is a collective attribute.
-     * 
-     * @return true if the attribute is collective, false otherwise
-     */
-    boolean isCollective() ;
-    
-    /**
-     * Gets whether or not this AttributeType is obsolete.
-     *
-     * @return true if obsolete, false if not.
-     */
-    boolean isObsolete() ;
-
-    /**
-     * Determines the usage for this AttributeType.
-     *
-     * @return a type safe UsageEnum
-     */
-    UsageEnum getUsage() ;
-
-    /**
-     * Gets the name of the superior class for this AttributeType.
-     *
-     * @return the super class for this AttributeType 
-     */
-    AttributeType getSuperior() ;
-
-    /**
-     * The Syntax for this AttributeType's values.
-     *
-     * @return the value syntax
-     */
-    Syntax getSyntax() ;
-
-    /**
-     * Gets a length limit for this AttributeType.
-     * 
-     * @return the length of the attribute
-     */
-    int getLength() ;
-
-    /**
-     * Gets the MatchingRule for this AttributeType used for equality matching.
-     *
-     * @return the equality matching rule
-     */
-    MatchingRule getEquality() ;
-
-    /**
-     * Gets the MatchingRule for this AttributeType used for ordering.
-     *
-     * @return the ordering matching rule
-     */
-    MatchingRule getOrdering() ;
-
-    /**
-     * Gets the MatchingRule for this AttributeType used for substring matching.
-     *
-     * @return the substring matching rule
-     */
-    MatchingRule getSubstr() ;
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+/**
+ * An attributeType specification.  attributeType specifications describe the
+ * nature of attributes within the directory.  The attributeType specification's
+ * properties are accessible through this interface.
+ * 
+ * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC 2252 Section 4.2</a>
+ * @see DescriptionUtils#getDescription(AttributeType)
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface AttributeType
+{
+    /**
+     * Gets the object identifier for this AttributeType.
+     * 
+     * @return the object identifier for this AttributeType
+     */
+    String getOid() ;
+    
+    /**
+     * Gets the first name in the list of names for this AttributeTypeImpl.
+     *
+     * @return the first name in the list of names
+     */
+    String getName() ;
+    
+    /**
+     * Gets all the names for this AttributeType.
+     *
+     * @return String names for this AttributeType
+     */
+    String[] getAllNames() ;
+
+    /**
+     * Gets a description for this AttributeType.
+     *
+     * @return the verbal description
+     */
+    String getDescription() ;
+
+    /**
+     * Gets whether or not this AttributeType is single-valued.
+     *
+     * @return true if only one value can exist for this AttributeType, false
+     *      otherwise
+     */
+    boolean isSingleValue() ;
+
+    /**
+     * Gets whether or not this AttributeType can be modified by a user.
+     *
+     * @return true if users can modify it, false if only the directory can.
+     */
+    boolean isCanUserModify() ;
+
+    /**
+     * Gets whether or not this AttributeType is a collective attribute.
+     * 
+     * @return true if the attribute is collective, false otherwise
+     */
+    boolean isCollective() ;
+    
+    /**
+     * Gets whether or not this AttributeType is obsolete.
+     *
+     * @return true if obsolete, false if not.
+     */
+    boolean isObsolete() ;
+
+    /**
+     * Determines the usage for this AttributeType.
+     *
+     * @return a type safe UsageEnum
+     */
+    UsageEnum getUsage() ;
+
+    /**
+     * Gets the name of the superior class for this AttributeType.
+     *
+     * @return the super class for this AttributeType 
+     */
+    AttributeType getSuperior() ;
+
+    /**
+     * The Syntax for this AttributeType's values.
+     *
+     * @return the value syntax
+     */
+    Syntax getSyntax() ;
+
+    /**
+     * Gets a length limit for this AttributeType.
+     * 
+     * @return the length of the attribute
+     */
+    int getLength() ;
+
+    /**
+     * Gets the MatchingRule for this AttributeType used for equality matching.
+     *
+     * @return the equality matching rule
+     */
+    MatchingRule getEquality() ;
+
+    /**
+     * Gets the MatchingRule for this AttributeType used for ordering.
+     *
+     * @return the ordering matching rule
+     */
+    MatchingRule getOrdering() ;
+
+    /**
+     * Gets the MatchingRule for this AttributeType used for substring matching.
+     *
+     * @return the substring matching rule
+     */
+    MatchingRule getSubstr() ;
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ContentRule.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ContentRule.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ContentRule.java	Tue Dec 16 17:21:15 2003
@@ -1,135 +1,135 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-/**
- * A ditContentRule specification.  ditContentRules identify the content of 
- * entries of a particular structural objectClass.  They specify the AUXILLARY 
- * objectClasses and additional attribute types permitted to appear, or excluded
- * from appearing in entries of the indicated STRUCTURAL objectClass. 
- *
- * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC 2252 Section 5.4.3
- * </a>
- * @see DescriptionUtils#getDescription(ContentRule)
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public interface ContentRule
-{
-    /**
-     * Gets a description of this ContentRule.
-     *
-     * @return a description
-     */
-    String getDescription() ;
-
-    /**
-     * Gets a short descriptive name for the ContentRule.
-     *
-     * @return a short name.
-     */
-    String getName() ;
-
-    /**
-     * Gets the oid for this ContentRule.
-     *
-     * @return the object identifier
-     */
-    String getOid() ;
-
-    /**
-     * Gets whether or not this ContentRule is obsolete.
-     *
-     * @return true if obsolete, false if not.
-     */
-    boolean isObsolete() ;
-
-    /**
-     * Gets the STRUCTURAL ObjectClass this ContentRule specifies attributes 
-     * for.
-     *
-     * @return the ObjectClass this ContentRule specifies attributes for
-     */
-    ObjectClass getObjectClass() ;
-
-    /**
-     * Gets all the AUXILLARY ObjectClasses this ContentRule specifies for the 
-     * given STRUCTURAL objectClass.
-     *
-     * @return the extra AUXILLARY ObjectClasses
-     */
-    ObjectClass[] getAuxObjectClasses() ;
-
-    /**
-     * Gets all the AttributeTypes of the "must" attribute names this 
-     * ContentRule specifies for the given STRUCTURAL objectClass.
-     *
-     * @return the AttributeTypes of attributes that must be included in entries
-     */
-    AttributeType[] getMustNames() ;
-
-    /**
-     * Gets all the AttributeTypes of the "may" attribute names this ContentRule
-     * specifies for the given STRUCTURAL objectClass.
-     *
-     * @return the AttributeTypes of attributes that may be included in entries
-     */
-    AttributeType[] getMayNames() ;
-
-    /**
-     * Gets all the AttributeTypes of the "not" attribute names this ContentRule
-     * specifies for the given STRUCTURAL objectClass.
-     *
-     * @return the AttributeTypes of attributes that are excluded in entries
-     */
-    AttributeType[] getNotNames() ;
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+/**
+ * A ditContentRule specification.  ditContentRules identify the content of 
+ * entries of a particular structural objectClass.  They specify the AUXILLARY 
+ * objectClasses and additional attribute types permitted to appear, or excluded
+ * from appearing in entries of the indicated STRUCTURAL objectClass. 
+ *
+ * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC 2252 Section 5.4.3
+ * </a>
+ * @see DescriptionUtils#getDescription(ContentRule)
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface ContentRule
+{
+    /**
+     * Gets a description of this ContentRule.
+     *
+     * @return a description
+     */
+    String getDescription() ;
+
+    /**
+     * Gets a short descriptive name for the ContentRule.
+     *
+     * @return a short name.
+     */
+    String getName() ;
+
+    /**
+     * Gets the oid for this ContentRule.
+     *
+     * @return the object identifier
+     */
+    String getOid() ;
+
+    /**
+     * Gets whether or not this ContentRule is obsolete.
+     *
+     * @return true if obsolete, false if not.
+     */
+    boolean isObsolete() ;
+
+    /**
+     * Gets the STRUCTURAL ObjectClass this ContentRule specifies attributes 
+     * for.
+     *
+     * @return the ObjectClass this ContentRule specifies attributes for
+     */
+    ObjectClass getObjectClass() ;
+
+    /**
+     * Gets all the AUXILLARY ObjectClasses this ContentRule specifies for the 
+     * given STRUCTURAL objectClass.
+     *
+     * @return the extra AUXILLARY ObjectClasses
+     */
+    ObjectClass[] getAuxObjectClasses() ;
+
+    /**
+     * Gets all the AttributeTypes of the "must" attribute names this 
+     * ContentRule specifies for the given STRUCTURAL objectClass.
+     *
+     * @return the AttributeTypes of attributes that must be included in entries
+     */
+    AttributeType[] getMustNames() ;
+
+    /**
+     * Gets all the AttributeTypes of the "may" attribute names this ContentRule
+     * specifies for the given STRUCTURAL objectClass.
+     *
+     * @return the AttributeTypes of attributes that may be included in entries
+     */
+    AttributeType[] getMayNames() ;
+
+    /**
+     * Gets all the AttributeTypes of the "not" attribute names this ContentRule
+     * specifies for the given STRUCTURAL objectClass.
+     *
+     * @return the AttributeTypes of attributes that are excluded in entries
+     */
+    AttributeType[] getNotNames() ;
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/DescriptionUtils.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/DescriptionUtils.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/DescriptionUtils.java	Tue Dec 16 17:21:15 2003
@@ -1,503 +1,503 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-/**
- * Utility class used to generate schema object specifications.
- *
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public class DescriptionUtils
-{
-    /**
-     * Generates the description using the AttributeTypeDescription as defined
-     * by the syntax: 1.3.6.1.4.1.1466.115.121.1.3.
-     * <pre>
-     * AttributeTypeDescription = "(" whsp
-     *    numericoid whsp                 ; AttributeType identifier
-     *    [ "NAME" qdescrs ]              ; name used in AttributeType
-     *    [ "DESC" qdstring ]             ; description
-     *    [ "OBSOLETE" whsp ]
-     *    [ "SUP" woid ]                  ; derived from parent AttributeType
-     *    [ "EQUALITY" woid               ; Matching Rule name
-     *    [ "ORDERING" woid               ; Matching Rule name
-     *    [ "SUBSTR" woid ]               ; Matching Rule name
-     *    [ "SYNTAX" whsp noidlen whsp ]  ; see section 4.3 RFC 2252
-     *    [ "SINGLE-VALUE" whsp ]         ; default multi-valued
-     *    [ "COLLECTIVE" whsp ]           ; default not collective
-     *    [ "NO-USER-MODIFICATION" whsp ] ; default user modifiable
-     *    [ "USAGE" whsp AttributeUsage ] ; default userApplications
-     *    whsp ")"
-     * </pre>
-     * @param a_type the attributeType to generate a description for
-     * @return the AttributeTypeDescription Syntax for the attributeType in a
-     * pretty formated string
-     */
-    public String getDescription( AttributeType a_type ) 
-    {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_type.getOid() ).append( '\n' ) ;
-        
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_type.getName() ).append( '\n' ) ;
-        
-        if ( a_type.getDescription() != null )
-        {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_type.getDescription() ).append( '\n' ) ;
-        }
-        
-        if ( a_type.isObsolete() )
-        {    
-            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
-        }
-        
-        l_buf.append( a_type.getSuperior().getOid() ) ;
-        
-        if ( a_type.getEquality() != null )
-        {
-            l_buf.append( "EQUALITY " ) ;
-            l_buf.append( a_type.getEquality().getOid() ).append( '\n' ) ;
-        }
-        
-        if ( a_type.getOrdering() != null )
-        {
-            l_buf.append( "ORDERING " ) ;
-            l_buf.append( a_type.getOrdering().getOid() ).append( '\n' ) ;
-        }
-        
-        if ( a_type.getSubstr() != null )
-        {
-            l_buf.append( "SUBSTR " ) ;
-            l_buf.append( a_type.getSubstr().getOid() ).append( '\n' ) ;
-        }
-        
-        l_buf.append( "SYNTAX " ) ;
-        l_buf.append( a_type.getSyntax().getOid() ).append( '\n' ) ;
-        
-        if ( a_type.isSingleValue() )
-        {
-            l_buf.append( "SINGLE-VALUE" ).append( '\n' ) ;
-        }
-        
-        if ( a_type.isCollective() )
-        {
-            l_buf.append( "COLLECTIVE" ).append( '\n' ) ;
-        }
-        
-        if ( a_type.isCanUserModify() )
-        {
-            l_buf.append( "NO-USER-MODIFICATION" ).append( '\n' ) ;
-        }
-        
-        l_buf.append( "USAGE " ) ;
-        l_buf.append( a_type.getUsage().getName() ).append( " ) " ) ;
-        
-        return l_buf.toString() ;
-    }
-    
-    
-    /**
-     * Generates the DITContentRuleDescription for a ContentRule as defined by
-     * the syntax: 1.3.6.1.4.1.1466.115.121.1.16. 
-     * <pre>
-     *
-     *  DITContentRuleDescription = "("
-     *      numericoid          ; Structural ObjectClass identifier
-     *      [ "NAME" qdescrs ]
-     *      [ "DESC" qdstring ]
-     *      [ "OBSOLETE" ]
-     *      [ "AUX" oids ]      ; Auxiliary ObjectClasses
-     *      [ "MUST" oids ]     ; AttributeType identifiers
-     *      [ "MAY" oids ]      ; AttributeType identifiers
-     *      [ "NOT" oids ]      ; AttributeType identifiers
-     *     ")"
-     * </pre>
-     * @param a_crule the DIT content rule specification 
-     * @return the specification according to the DITContentRuleDescription
-     * syntax 
-     */
-    public String getDescription( ContentRule a_crule )
-    {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_crule.getOid() ).append( '\n' ) ;
-        
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_crule.getName() ).append( '\n' ) ;
-        
-        if ( a_crule.getDescription() != null )
-        {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_crule.getDescription() ).append( '\n' ) ;
-        }
-        
-        if ( a_crule.isObsolete() )
-        {    
-            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
-        }
-        
-        // print out all the auxillary object class oids
-        ObjectClass [] l_aux = a_crule.getAuxObjectClasses() ;
-        if ( l_aux != null && l_aux.length > 0 )
-        {
-            l_buf.append( "AUX\n" ) ;
-            for ( int ii = 0; ii < l_aux.length; ii++ ) 
-            {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_aux[ii].getOid() ).append( '\n' ) ;
-            }
-        }
-        
-        AttributeType [] l_must = a_crule.getMustNames() ;
-        if ( l_must != null && l_must.length > 0 )
-        {
-            l_buf.append( "MUST\n" ) ;
-            for ( int ii = 0; ii < l_must.length; ii++ ) 
-            {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_must[ii].getOid() ).append( '\n' ) ;
-            }
-        }
-        
-        AttributeType [] l_may = a_crule.getMayNames() ;
-        if ( l_may != null && l_may.length > 0 )
-        {
-            l_buf.append( "MAY\n" ) ;
-            for ( int ii = 0; ii < l_may.length; ii++ ) 
-            {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_may[ii].getOid() ).append( '\n' ) ;
-            }
-        }
-        
-        AttributeType [] l_not = a_crule.getNotNames() ;
-        if ( l_not != null && l_not.length > 0 )
-        {
-            l_buf.append( "NOT\n" ) ;
-            for ( int ii = 0; ii < l_not.length; ii++ ) 
-            {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_not[ii].getOid() ).append( '\n' ) ;
-            }
-        }
-        
-        l_buf.append( " )" ) ;
-        return l_buf.toString() ;
-    }
-    
-    
-    /**
-     * Generates the MatchingRuleDescription for a MatchingRule as defined by 
-     * the syntax: 1.3.6.1.4.1.1466.115.121.1.30.
-     * <pre>
-     * MatchingRuleDescription = "(" whsp
-     *    numericoid whsp       ; MatchingRule object identifier
-     *    [ "NAME" qdescrs ]
-     *    [ "DESC" qdstring ]
-     *    [ "OBSOLETE" whsp ]
-     *    "SYNTAX" numericoid
-     * whsp ")"
-     * </pre>
-     * @param a_mrule the MatchingRule to generate the description for
-     * @return the MatchingRuleDescription string
-     */
-    public String getDescription( MatchingRule a_mrule )
-    {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_mrule.getOid() ).append( '\n' ) ;
-        
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_mrule.getName() ).append( '\n' ) ;
-        
-        if ( a_mrule.getDescription() != null )
-        {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_mrule.getDescription() ).append( '\n' ) ;
-        }
-        
-        if ( a_mrule.isObsolete() )
-        {    
-            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
-        }
-        
-        l_buf.append( "SYNTAX " ).append( a_mrule.getSyntax().getOid() ) ;
-        l_buf.append( " ) " ) ;
-        return l_buf.toString() ;
-    }
-    
-    
-    /**
-     * Generates the NameFormDescription for a NameForm as defined by the 
-     * syntax: 1.3.6.1.4.1.1466.115.121.1.35.
-     * <pre>
-     * NameFormDescription = "(" whsp
-     *     numericoid whsp                ; NameForm identifier
-     *     [ "NAME" qdescrs ]
-     *     [ "DESC" qdstring ]
-     *     [ "OBSOLETE" whsp ]
-     *     "OC" woid                      ; Structural ObjectClass
-     *     "MUST" oids                    ; AttributeTypes
-     *     [ "MAY" oids ]                 ; AttributeTypes
-     * whsp ")"
-     *</pre>
-     * @param a_nameForm the NameForm to generate the description for
-     * @return the NameFormDescription string
-     */
-    public String getDescription( NameForm a_nameForm )
-    {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_nameForm.getOid() ).append( '\n' ) ;
-        
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_nameForm.getName() ).append( '\n' ) ;
-        
-        if ( a_nameForm.getDescription() != null )
-        {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_nameForm.getDescription() ).append( '\n' ) ;
-        }
-        
-        if ( a_nameForm.isObsolete() )
-        {    
-            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
-        }
-        
-        l_buf.append( "OC " ) ;
-        l_buf.append( a_nameForm.getObjectClass().getOid() ).append( '\n' ) ;
-        
-        l_buf.append( "MUST\n" ) ;
-        AttributeType[] l_must = a_nameForm.getMustUse() ;
-        for ( int ii = 0; ii < l_must.length; ii++ )
-        {
-            l_buf.append( '\t' ) ;
-            l_buf.append( l_must[ii].getOid() ).append( '\n' ) ;
-        }
-        
-        AttributeType[] l_may = a_nameForm.getMaytUse() ;
-        if ( l_may != null && l_may.length > 0 )
-        {
-            l_buf.append( "MAY\n" ) ;
-            for ( int ii = 0; ii < l_must.length; ii++ )
-            {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_may[ii].getOid() ).append( '\n' ) ;
-            }
-        }
-        
-        l_buf.append( " )" ) ;
-        return l_buf.toString() ;
-    }
-    
-    
-    /**
-     * Generates the ObjectClassDescription for an ObjectClass as defined by the
-     * syntax: 1.3.6.1.4.1.1466.115.121.1.37.
-     * <pre>
-     * ObjectClassDescription = "(" whsp
-     *     numericoid whsp      ; ObjectClass identifier
-     *     [ "NAME" qdescrs ]
-     *     [ "DESC" qdstring ]
-     *     [ "OBSOLETE" whsp ]
-     *     [ "SUP" oids ]       ; Superior ObjectClasses
-     *     [ ( "ABSTRACT" / "STRUCTURAL" / "AUXILIARY" ) whsp ]
-     *                          ; default structural
-     *     [ "MUST" oids ]      ; AttributeTypes
-     *     [ "MAY" oids ]       ; AttributeTypes
-     * whsp ")"
-     * </pre>
-     * @param a_objectClass the ObjectClass to generate a description for
-     * @return the description in the ObjectClassDescription syntax
-     */
-    public String getDescription( ObjectClass a_objectClass )
-    {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_objectClass.getOid() ).append( '\n' ) ;
-        
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_objectClass.getName() ).append( '\n' ) ;
-        
-        if ( a_objectClass.getDescription() != null )
-        {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_objectClass.getDescription() ).append( '\n' ) ;
-        }
-        
-        if ( a_objectClass.isObsolete() )
-        {    
-            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
-        }
-        
-        ObjectClass [] l_sups = a_objectClass.getSuperClasses() ;
-        if ( l_sups != null && l_sups.length > 0 )
-        {
-            l_buf.append( "SUP\n" ) ;
-            for ( int ii = 0; ii < l_sups.length; ii++ )
-            {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_sups[ii].getOid() ).append( '\n' ) ;
-            }
-        }
-        
-        if ( a_objectClass.getType() != null )
-        {
-            l_buf.append( a_objectClass.getType().getName() ).append( '\n' ) ;
-        }
-        
-        AttributeType [] l_must = a_objectClass.getMustList() ;
-        if ( l_must != null && l_must.length > 0 )
-        {
-            l_buf.append( "MUST\n" ) ;
-            for ( int ii = 0; ii < l_must.length; ii++ )
-            {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_must[ii].getOid() ).append( '\n' ) ;
-            }
-        }
-        
-        AttributeType [] l_may = a_objectClass.getMayList() ;
-        if ( l_may != null && l_may.length > 0 )
-        {
-            l_buf.append( "MAY\n" ) ;
-            for ( int ii = 0; ii < l_may.length; ii++ )
-            {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_may[ii].getOid() ).append( '\n' ) ;
-            }
-        }
-        
-        l_buf.append( " )" ) ;
-        return l_buf.toString() ;
-    }
-    
-    
-    /**
-     * Generates the DITStructureRuleDescription for a StructureRule as defined
-     * by the syntax: 1.3.6.1.4.1.1466.115.121.1.17.
-     * <pre>
-     * DITStructureRuleDescription = "(" whsp
-     *     ruleidentifier whsp            ; DITStructureRule identifier
-     *     [ "NAME" qdescrs ]
-     *     [ "DESC" qdstring ]
-     *     [ "OBSOLETE" whsp ]
-     *     "FORM" woid whsp               ; NameForm
-     *     [ "SUP" ruleidentifiers whsp ] ; superior DITStructureRules
-     * ")"
-     * </pre>
-     * @param a_srule the StructureRule to generate a description for
-     * @return the description in the DITStructureRuleDescription syntax
-     */
-    public String getDescription( StructureRule a_srule )
-    {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_srule.getOid() ).append( '\n' ) ;
-        
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_srule.getName() ).append( '\n' ) ;
-        
-        if ( a_srule.getDescription() != null )
-        {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_srule.getDescription() ).append( '\n' ) ;
-        }
-        
-        if ( a_srule.isObsolete() )
-        {    
-            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
-        }
-        
-        l_buf.append( "FORM " ) ;
-        l_buf.append( a_srule.getNameForm().getOid() ).append( '\n' ) ;
-        
-        StructureRule [] l_sups = a_srule.getSuperClasses() ;
-        if ( l_sups != null && l_sups.length > 0 )
-        {
-            l_buf.append( "SUP\n" ) ;
-            for ( int ii = 0; ii < l_sups.length; ii++ )
-            {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_sups[ii].getOid() ).append( '\n' ) ;
-            }
-        }
-        
-        l_buf.append( " )" ) ;
-        return l_buf.toString() ;
-    }
-
-
-    /**
-     * Generates the SyntaxDescription for a Syntax as defined by the syntax:
-     * 1.3.6.1.4.1.1466.115.121.1.54.
-     * <pre>
-     * SyntaxDescription = "(" whsp
-     *     numericoid whsp
-     *     [ "DESC" qdstring ]
-     * whsp ")"
-     * </pre>
-     * @param a_syntax the Syntax to generate a description for
-     * @return the description in the SyntaxDescription syntax
-     */
-    public String getDescription( Syntax a_syntax )
-    {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_syntax.getOid() ).append( '\n' ) ;
-        
-        if ( a_syntax.getDescription() != null )
-        {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_syntax.getDescription() ).append( '\n' ) ;
-        }
-        
-        l_buf.append( " )" ) ;
-        return l_buf.toString() ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+/**
+ * Utility class used to generate schema object specifications.
+ *
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public class DescriptionUtils
+{
+    /**
+     * Generates the description using the AttributeTypeDescription as defined
+     * by the syntax: 1.3.6.1.4.1.1466.115.121.1.3.
+     * <pre>
+     * AttributeTypeDescription = "(" whsp
+     *    numericoid whsp                 ; AttributeType identifier
+     *    [ "NAME" qdescrs ]              ; name used in AttributeType
+     *    [ "DESC" qdstring ]             ; description
+     *    [ "OBSOLETE" whsp ]
+     *    [ "SUP" woid ]                  ; derived from parent AttributeType
+     *    [ "EQUALITY" woid               ; Matching Rule name
+     *    [ "ORDERING" woid               ; Matching Rule name
+     *    [ "SUBSTR" woid ]               ; Matching Rule name
+     *    [ "SYNTAX" whsp noidlen whsp ]  ; see section 4.3 RFC 2252
+     *    [ "SINGLE-VALUE" whsp ]         ; default multi-valued
+     *    [ "COLLECTIVE" whsp ]           ; default not collective
+     *    [ "NO-USER-MODIFICATION" whsp ] ; default user modifiable
+     *    [ "USAGE" whsp AttributeUsage ] ; default userApplications
+     *    whsp ")"
+     * </pre>
+     * @param a_type the attributeType to generate a description for
+     * @return the AttributeTypeDescription Syntax for the attributeType in a
+     * pretty formated string
+     */
+    public String getDescription( AttributeType a_type ) 
+    {
+        StringBuffer l_buf = new StringBuffer( "( " ) ;
+        l_buf.append( a_type.getOid() ).append( '\n' ) ;
+        
+        l_buf.append( "NAME " ) ;
+        l_buf.append( a_type.getName() ).append( '\n' ) ;
+        
+        if ( a_type.getDescription() != null )
+        {    
+            l_buf.append( "DESC " ) ;
+            l_buf.append( a_type.getDescription() ).append( '\n' ) ;
+        }
+        
+        if ( a_type.isObsolete() )
+        {    
+            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
+        }
+        
+        l_buf.append( a_type.getSuperior().getOid() ) ;
+        
+        if ( a_type.getEquality() != null )
+        {
+            l_buf.append( "EQUALITY " ) ;
+            l_buf.append( a_type.getEquality().getOid() ).append( '\n' ) ;
+        }
+        
+        if ( a_type.getOrdering() != null )
+        {
+            l_buf.append( "ORDERING " ) ;
+            l_buf.append( a_type.getOrdering().getOid() ).append( '\n' ) ;
+        }
+        
+        if ( a_type.getSubstr() != null )
+        {
+            l_buf.append( "SUBSTR " ) ;
+            l_buf.append( a_type.getSubstr().getOid() ).append( '\n' ) ;
+        }
+        
+        l_buf.append( "SYNTAX " ) ;
+        l_buf.append( a_type.getSyntax().getOid() ).append( '\n' ) ;
+        
+        if ( a_type.isSingleValue() )
+        {
+            l_buf.append( "SINGLE-VALUE" ).append( '\n' ) ;
+        }
+        
+        if ( a_type.isCollective() )
+        {
+            l_buf.append( "COLLECTIVE" ).append( '\n' ) ;
+        }
+        
+        if ( a_type.isCanUserModify() )
+        {
+            l_buf.append( "NO-USER-MODIFICATION" ).append( '\n' ) ;
+        }
+        
+        l_buf.append( "USAGE " ) ;
+        l_buf.append( a_type.getUsage().getName() ).append( " ) " ) ;
+        
+        return l_buf.toString() ;
+    }
+    
+    
+    /**
+     * Generates the DITContentRuleDescription for a ContentRule as defined by
+     * the syntax: 1.3.6.1.4.1.1466.115.121.1.16. 
+     * <pre>
+     *
+     *  DITContentRuleDescription = "("
+     *      numericoid          ; Structural ObjectClass identifier
+     *      [ "NAME" qdescrs ]
+     *      [ "DESC" qdstring ]
+     *      [ "OBSOLETE" ]
+     *      [ "AUX" oids ]      ; Auxiliary ObjectClasses
+     *      [ "MUST" oids ]     ; AttributeType identifiers
+     *      [ "MAY" oids ]      ; AttributeType identifiers
+     *      [ "NOT" oids ]      ; AttributeType identifiers
+     *     ")"
+     * </pre>
+     * @param a_crule the DIT content rule specification 
+     * @return the specification according to the DITContentRuleDescription
+     * syntax 
+     */
+    public String getDescription( ContentRule a_crule )
+    {
+        StringBuffer l_buf = new StringBuffer( "( " ) ;
+        l_buf.append( a_crule.getOid() ).append( '\n' ) ;
+        
+        l_buf.append( "NAME " ) ;
+        l_buf.append( a_crule.getName() ).append( '\n' ) ;
+        
+        if ( a_crule.getDescription() != null )
+        {    
+            l_buf.append( "DESC " ) ;
+            l_buf.append( a_crule.getDescription() ).append( '\n' ) ;
+        }
+        
+        if ( a_crule.isObsolete() )
+        {    
+            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
+        }
+        
+        // print out all the auxillary object class oids
+        ObjectClass [] l_aux = a_crule.getAuxObjectClasses() ;
+        if ( l_aux != null && l_aux.length > 0 )
+        {
+            l_buf.append( "AUX\n" ) ;
+            for ( int ii = 0; ii < l_aux.length; ii++ ) 
+            {
+                l_buf.append( '\t' ) ;
+                l_buf.append( l_aux[ii].getOid() ).append( '\n' ) ;
+            }
+        }
+        
+        AttributeType [] l_must = a_crule.getMustNames() ;
+        if ( l_must != null && l_must.length > 0 )
+        {
+            l_buf.append( "MUST\n" ) ;
+            for ( int ii = 0; ii < l_must.length; ii++ ) 
+            {
+                l_buf.append( '\t' ) ;
+                l_buf.append( l_must[ii].getOid() ).append( '\n' ) ;
+            }
+        }
+        
+        AttributeType [] l_may = a_crule.getMayNames() ;
+        if ( l_may != null && l_may.length > 0 )
+        {
+            l_buf.append( "MAY\n" ) ;
+            for ( int ii = 0; ii < l_may.length; ii++ ) 
+            {
+                l_buf.append( '\t' ) ;
+                l_buf.append( l_may[ii].getOid() ).append( '\n' ) ;
+            }
+        }
+        
+        AttributeType [] l_not = a_crule.getNotNames() ;
+        if ( l_not != null && l_not.length > 0 )
+        {
+            l_buf.append( "NOT\n" ) ;
+            for ( int ii = 0; ii < l_not.length; ii++ ) 
+            {
+                l_buf.append( '\t' ) ;
+                l_buf.append( l_not[ii].getOid() ).append( '\n' ) ;
+            }
+        }
+        
+        l_buf.append( " )" ) ;
+        return l_buf.toString() ;
+    }
+    
+    
+    /**
+     * Generates the MatchingRuleDescription for a MatchingRule as defined by 
+     * the syntax: 1.3.6.1.4.1.1466.115.121.1.30.
+     * <pre>
+     * MatchingRuleDescription = "(" whsp
+     *    numericoid whsp       ; MatchingRule object identifier
+     *    [ "NAME" qdescrs ]
+     *    [ "DESC" qdstring ]
+     *    [ "OBSOLETE" whsp ]
+     *    "SYNTAX" numericoid
+     * whsp ")"
+     * </pre>
+     * @param a_mrule the MatchingRule to generate the description for
+     * @return the MatchingRuleDescription string
+     */
+    public String getDescription( MatchingRule a_mrule )
+    {
+        StringBuffer l_buf = new StringBuffer( "( " ) ;
+        l_buf.append( a_mrule.getOid() ).append( '\n' ) ;
+        
+        l_buf.append( "NAME " ) ;
+        l_buf.append( a_mrule.getName() ).append( '\n' ) ;
+        
+        if ( a_mrule.getDescription() != null )
+        {    
+            l_buf.append( "DESC " ) ;
+            l_buf.append( a_mrule.getDescription() ).append( '\n' ) ;
+        }
+        
+        if ( a_mrule.isObsolete() )
+        {    
+            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
+        }
+        
+        l_buf.append( "SYNTAX " ).append( a_mrule.getSyntax().getOid() ) ;
+        l_buf.append( " ) " ) ;
+        return l_buf.toString() ;
+    }
+    
+    
+    /**
+     * Generates the NameFormDescription for a NameForm as defined by the 
+     * syntax: 1.3.6.1.4.1.1466.115.121.1.35.
+     * <pre>
+     * NameFormDescription = "(" whsp
+     *     numericoid whsp                ; NameForm identifier
+     *     [ "NAME" qdescrs ]
+     *     [ "DESC" qdstring ]
+     *     [ "OBSOLETE" whsp ]
+     *     "OC" woid                      ; Structural ObjectClass
+     *     "MUST" oids                    ; AttributeTypes
+     *     [ "MAY" oids ]                 ; AttributeTypes
+     * whsp ")"
+     *</pre>
+     * @param a_nameForm the NameForm to generate the description for
+     * @return the NameFormDescription string
+     */
+    public String getDescription( NameForm a_nameForm )
+    {
+        StringBuffer l_buf = new StringBuffer( "( " ) ;
+        l_buf.append( a_nameForm.getOid() ).append( '\n' ) ;
+        
+        l_buf.append( "NAME " ) ;
+        l_buf.append( a_nameForm.getName() ).append( '\n' ) ;
+        
+        if ( a_nameForm.getDescription() != null )
+        {    
+            l_buf.append( "DESC " ) ;
+            l_buf.append( a_nameForm.getDescription() ).append( '\n' ) ;
+        }
+        
+        if ( a_nameForm.isObsolete() )
+        {    
+            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
+        }
+        
+        l_buf.append( "OC " ) ;
+        l_buf.append( a_nameForm.getObjectClass().getOid() ).append( '\n' ) ;
+        
+        l_buf.append( "MUST\n" ) ;
+        AttributeType[] l_must = a_nameForm.getMustUse() ;
+        for ( int ii = 0; ii < l_must.length; ii++ )
+        {
+            l_buf.append( '\t' ) ;
+            l_buf.append( l_must[ii].getOid() ).append( '\n' ) ;
+        }
+        
+        AttributeType[] l_may = a_nameForm.getMaytUse() ;
+        if ( l_may != null && l_may.length > 0 )
+        {
+            l_buf.append( "MAY\n" ) ;
+            for ( int ii = 0; ii < l_must.length; ii++ )
+            {
+                l_buf.append( '\t' ) ;
+                l_buf.append( l_may[ii].getOid() ).append( '\n' ) ;
+            }
+        }
+        
+        l_buf.append( " )" ) ;
+        return l_buf.toString() ;
+    }
+    
+    
+    /**
+     * Generates the ObjectClassDescription for an ObjectClass as defined by the
+     * syntax: 1.3.6.1.4.1.1466.115.121.1.37.
+     * <pre>
+     * ObjectClassDescription = "(" whsp
+     *     numericoid whsp      ; ObjectClass identifier
+     *     [ "NAME" qdescrs ]
+     *     [ "DESC" qdstring ]
+     *     [ "OBSOLETE" whsp ]
+     *     [ "SUP" oids ]       ; Superior ObjectClasses
+     *     [ ( "ABSTRACT" / "STRUCTURAL" / "AUXILIARY" ) whsp ]
+     *                          ; default structural
+     *     [ "MUST" oids ]      ; AttributeTypes
+     *     [ "MAY" oids ]       ; AttributeTypes
+     * whsp ")"
+     * </pre>
+     * @param a_objectClass the ObjectClass to generate a description for
+     * @return the description in the ObjectClassDescription syntax
+     */
+    public String getDescription( ObjectClass a_objectClass )
+    {
+        StringBuffer l_buf = new StringBuffer( "( " ) ;
+        l_buf.append( a_objectClass.getOid() ).append( '\n' ) ;
+        
+        l_buf.append( "NAME " ) ;
+        l_buf.append( a_objectClass.getName() ).append( '\n' ) ;
+        
+        if ( a_objectClass.getDescription() != null )
+        {    
+            l_buf.append( "DESC " ) ;
+            l_buf.append( a_objectClass.getDescription() ).append( '\n' ) ;
+        }
+        
+        if ( a_objectClass.isObsolete() )
+        {    
+            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
+        }
+        
+        ObjectClass [] l_sups = a_objectClass.getSuperClasses() ;
+        if ( l_sups != null && l_sups.length > 0 )
+        {
+            l_buf.append( "SUP\n" ) ;
+            for ( int ii = 0; ii < l_sups.length; ii++ )
+            {
+                l_buf.append( '\t' ) ;
+                l_buf.append( l_sups[ii].getOid() ).append( '\n' ) ;
+            }
+        }
+        
+        if ( a_objectClass.getType() != null )
+        {
+            l_buf.append( a_objectClass.getType().getName() ).append( '\n' ) ;
+        }
+        
+        AttributeType [] l_must = a_objectClass.getMustList() ;
+        if ( l_must != null && l_must.length > 0 )
+        {
+            l_buf.append( "MUST\n" ) ;
+            for ( int ii = 0; ii < l_must.length; ii++ )
+            {
+                l_buf.append( '\t' ) ;
+                l_buf.append( l_must[ii].getOid() ).append( '\n' ) ;
+            }
+        }
+        
+        AttributeType [] l_may = a_objectClass.getMayList() ;
+        if ( l_may != null && l_may.length > 0 )
+        {
+            l_buf.append( "MAY\n" ) ;
+            for ( int ii = 0; ii < l_may.length; ii++ )
+            {
+                l_buf.append( '\t' ) ;
+                l_buf.append( l_may[ii].getOid() ).append( '\n' ) ;
+            }
+        }
+        
+        l_buf.append( " )" ) ;
+        return l_buf.toString() ;
+    }
+    
+    
+    /**
+     * Generates the DITStructureRuleDescription for a StructureRule as defined
+     * by the syntax: 1.3.6.1.4.1.1466.115.121.1.17.
+     * <pre>
+     * DITStructureRuleDescription = "(" whsp
+     *     ruleidentifier whsp            ; DITStructureRule identifier
+     *     [ "NAME" qdescrs ]
+     *     [ "DESC" qdstring ]
+     *     [ "OBSOLETE" whsp ]
+     *     "FORM" woid whsp               ; NameForm
+     *     [ "SUP" ruleidentifiers whsp ] ; superior DITStructureRules
+     * ")"
+     * </pre>
+     * @param a_srule the StructureRule to generate a description for
+     * @return the description in the DITStructureRuleDescription syntax
+     */
+    public String getDescription( StructureRule a_srule )
+    {
+        StringBuffer l_buf = new StringBuffer( "( " ) ;
+        l_buf.append( a_srule.getOid() ).append( '\n' ) ;
+        
+        l_buf.append( "NAME " ) ;
+        l_buf.append( a_srule.getName() ).append( '\n' ) ;
+        
+        if ( a_srule.getDescription() != null )
+        {    
+            l_buf.append( "DESC " ) ;
+            l_buf.append( a_srule.getDescription() ).append( '\n' ) ;
+        }
+        
+        if ( a_srule.isObsolete() )
+        {    
+            l_buf.append( "OBSOLETE" ).append( '\n' ) ;
+        }
+        
+        l_buf.append( "FORM " ) ;
+        l_buf.append( a_srule.getNameForm().getOid() ).append( '\n' ) ;
+        
+        StructureRule [] l_sups = a_srule.getSuperClasses() ;
+        if ( l_sups != null && l_sups.length > 0 )
+        {
+            l_buf.append( "SUP\n" ) ;
+            for ( int ii = 0; ii < l_sups.length; ii++ )
+            {
+                l_buf.append( '\t' ) ;
+                l_buf.append( l_sups[ii].getOid() ).append( '\n' ) ;
+            }
+        }
+        
+        l_buf.append( " )" ) ;
+        return l_buf.toString() ;
+    }
+
+
+    /**
+     * Generates the SyntaxDescription for a Syntax as defined by the syntax:
+     * 1.3.6.1.4.1.1466.115.121.1.54.
+     * <pre>
+     * SyntaxDescription = "(" whsp
+     *     numericoid whsp
+     *     [ "DESC" qdstring ]
+     * whsp ")"
+     * </pre>
+     * @param a_syntax the Syntax to generate a description for
+     * @return the description in the SyntaxDescription syntax
+     */
+    public String getDescription( Syntax a_syntax )
+    {
+        StringBuffer l_buf = new StringBuffer( "( " ) ;
+        l_buf.append( a_syntax.getOid() ).append( '\n' ) ;
+        
+        if ( a_syntax.getDescription() != null )
+        {    
+            l_buf.append( "DESC " ) ;
+            l_buf.append( a_syntax.getDescription() ).append( '\n' ) ;
+        }
+        
+        l_buf.append( " )" ) ;
+        return l_buf.toString() ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/MatchingRule.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/MatchingRule.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/MatchingRule.java	Tue Dec 16 17:21:15 2003
@@ -1,120 +1,120 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-import java.util.Comparator ;
-
-
-/**
- * A matchingRule definition.  MatchingRules associate a comparator and a 
- * normalizer, forming the basic tools necessary to assert actions against 
- * attribute values.  MatchingRules are associated with a specific Syntax 
- * for the purpose of resolving a normalized form and for comparisons.  
- *
- * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC 2252 Section 4.5</a>
- * @see DescriptionUtils#getDescription(MatchingRule)
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public interface MatchingRule
-{
-    /**
-     * Gets a long description for the MatchingRule.
-     * 
-     * @return a long description
-     */
-    String getDescription() ;
-
-    /**
-     * Gets a short descriptive name for the MatchingRule. 
-     * 
-     * @return a short name
-     */
-    String getName() ;
-
-    /**
-     * Gets the oid for this MatchingRule.
-     * 
-     * @return the object identifier
-     */
-    String getOid() ;
-
-    /**
-     * Gets the SyntaxImpl used by this MatchingRule.
-     * 
-     * @return the SyntaxImpl of this MatchingRule
-     */
-    Syntax getSyntax() ;
-
-    /**
-     * Gets whether or not this MatchingRule has been obsoleted for another.
-     * 
-     * @return true if it is obsolete false otherwise
-     */
-    boolean isObsolete() ;
-
-    /**
-     * Gets the Comparator enabling the use of this MatchingRule for ORDERING
-     * and sorted indexing. 
-     * 
-     * @return the ordering Comparator 
-     */
-    Comparator getComparator() ;
-
-    /**
-     * Gets the Normalizer enabling the use of this MatchingRule for EQUALITY
-     * matching and indexing. 
-     * 
-     * @return the ordering Comparator 
-     */
-    Normalizer getNormalizer() ;
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+import java.util.Comparator ;
+
+
+/**
+ * A matchingRule definition.  MatchingRules associate a comparator and a 
+ * normalizer, forming the basic tools necessary to assert actions against 
+ * attribute values.  MatchingRules are associated with a specific Syntax 
+ * for the purpose of resolving a normalized form and for comparisons.  
+ *
+ * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC 2252 Section 4.5</a>
+ * @see DescriptionUtils#getDescription(MatchingRule)
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface MatchingRule
+{
+    /**
+     * Gets a long description for the MatchingRule.
+     * 
+     * @return a long description
+     */
+    String getDescription() ;
+
+    /**
+     * Gets a short descriptive name for the MatchingRule. 
+     * 
+     * @return a short name
+     */
+    String getName() ;
+
+    /**
+     * Gets the oid for this MatchingRule.
+     * 
+     * @return the object identifier
+     */
+    String getOid() ;
+
+    /**
+     * Gets the SyntaxImpl used by this MatchingRule.
+     * 
+     * @return the SyntaxImpl of this MatchingRule
+     */
+    Syntax getSyntax() ;
+
+    /**
+     * Gets whether or not this MatchingRule has been obsoleted for another.
+     * 
+     * @return true if it is obsolete false otherwise
+     */
+    boolean isObsolete() ;
+
+    /**
+     * Gets the Comparator enabling the use of this MatchingRule for ORDERING
+     * and sorted indexing. 
+     * 
+     * @return the ordering Comparator 
+     */
+    Comparator getComparator() ;
+
+    /**
+     * Gets the Normalizer enabling the use of this MatchingRule for EQUALITY
+     * matching and indexing. 
+     * 
+     * @return the ordering Comparator 
+     */
+    Normalizer getNormalizer() ;
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/NameForm.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/NameForm.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/NameForm.java	Tue Dec 16 17:21:15 2003
@@ -1,120 +1,120 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-/**
- * A nameForm description.  NameForms define the relationship between a 
- * STRUCTURAL objectClass definition and the attributeTypes allowed to be used
- * for the naming of an Entry of that objectClass: it defines which attributes 
- * can be used for the RDN.
- *
- * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252 Section 6.22</a>
- * @see DescriptionUtils#getDescription(NameForm)
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public interface NameForm
-{
-    /**
-     * Gets a description of this NameForm.
-     *
-     * @return a description
-     */
-    String getDescription() ;
-
-    /**
-     * Gets a short descriptive name for the NameForm.
-     *
-     * @return a short name.
-     */
-    String getName() ;
-
-    /**
-     * Gets the oid for this NameForm.
-     *
-     * @return the object identifier
-     */
-    String getOid() ;
-
-    /**
-     * Gets whether or not this NameForm is obsolete.
-     *
-     * @return true if obsolete, false if not.
-     */
-    boolean isObsolete() ;
-
-    /**
-     * Gets the STRUCTURAL ObjectClass this name form specifies naming 
-     * attributes for.
-     *
-     * @return the ObjectClass this NameForm is for
-     */
-    ObjectClass getObjectClass() ;
-
-    /**
-     * Gets all the AttributeTypes of the attributes this NameForm specifies as 
-     * having to be used in the given objectClass for naming: as part of the 
-     * Rdn.
-     *
-     * @return the AttributeTypes of the must use attributes
-     */
-    AttributeType [] getMustUse() ;
-    
-    /**
-     * Gets all the AttributeTypes of the attribute this NameForm specifies as 
-     * being useable without requirement in the given objectClass for naming: 
-     * as part of the Rdn.
-     *
-     * @return the AttributeTypes of the may use attributes
-     */
-    AttributeType [] getMaytUse() ;
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+/**
+ * A nameForm description.  NameForms define the relationship between a 
+ * STRUCTURAL objectClass definition and the attributeTypes allowed to be used
+ * for the naming of an Entry of that objectClass: it defines which attributes 
+ * can be used for the RDN.
+ *
+ * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252 Section 6.22</a>
+ * @see DescriptionUtils#getDescription(NameForm)
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface NameForm
+{
+    /**
+     * Gets a description of this NameForm.
+     *
+     * @return a description
+     */
+    String getDescription() ;
+
+    /**
+     * Gets a short descriptive name for the NameForm.
+     *
+     * @return a short name.
+     */
+    String getName() ;
+
+    /**
+     * Gets the oid for this NameForm.
+     *
+     * @return the object identifier
+     */
+    String getOid() ;
+
+    /**
+     * Gets whether or not this NameForm is obsolete.
+     *
+     * @return true if obsolete, false if not.
+     */
+    boolean isObsolete() ;
+
+    /**
+     * Gets the STRUCTURAL ObjectClass this name form specifies naming 
+     * attributes for.
+     *
+     * @return the ObjectClass this NameForm is for
+     */
+    ObjectClass getObjectClass() ;
+
+    /**
+     * Gets all the AttributeTypes of the attributes this NameForm specifies as 
+     * having to be used in the given objectClass for naming: as part of the 
+     * Rdn.
+     *
+     * @return the AttributeTypes of the must use attributes
+     */
+    AttributeType [] getMustUse() ;
+    
+    /**
+     * Gets all the AttributeTypes of the attribute this NameForm specifies as 
+     * being useable without requirement in the given objectClass for naming: 
+     * as part of the Rdn.
+     *
+     * @return the AttributeTypes of the may use attributes
+     */
+    AttributeType [] getMaytUse() ;
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/Normalizer.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/Normalizer.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/Normalizer.java	Tue Dec 16 17:21:15 2003
@@ -1,80 +1,80 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-import javax.naming.NamingException ;
-
-
-/**
- * Converts attribute values to a canonical form.
- * 
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public interface Normalizer
-{
-    /**
-     * Gets the equality match OID associated with this normalizer.
-     *
-     * @return the OID for the equality match used
-     */
-    String getMatchingRule() ;
-    
-    /**
-     * Gets the normalizer associated with the equality matching rule.
-     *
-     * @param a_value the value to normalize
-     * @return the normalized form for a_value
-     * @throws NamingException if an error results during normalization
-     */
-    Object normalize( Object a_value ) throws NamingException ;
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+import javax.naming.NamingException ;
+
+
+/**
+ * Converts attribute values to a canonical form.
+ * 
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface Normalizer
+{
+    /**
+     * Gets the equality match OID associated with this normalizer.
+     *
+     * @return the OID for the equality match used
+     */
+    String getMatchingRule() ;
+    
+    /**
+     * Gets the normalizer associated with the equality matching rule.
+     *
+     * @param a_value the value to normalize
+     * @return the normalized form for a_value
+     * @throws NamingException if an error results during normalization
+     */
+    Object normalize( Object a_value ) throws NamingException ;
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ObjectClass.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ObjectClass.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ObjectClass.java	Tue Dec 16 17:21:15 2003
@@ -1,123 +1,123 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-/**
- * An objectClass definition.
- *
- * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252 Section 4.4</a>
- * @see DescriptionUtils#getDescription(ObjectClass)
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public interface ObjectClass
-{
-    /**
-     * Gets a verbal description of this ObjectClass.
-     *
-     * @return a verbal description
-     */
-    String getDescription() ;
-
-    /**
-     * Gets the object identifier for this ObjectClass definition.
-     *
-     * @return the OID for this ObjectClass
-     */
-    String getOid() ;
-
-    /**
-     * Gets the human readable name of this ObjectClass.
-     *
-     * @return the name of this ObjectClass
-     */
-    String getName() ;
-
-    /**
-     * Gets whether or not this NameForm is obsolete.
-     *
-     * @return true if obsolete, false if not.
-     */
-    boolean isObsolete() ;
-
-    /**
-     * Gets the superclasses of this ObjectClass.
-     *
-     * @return the superclasses
-     */
-    ObjectClass [] getSuperClasses() ;
-
-    /**
-     * Gets the type of this ObjectClass as a type safe enum.
-     *
-     * @return the ObjectClass type as an enum
-     */
-    ObjectClassTypeEnum getType() ;
-
-    /**
-     * Gets the AttributeTypes whose attributes must be present within an entry
-     * of this ObjectClass.
-     *
-     * @return the AttributeTypes of attributes that must be within entries of
-     * this ObjectClass
-     */
-    AttributeType [] getMustList() ;
-
-    /**
-     * Gets the AttributeTypes whose attributes may be present within an entry
-     * of this ObjectClass.
-     *
-     * @return the AttributeTypes of attributes that may be within entries of
-     * this ObjectClass
-     */
-    AttributeType [] getMayList() ;
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+/**
+ * An objectClass definition.
+ *
+ * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252 Section 4.4</a>
+ * @see DescriptionUtils#getDescription(ObjectClass)
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface ObjectClass
+{
+    /**
+     * Gets a verbal description of this ObjectClass.
+     *
+     * @return a verbal description
+     */
+    String getDescription() ;
+
+    /**
+     * Gets the object identifier for this ObjectClass definition.
+     *
+     * @return the OID for this ObjectClass
+     */
+    String getOid() ;
+
+    /**
+     * Gets the human readable name of this ObjectClass.
+     *
+     * @return the name of this ObjectClass
+     */
+    String getName() ;
+
+    /**
+     * Gets whether or not this NameForm is obsolete.
+     *
+     * @return true if obsolete, false if not.
+     */
+    boolean isObsolete() ;
+
+    /**
+     * Gets the superclasses of this ObjectClass.
+     *
+     * @return the superclasses
+     */
+    ObjectClass [] getSuperClasses() ;
+
+    /**
+     * Gets the type of this ObjectClass as a type safe enum.
+     *
+     * @return the ObjectClass type as an enum
+     */
+    ObjectClassTypeEnum getType() ;
+
+    /**
+     * Gets the AttributeTypes whose attributes must be present within an entry
+     * of this ObjectClass.
+     *
+     * @return the AttributeTypes of attributes that must be within entries of
+     * this ObjectClass
+     */
+    AttributeType [] getMustList() ;
+
+    /**
+     * Gets the AttributeTypes whose attributes may be present within an entry
+     * of this ObjectClass.
+     *
+     * @return the AttributeTypes of attributes that may be within entries of
+     * this ObjectClass
+     */
+    AttributeType [] getMayList() ;
 }

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ObjectClassTypeEnum.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ObjectClassTypeEnum.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ObjectClassTypeEnum.java	Tue Dec 16 17:21:15 2003
@@ -67,8 +67,8 @@
  * </ul>
  * 
  * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
+ * @author $Author$
+ * @version $Rev$
  */
 public class ObjectClassTypeEnum extends ValuedEnum
 {

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/StructureRule.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/StructureRule.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/StructureRule.java	Tue Dec 16 17:21:15 2003
@@ -1,114 +1,114 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-/**
- * A dITStructureRule definition.  dITStructureRules are rules governing the 
- * structure of the DIT by specifying a permitted superior to subordinate entry 
- * relationship.  A structure rule relates a nameForm, and therefore a 
- * STRUCTURAL objectClass, to superior dITStructureRules.  This permits entries 
- * of the STRUCTURAL objectClass identified by the nameForm to exist in the DIT 
- * as subordinates to entries governed by the indicated superior 
- * dITStructureRules.
- *
- * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252 Section 6.33</a>
- * @see DescriptionUtils#getDescription(StructureRule)
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public interface StructureRule
-{
-    /**
-     * Gets a description of this StructureRule.
-     *
-     * @return a description
-     */
-    String getDescription() ;
-
-    /**
-     * Gets a short descriptive name for the StructureRule.
-     *
-     * @return a short name.
-     */
-    String getName() ;
-
-    /**
-     * Gets the oid for this StructureRule.
-     *
-     * @return the object identifier
-     */
-    String getOid() ;
-
-    /**
-     * Gets whether or not this StructureRule is obsolete.
-     *
-     * @return true if obsolete, false if not.
-     */
-    boolean isObsolete() ;
-
-    /**
-     * Gets the OID of the objectClass this ContentRule specifies
-     * attributes for..
-     *
-     * @return the OID of this stucture rule NameForm
-     */
-    NameForm getNameForm() ;
-
-    /**
-     * Gets a collection of all the superior StructureRules. The difference 
-     * with getSuperClass is this method will resolve the entire superior 
-     * class chain.
-     *
-     * @return the chain of StructureRules 
-     */
-    StructureRule [] getSuperClasses() ;
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+/**
+ * A dITStructureRule definition.  dITStructureRules are rules governing the 
+ * structure of the DIT by specifying a permitted superior to subordinate entry 
+ * relationship.  A structure rule relates a nameForm, and therefore a 
+ * STRUCTURAL objectClass, to superior dITStructureRules.  This permits entries 
+ * of the STRUCTURAL objectClass identified by the nameForm to exist in the DIT 
+ * as subordinates to entries governed by the indicated superior 
+ * dITStructureRules.
+ *
+ * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252 Section 6.33</a>
+ * @see DescriptionUtils#getDescription(StructureRule)
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface StructureRule
+{
+    /**
+     * Gets a description of this StructureRule.
+     *
+     * @return a description
+     */
+    String getDescription() ;
+
+    /**
+     * Gets a short descriptive name for the StructureRule.
+     *
+     * @return a short name.
+     */
+    String getName() ;
+
+    /**
+     * Gets the oid for this StructureRule.
+     *
+     * @return the object identifier
+     */
+    String getOid() ;
+
+    /**
+     * Gets whether or not this StructureRule is obsolete.
+     *
+     * @return true if obsolete, false if not.
+     */
+    boolean isObsolete() ;
+
+    /**
+     * Gets the OID of the objectClass this ContentRule specifies
+     * attributes for..
+     *
+     * @return the OID of this stucture rule NameForm
+     */
+    NameForm getNameForm() ;
+
+    /**
+     * Gets a collection of all the superior StructureRules. The difference 
+     * with getSuperClass is this method will resolve the entire superior 
+     * class chain.
+     *
+     * @return the chain of StructureRules 
+     */
+    StructureRule [] getSuperClasses() ;
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/Syntax.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/Syntax.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/Syntax.java	Tue Dec 16 17:21:15 2003
@@ -1,105 +1,105 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-/**
- * A syntax definition.  Each attribute stored in a directory has a defined 
- * syntax (i.e. data type) which constrains the structure and format of its 
- * values.  The description of each syntax specifies how attribute or assertion 
- * values conforming to the syntax are normally represented when transferred 
- * in LDAP operations.  This representation is referred to as the LDAP-specific 
- * encoding to distinguish it from other methods of encoding attribute values.
- * 
- * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252 Section 4.3.3
- * </a>
- * @see DescriptionUtils#getDescription(Syntax)
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public interface Syntax
-{
-    /**
-     * Gets whether or not the Syntax is human readable.
-     * 
-     * @return true if the syntax can be interpretted by humans, false otherwise
-     */
-    boolean isHumanReadable() ;
-    
-    /**
-     * Gets a description of this Syntax.
-     * 
-     * @return a description
-     */
-    String getDescription() ;
-    
-    /**
-     * Gets a short descriptive name for the Syntax. 
-     * 
-     * @return a short name
-     */
-    String getName() ;
-    
-    /**
-     * Gets the oid for this Syntax.
-     * 
-     * @return the object identifier
-     */
-    String getOid() ;
-    
-    /**
-     * Gets the SyntaxChecker used to validate values in accordance with this
-     * Syntax.
-     * 
-     * @return the SyntaxChecker
-     */
-    SyntaxChecker getSyntaxChecker() ;
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+/**
+ * A syntax definition.  Each attribute stored in a directory has a defined 
+ * syntax (i.e. data type) which constrains the structure and format of its 
+ * values.  The description of each syntax specifies how attribute or assertion 
+ * values conforming to the syntax are normally represented when transferred 
+ * in LDAP operations.  This representation is referred to as the LDAP-specific 
+ * encoding to distinguish it from other methods of encoding attribute values.
+ * 
+ * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252 Section 4.3.3
+ * </a>
+ * @see DescriptionUtils#getDescription(Syntax)
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface Syntax
+{
+    /**
+     * Gets whether or not the Syntax is human readable.
+     * 
+     * @return true if the syntax can be interpretted by humans, false otherwise
+     */
+    boolean isHumanReadable() ;
+    
+    /**
+     * Gets a description of this Syntax.
+     * 
+     * @return a description
+     */
+    String getDescription() ;
+    
+    /**
+     * Gets a short descriptive name for the Syntax. 
+     * 
+     * @return a short name
+     */
+    String getName() ;
+    
+    /**
+     * Gets the oid for this Syntax.
+     * 
+     * @return the object identifier
+     */
+    String getOid() ;
+    
+    /**
+     * Gets the SyntaxChecker used to validate values in accordance with this
+     * Syntax.
+     * 
+     * @return the SyntaxChecker
+     */
+    SyntaxChecker getSyntaxChecker() ;
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/SyntaxChecker.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/SyntaxChecker.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/SyntaxChecker.java	Tue Dec 16 17:21:15 2003
@@ -1,91 +1,91 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-import javax.naming.NamingException ;
-
-
-/**
- * Used to validate values of a particular syntax.  This interface does not
- * correlate to any LDAP or X.500 construct.  It has been created as a means
- * to enforce a syntax within the Eve server.
- * 
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public interface SyntaxChecker
-{
-    /**
-     * Gets the OID of the attribute syntax.
-     *
-     * @return the object identifier of the Syntax this SyntaxChecker validates
-     */
-    String getSyntaxOid() ;
-
-    /**
-     * Determines if the attribute's value conforms to the attribute syntax.
-     *
-     * @param a_value the value of some attribute with the syntax
-     * @return true if the value is in the valid syntax, false otherwise
-     */
-    boolean isValidSyntax( Object a_value ) ;
-    
-    /**
-     * Asserts whether or not the attribute's value conforms to the attribute 
-     * syntax.
-     *
-     * @param a_value the value of some attribute with the syntax
-     * @throws NamingException if the value does not conform to the attribute
-     * syntax.
-     */    
-    void assertSyntax( Object a_value ) throws NamingException ;
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+import javax.naming.NamingException ;
+
+
+/**
+ * Used to validate values of a particular syntax.  This interface does not
+ * correlate to any LDAP or X.500 construct.  It has been created as a means
+ * to enforce a syntax within the Eve server.
+ * 
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface SyntaxChecker
+{
+    /**
+     * Gets the OID of the attribute syntax.
+     *
+     * @return the object identifier of the Syntax this SyntaxChecker validates
+     */
+    String getSyntaxOid() ;
+
+    /**
+     * Determines if the attribute's value conforms to the attribute syntax.
+     *
+     * @param a_value the value of some attribute with the syntax
+     * @return true if the value is in the valid syntax, false otherwise
+     */
+    boolean isValidSyntax( Object a_value ) ;
+    
+    /**
+     * Asserts whether or not the attribute's value conforms to the attribute 
+     * syntax.
+     *
+     * @param a_value the value of some attribute with the syntax
+     * @throws NamingException if the value does not conform to the attribute
+     * syntax.
+     */    
+    void assertSyntax( Object a_value ) throws NamingException ;
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/UsageEnum.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/UsageEnum.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/UsageEnum.java	Tue Dec 16 17:21:15 2003
@@ -1,169 +1,169 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-import java.util.Map ;
-import java.util.List ;
-
-import org.apache.commons.lang.enum.EnumUtils ;
-import org.apache.commons.lang.enum.ValuedEnum ;
-
-
-/**
- * Type safe enum for an AttributeType definition's usage string.  This can be
- * take one of the following four values: 
- * <ul>
- * <li>userApplications</li>
- * <li>directoryOperation</li>
- * <li>distributedOperation</li>
- * <li>dSAOperation</li>
- * </ul>
- * 
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public class UsageEnum extends ValuedEnum
-{
-    /** value for attributes with userApplications usage */
-    public static final int USERAPPLICATIONS_VAL = 0 ;
-    /** value for attributes with directoryOperation usage */
-    public static final int DIRECTORYOPERATION_VAL = 1 ;
-    /** value for attributes with distributedOperation usage */
-    public static final int DISTRIBUTEDOPERATION_VAL = 2 ;
-    /** value for attributes with dSAOperation usage */
-    public static final int DSAOPERATION_VAL = 3 ;
-
-
-    /** enum for attributes with userApplications usage */
-    public static final UsageEnum USERAPPLICATIONS = 
-        new UsageEnum( "userApplications", USERAPPLICATIONS_VAL ) ;
-    /** enum for attributes with directoryOperation usage */
-    public static final UsageEnum DIRECTORYOPERATION = 
-        new UsageEnum( "directoryOperation", DIRECTORYOPERATION_VAL ) ;
-    /** enum for attributes with distributedOperation usage */
-    public static final UsageEnum DISTRIBUTEDOPERATION = 
-        new UsageEnum( "distributedOperation", DISTRIBUTEDOPERATION_VAL ) ;
-    /** enum for attributes with dSAOperation usage */
-    public static final UsageEnum DSAOPERATION = 
-        new UsageEnum( "dSAOperation", DSAOPERATION_VAL ) ;
-
-
-    /**
-     * Private construct so no other instances can be created other than the
-     * public static constants in this class.
-     *
-     * @param a_name a string name for the enumeration value.
-     * @param a_value the integer value of the enumeration.
-     */
-    private UsageEnum( final String a_name, final int a_value )
-    {
-        super( a_name, a_value ) ;
-    }
-    
-    
-    /**
-     * Gets the enumeration type for the attributeType usage string regardless 
-     * of case.
-     * 
-     * @param a_usage the usage string
-     * @return the usage enumeration type
-     */
-    public static UsageEnum getUsage( String a_usage )
-    {
-        if ( a_usage.equalsIgnoreCase( UsageEnum.USERAPPLICATIONS.getName() ) )
-        {
-            return UsageEnum.USERAPPLICATIONS ;
-        }
-        
-        if ( a_usage.equalsIgnoreCase( 
-            UsageEnum.DIRECTORYOPERATION.getName() ) )
-        {
-            return UsageEnum.DIRECTORYOPERATION ;
-        }
-        
-        if ( a_usage.equalsIgnoreCase( 
-            UsageEnum.DISTRIBUTEDOPERATION.getName() ) )
-        {
-            return UsageEnum.DISTRIBUTEDOPERATION ;
-        }
-        
-        if ( a_usage.equalsIgnoreCase( UsageEnum.DSAOPERATION.getName() ) )
-        {
-            return UsageEnum.DSAOPERATION ;
-        }
-        
-        throw new IllegalArgumentException( "Unknown attributeType usage string"
-            + a_usage ) ;
-    }
-    
-    
-    /**
-     * Gets a List of the enumerations for attributeType usage.
-     * 
-     * @return the List of enumerations possible for usage
-     */
-    public static List list()
-    {
-        return EnumUtils.getEnumList( UsageEnum.class ) ;
-    }
-    
-    
-    /**
-     * Gets the Map of UsageEnum objects by name using the UsageEnum class.
-     * 
-     * @return the Map by name of UsageEnums
-     */
-    public static Map map()
-    {
-        return EnumUtils.getEnumMap( UsageEnum.class ) ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+import java.util.Map ;
+import java.util.List ;
+
+import org.apache.commons.lang.enum.EnumUtils ;
+import org.apache.commons.lang.enum.ValuedEnum ;
+
+
+/**
+ * Type safe enum for an AttributeType definition's usage string.  This can be
+ * take one of the following four values: 
+ * <ul>
+ * <li>userApplications</li>
+ * <li>directoryOperation</li>
+ * <li>distributedOperation</li>
+ * <li>dSAOperation</li>
+ * </ul>
+ * 
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public class UsageEnum extends ValuedEnum
+{
+    /** value for attributes with userApplications usage */
+    public static final int USERAPPLICATIONS_VAL = 0 ;
+    /** value for attributes with directoryOperation usage */
+    public static final int DIRECTORYOPERATION_VAL = 1 ;
+    /** value for attributes with distributedOperation usage */
+    public static final int DISTRIBUTEDOPERATION_VAL = 2 ;
+    /** value for attributes with dSAOperation usage */
+    public static final int DSAOPERATION_VAL = 3 ;
+
+
+    /** enum for attributes with userApplications usage */
+    public static final UsageEnum USERAPPLICATIONS = 
+        new UsageEnum( "userApplications", USERAPPLICATIONS_VAL ) ;
+    /** enum for attributes with directoryOperation usage */
+    public static final UsageEnum DIRECTORYOPERATION = 
+        new UsageEnum( "directoryOperation", DIRECTORYOPERATION_VAL ) ;
+    /** enum for attributes with distributedOperation usage */
+    public static final UsageEnum DISTRIBUTEDOPERATION = 
+        new UsageEnum( "distributedOperation", DISTRIBUTEDOPERATION_VAL ) ;
+    /** enum for attributes with dSAOperation usage */
+    public static final UsageEnum DSAOPERATION = 
+        new UsageEnum( "dSAOperation", DSAOPERATION_VAL ) ;
+
+
+    /**
+     * Private construct so no other instances can be created other than the
+     * public static constants in this class.
+     *
+     * @param a_name a string name for the enumeration value.
+     * @param a_value the integer value of the enumeration.
+     */
+    private UsageEnum( final String a_name, final int a_value )
+    {
+        super( a_name, a_value ) ;
+    }
+    
+    
+    /**
+     * Gets the enumeration type for the attributeType usage string regardless 
+     * of case.
+     * 
+     * @param a_usage the usage string
+     * @return the usage enumeration type
+     */
+    public static UsageEnum getUsage( String a_usage )
+    {
+        if ( a_usage.equalsIgnoreCase( UsageEnum.USERAPPLICATIONS.getName() ) )
+        {
+            return UsageEnum.USERAPPLICATIONS ;
+        }
+        
+        if ( a_usage.equalsIgnoreCase( 
+            UsageEnum.DIRECTORYOPERATION.getName() ) )
+        {
+            return UsageEnum.DIRECTORYOPERATION ;
+        }
+        
+        if ( a_usage.equalsIgnoreCase( 
+            UsageEnum.DISTRIBUTEDOPERATION.getName() ) )
+        {
+            return UsageEnum.DISTRIBUTEDOPERATION ;
+        }
+        
+        if ( a_usage.equalsIgnoreCase( UsageEnum.DSAOPERATION.getName() ) )
+        {
+            return UsageEnum.DSAOPERATION ;
+        }
+        
+        throw new IllegalArgumentException( "Unknown attributeType usage string"
+            + a_usage ) ;
+    }
+    
+    
+    /**
+     * Gets a List of the enumerations for attributeType usage.
+     * 
+     * @return the List of enumerations possible for usage
+     */
+    public static List list()
+    {
+        return EnumUtils.getEnumList( UsageEnum.class ) ;
+    }
+    
+    
+    /**
+     * Gets the Map of UsageEnum objects by name using the UsageEnum class.
+     * 
+     * @return the Map by name of UsageEnums
+     */
+    public static Map map()
+    {
+        return EnumUtils.getEnumMap( UsageEnum.class ) ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistry.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistry.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistry.java	Tue Dec 16 17:21:15 2003
@@ -1,118 +1,118 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-import java.util.List ;
-import java.util.Iterator ;
-
-import javax.naming.NamingException ;
-
-
-/**
- * Object identifier registry.
- *
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $Author$
- * @version $Rev$
- */
-public interface OidRegistry
-{
-    /** Avalon service interface ROLE */
-    String ROLE = OidRegistry.class.toString() ;
-    
-    /**
-     * Gets the object identifier using a common name
-     * 
-     * @param a_name the name to lookup an OID for
-     * @return the OID string associated with a name
-     * @throws NamingException if a_name does not map to an OID
-     */
-    String getOid( String a_name ) throws NamingException ;
-    
-    /**
-     * Gets the primary name associated with an OID.  The primary name is the
-     * first name specified for the OID.
-     * 
-     * @param a_oid the object identifier
-     * @return the primary name
-     * @throws NamingException if a_oid does not exist
-     */
-    String getPrimaryName( String a_oid ) throws NamingException ;
-    
-    /**
-     * Gets the names associated with an OID.  An OID is unique however it may 
-     * have many names used to refer to it.  A good example is the cn and
-     * commonName attribute names for OID 2.5.4.3.  Within a server one name 
-     * within the set must be chosen as the primary name.  This is used to
-     * name certain things within the server internally.  If there is more than
-     * one name then the first name is taken to be the primary.
-     * 
-     * @param a_oid the OID for which we return the set of common names
-     * @return a sorted set of names
-     * @throws NamingException if a_oid does not exist
-     */
-    List getNameSet( String a_oid ) throws NamingException ;
-    
-    /**
-     * Lists all the OIDs within the registry.  This may be a really big list.
-     * 
-     * @return all the OIDs registered
-     */
-    Iterator list() ;
-    
-    /**
-     * Adds an OID name pair to the registry.
-     * 
-     * @param a_name the name to associate with the OID
-     * @param a_oid the OID to add or associate a new name with 
-     */
-    void register( String a_name, String a_oid ) ;
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+import java.util.List ;
+import java.util.Iterator ;
+
+import javax.naming.NamingException ;
+
+
+/**
+ * Object identifier registry.
+ *
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface OidRegistry
+{
+    /** Avalon service interface ROLE */
+    String ROLE = OidRegistry.class.toString() ;
+    
+    /**
+     * Gets the object identifier using a common name
+     * 
+     * @param a_name the name to lookup an OID for
+     * @return the OID string associated with a name
+     * @throws NamingException if a_name does not map to an OID
+     */
+    String getOid( String a_name ) throws NamingException ;
+    
+    /**
+     * Gets the primary name associated with an OID.  The primary name is the
+     * first name specified for the OID.
+     * 
+     * @param a_oid the object identifier
+     * @return the primary name
+     * @throws NamingException if a_oid does not exist
+     */
+    String getPrimaryName( String a_oid ) throws NamingException ;
+    
+    /**
+     * Gets the names associated with an OID.  An OID is unique however it may 
+     * have many names used to refer to it.  A good example is the cn and
+     * commonName attribute names for OID 2.5.4.3.  Within a server one name 
+     * within the set must be chosen as the primary name.  This is used to
+     * name certain things within the server internally.  If there is more than
+     * one name then the first name is taken to be the primary.
+     * 
+     * @param a_oid the OID for which we return the set of common names
+     * @return a sorted set of names
+     * @throws NamingException if a_oid does not exist
+     */
+    List getNameSet( String a_oid ) throws NamingException ;
+    
+    /**
+     * Lists all the OIDs within the registry.  This may be a really big list.
+     * 
+     * @return all the OIDs registered
+     */
+    Iterator list() ;
+    
+    /**
+     * Adds an OID name pair to the registry.
+     * 
+     * @param a_name the name to associate with the OID
+     * @param a_oid the OID to add or associate a new name with 
+     */
+    void register( String a_name, String a_oid ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistryMonitor.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistryMonitor.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistryMonitor.java	Tue Dec 16 17:21:15 2003
@@ -1,132 +1,132 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-
-import java.util.List ;
-
-import javax.naming.NamingException ;
-
-
-/**
- * Monitor used to track notable OidRegistry events.
- *
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public interface OidRegistryMonitor
-{
-    /**
-     * Monitors situations where an OID is used to resolve an OID.  The caller
-     * does not know that the argument is the same as the return value.
-     * 
-     * @param a_oid the OID argument and return value
-     */
-    void getOidWithOid( String a_oid ) ;
-    
-    /**
-     * Monitors when an OID is resolved successfully for a name.
-     *  
-     * @param a_name the name used to lookup an OID
-     * @param a_oid the OID returned for the name
-     */
-    void oidResolved( String a_name, String a_oid ) ;
-    
-    /**
-     * Monitors when an OID is resolved successfully by using a normalized form
-     * of the name.
-     *  
-     * @param a_name the name used to lookup an OID
-     * @param a_normalized the normalized name that mapped to the OID
-     * @param a_oid the OID returned for the name
-     */
-    void oidResolved( String a_name, String a_normalized, String a_oid ) ;
-    
-    /**
-     * Monitors when resolution of an OID by name fails.
-     * 
-     * @param a_name the name used to lookup an OID
-     * @param a_fault the exception thrown for the failure after this call
-     */
-    void oidResolutionFailed( String a_name, NamingException a_fault ) ;
-    
-    /**
-     * Monitors when a name lookups fail due to the use of an unknown OID.
-     *  
-     * @param a_oid the OID used to lookup object names
-     * @param a_fault the exception thrown for the failure after this call
-     */
-    void oidDoesNotExist( String a_oid, NamingException a_fault ) ;
-    
-    /**
-     * Monitors situations where a primary name is resolved for a OID.
-     * 
-     * @param a_oid the OID used for the lookup
-     * @param a_primaryName the primary name found for the OID
-     */
-    void nameResolved( String a_oid, String a_primaryName ) ;
-
-    /**
-     * Monitors situations where a names are resolved for a OID.
-     * 
-     * @param a_oid the OID used for the lookup
-     * @param a_names the names found for the OID
-     */
-    void namesResolved( String a_oid, List a_names ) ;
-    
-    /**
-     * Monitors the successful registration of a name for an OID.
-     * 
-     * @param a_name the one of many names registered with an OID
-     * @param a_oid the OID to be associated with the name
-     */
-    void registered( String a_name, String a_oid ) ;
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+
+import java.util.List ;
+
+import javax.naming.NamingException ;
+
+
+/**
+ * Monitor used to track notable OidRegistry events.
+ *
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface OidRegistryMonitor
+{
+    /**
+     * Monitors situations where an OID is used to resolve an OID.  The caller
+     * does not know that the argument is the same as the return value.
+     * 
+     * @param a_oid the OID argument and return value
+     */
+    void getOidWithOid( String a_oid ) ;
+    
+    /**
+     * Monitors when an OID is resolved successfully for a name.
+     *  
+     * @param a_name the name used to lookup an OID
+     * @param a_oid the OID returned for the name
+     */
+    void oidResolved( String a_name, String a_oid ) ;
+    
+    /**
+     * Monitors when an OID is resolved successfully by using a normalized form
+     * of the name.
+     *  
+     * @param a_name the name used to lookup an OID
+     * @param a_normalized the normalized name that mapped to the OID
+     * @param a_oid the OID returned for the name
+     */
+    void oidResolved( String a_name, String a_normalized, String a_oid ) ;
+    
+    /**
+     * Monitors when resolution of an OID by name fails.
+     * 
+     * @param a_name the name used to lookup an OID
+     * @param a_fault the exception thrown for the failure after this call
+     */
+    void oidResolutionFailed( String a_name, NamingException a_fault ) ;
+    
+    /**
+     * Monitors when a name lookups fail due to the use of an unknown OID.
+     *  
+     * @param a_oid the OID used to lookup object names
+     * @param a_fault the exception thrown for the failure after this call
+     */
+    void oidDoesNotExist( String a_oid, NamingException a_fault ) ;
+    
+    /**
+     * Monitors situations where a primary name is resolved for a OID.
+     * 
+     * @param a_oid the OID used for the lookup
+     * @param a_primaryName the primary name found for the OID
+     */
+    void nameResolved( String a_oid, String a_primaryName ) ;
+
+    /**
+     * Monitors situations where a names are resolved for a OID.
+     * 
+     * @param a_oid the OID used for the lookup
+     * @param a_names the names found for the OID
+     */
+    void namesResolved( String a_oid, List a_names ) ;
+    
+    /**
+     * Monitors the successful registration of a name for an OID.
+     * 
+     * @param a_name the one of many names registered with an OID
+     * @param a_oid the OID to be associated with the name
+     */
+    void registered( String a_name, String a_oid ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistryMonitorAdapter.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistryMonitorAdapter.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/oid/api/src/java/org/apache/eve/schema/OidRegistryMonitorAdapter.java	Tue Dec 16 17:21:15 2003
@@ -1,137 +1,137 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-import java.util.List ;
-
-import javax.naming.NamingException ;
-
-
-/**
- * An adapter for an OidRegistryMonitor.
- *
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public class OidRegistryMonitorAdapter implements OidRegistryMonitor
-{
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.schema.OidRegistryMonitor#getOidWithOid(
-     * java.lang.String)
-     */
-    public void getOidWithOid( String a_oid )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.schema.OidRegistryMonitor#oidResolved(
-     * java.lang.String, java.lang.String)
-     */
-    public void oidResolved( String a_name, String a_oid )
-    {
-    }
-    
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.schema.OidRegistryMonitor#oidResolved(
-     * java.lang.String, java.lang.String, java.lang.String)
-     */
-    public void oidResolved( String a_name, String a_normalized, String a_oid )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.schema.OidRegistryMonitor#oidResolutionFailed(
-     * java.lang.String, javax.naming.NamingException)
-     */
-    public void oidResolutionFailed( String a_name, NamingException a_fault )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.schema.OidRegistryMonitor#oidDoesNotExist(
-     * java.lang.String, javax.naming.NamingException)
-     */
-    public void oidDoesNotExist( String a_oid, NamingException a_fault )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.schema.OidRegistryMonitor#nameResolved(
-     * java.lang.String, java.lang.String)
-     */
-    public void nameResolved( String a_oid, String a_name )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.schema.OidRegistryMonitor#namesResolved(
-     * java.lang.String, java.util.List)
-     */
-    public void namesResolved( String a_oid, List a_names )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.schema.OidRegistryMonitor#registered(
-     * java.lang.String, java.lang.String)
-     */
-    public void registered( String a_name, String a_oid )
-    {
-    }
-}
+/*
+
+ ============================================================================
+                   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.schema ;
+
+import java.util.List ;
+
+import javax.naming.NamingException ;
+
+
+/**
+ * An adapter for an OidRegistryMonitor.
+ *
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public class OidRegistryMonitorAdapter implements OidRegistryMonitor
+{
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.schema.OidRegistryMonitor#getOidWithOid(
+     * java.lang.String)
+     */
+    public void getOidWithOid( String a_oid )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.schema.OidRegistryMonitor#oidResolved(
+     * java.lang.String, java.lang.String)
+     */
+    public void oidResolved( String a_name, String a_oid )
+    {
+    }
+    
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.schema.OidRegistryMonitor#oidResolved(
+     * java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void oidResolved( String a_name, String a_normalized, String a_oid )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.schema.OidRegistryMonitor#oidResolutionFailed(
+     * java.lang.String, javax.naming.NamingException)
+     */
+    public void oidResolutionFailed( String a_name, NamingException a_fault )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.schema.OidRegistryMonitor#oidDoesNotExist(
+     * java.lang.String, javax.naming.NamingException)
+     */
+    public void oidDoesNotExist( String a_oid, NamingException a_fault )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.schema.OidRegistryMonitor#nameResolved(
+     * java.lang.String, java.lang.String)
+     */
+    public void nameResolved( String a_oid, String a_name )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.schema.OidRegistryMonitor#namesResolved(
+     * java.lang.String, java.util.List)
+     */
+    public void namesResolved( String a_oid, List a_names )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.schema.OidRegistryMonitor#registered(
+     * java.lang.String, java.lang.String)
+     */
+    public void registered( String a_name, String a_oid )
+    {
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/backend/schema/oid/impl/src/java/org/apache/eve/schema/DefaultOidRegistry.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/oid/impl/src/java/org/apache/eve/schema/DefaultOidRegistry.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/oid/impl/src/java/org/apache/eve/schema/DefaultOidRegistry.java	Tue Dec 16 17:21:15 2003
@@ -1,268 +1,268 @@
-/*
-
- ============================================================================
-                   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.schema ;
-
-import java.util.List ;
-import java.util.Iterator ;
-import java.util.ArrayList ;
-import java.util.Hashtable ;
-import java.util.Collections ;
-
-import javax.naming.NamingException ;
-
-
-/**
- * Default OID registry implementation used to resolve a schema object OID 
- * to a name and vice-versa.
- * 
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public class DefaultOidRegistry
-{ 
-    /** Maps OID to a name or a list of names if more than one name exists */
-    private Hashtable m_byOid = new Hashtable() ;
-    /** Maps several names to an OID */
-    private Hashtable m_byName = new Hashtable() ;
-    /** Default OidRegistryMonitor */
-    private OidRegistryMonitor m_monitor = null ;
-    
-    
-    /**
-     * @see org.apache.ldap.server.schema.OidRegistry#getOid(java.lang.String)
-     */
-    public String getOid( String a_name ) throws NamingException
-    {
-        /* If a_name is an OID than we return it back since inherently the 
-         * OID is another name for the object referred to by OID and the
-         * caller does not know that the argument is an OID String.
-         */
-        if ( Character.isDigit( a_name.charAt( 0 ) ) 
-            && m_byOid.containsKey( a_name ) )
-        {
-            m_monitor.getOidWithOid( a_name ) ;
-            return a_name ;
-        }
-
-        // If a_name is mapped to a OID already return OID
-        if ( m_byName.containsKey( a_name ) )
-        {
-            String l_oid = ( String ) m_byName.get( a_name ) ; 
-            m_monitor.oidResolved( a_name, l_oid ) ;
-            return l_oid ;
-        }
-        
-        /*
-         * As a last resort we check if a_name is not normalized and if the 
-         * normalized version used as a key returns an OID.  If the normalized
-         * name works add the normalized name as a key with its OID to the 
-         * byName lookup.  BTW these normalized versions of the key are not 
-         * returned on a getNameSet.
-         */
-         String l_lowerCase = a_name.trim().toLowerCase() ;
-         if ( ! a_name.equals( l_lowerCase ) 
-            && m_byName.containsKey( l_lowerCase ) )
-         {
-             String l_oid = ( String ) m_byName.get( l_lowerCase ) ;
-             m_monitor.oidResolved( a_name, l_lowerCase, l_oid ) ;
-             
-             // We expect to see this version of the key again so we add it 
-             m_byName.put( a_name, l_oid ) ;
-             return l_oid ;
-         }
-         
-         NamingException l_fault = new NamingException ( "OID for name '" 
-                 + a_name + "' was not " + "found within the OID registry" ) ; 
-         m_monitor.oidResolutionFailed( a_name, l_fault ) ;
-         throw l_fault ;
-    }
-
-
-    /**
-     * @see org.apache.ldap.server.schema.OidRegistry#getPrimaryName(java.lang.String)
-     */
-    public String getPrimaryName( String a_oid ) throws NamingException
-    {
-        Object l_value = m_byOid.get( a_oid ) ;
-        
-        if ( null == l_value )
-        {
-            NamingException l_fault = new NamingException ( "OID '" + a_oid 
-                    + "' was not found within the OID registry" ) ; 
-            m_monitor.oidDoesNotExist( a_oid, l_fault ) ;
-            throw l_fault ;
-        }
-        
-        if ( l_value instanceof String )
-        {
-            m_monitor.nameResolved( a_oid, ( String ) l_value ) ;
-            return ( String ) l_value ;
-        }
-        
-        String l_name = ( String ) ( ( List ) l_value ).get( 0 ) ;
-        m_monitor.nameResolved( a_oid, l_name ) ;
-        return l_name ;
-    }
-
-
-    /**
-     * @see org.apache.ldap.server.schema.OidRegistry#getNameSet(java.lang.String)
-     */
-    public List getNameSet( String a_oid ) throws NamingException
-    {
-        Object l_value = m_byOid.get( a_oid ) ;
-        
-        if ( null == l_value )
-        {
-            NamingException l_fault = new NamingException ( "OID '" + a_oid 
-                    + "' was not found within the OID registry" ) ; 
-            m_monitor.oidDoesNotExist( a_oid, l_fault ) ;
-            throw l_fault ;
-        }
-        
-        if ( l_value instanceof String )
-        {
-            List l_list = Collections.singletonList( l_value ) ;
-            m_monitor.namesResolved( a_oid, l_list ) ;
-            return l_list ;
-        }
-        
-        m_monitor.namesResolved( a_oid, ( List ) l_value ) ;
-        return ( List ) l_value ;
-    }
-
-
-    /**
-     * @see org.apache.ldap.server.schema.OidRegistry#listOids()
-     */
-    public Iterator listOids()
-    {
-        return Collections.unmodifiableSet( m_byOid.keySet() ).iterator() ;
-    }
-
-
-    /**
-     * @see org.apache.ldap.server.schema.OidRegistry#add(java.lang.String, 
-     * java.lang.String)
-     */
-    public void register( String a_name, String a_oid )
-    {
-        /*
-         * Add the entry for the given name as is and its lowercased version if
-         * the lower cased name is different from the given name name.  
-         */
-        String l_lowerCase = a_name.toLowerCase() ;
-        if ( ! l_lowerCase.equals( a_name ) )
-        {
-            m_byName.put( l_lowerCase, a_oid ) ;
-        }
-        
-        // Put both the name and the oid as names
-        m_byName.put( a_name, a_oid ) ;
-        m_byName.put( a_oid, a_oid ) ;
-        
-        /*
-         * Update OID Map
-         * 
-         * 1). Check if we already have a value[s] stored
-         *      1a). Value is a single value and is a String
-         *          Replace value with list containing old and new values
-         *      1b). More than one value stored in a list
-         *          Add new value to the list
-         * 2). If we do not have a value then we just add it as a String
-         */
-        Object l_value = null ;
-        if ( ! m_byOid.containsKey( a_oid ) )
-        {
-            l_value = a_name ;
-        }
-        else 
-        {
-            ArrayList l_list = null ;
-            l_value = m_byOid.get( a_oid ) ;
-            
-            if ( l_value instanceof String )
-            {
-                String l_existingName = ( String ) l_value ;
-                
-                // if the existing name is already there we don't readd it
-                if ( l_existingName.equalsIgnoreCase( a_name ) )
-                {
-                    return ;
-                }
-                
-                l_list = new ArrayList() ;
-                l_list.add( l_value ) ;
-                l_value = l_list ;
-            }
-            else if ( l_value instanceof ArrayList )
-            {
-                l_list = ( ArrayList ) l_list ;
-                
-                for ( int ii = 0; ii < l_list.size(); ii++ )
-                {
-                    // One form or another of the name already exists in list
-                    if ( ! a_name.equalsIgnoreCase( ( String ) 
-                        l_list.get( ii ) ) )
-                    {
-                        return ;
-                    }
-                }
-                
-                l_list.add( a_name ) ;
-            }
-        }
-
-        m_byOid.put( a_oid, l_value ) ;
-        m_monitor.registered( a_name, a_oid ) ;
-    }
-}
-
+/*
+
+ ============================================================================
+                   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.schema ;
+
+import java.util.List ;
+import java.util.Iterator ;
+import java.util.ArrayList ;
+import java.util.Hashtable ;
+import java.util.Collections ;
+
+import javax.naming.NamingException ;
+
+
+/**
+ * Default OID registry implementation used to resolve a schema object OID 
+ * to a name and vice-versa.
+ * 
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public class DefaultOidRegistry
+{ 
+    /** Maps OID to a name or a list of names if more than one name exists */
+    private Hashtable m_byOid = new Hashtable() ;
+    /** Maps several names to an OID */
+    private Hashtable m_byName = new Hashtable() ;
+    /** Default OidRegistryMonitor */
+    private OidRegistryMonitor m_monitor = null ;
+    
+    
+    /**
+     * @see org.apache.ldap.server.schema.OidRegistry#getOid(java.lang.String)
+     */
+    public String getOid( String a_name ) throws NamingException
+    {
+        /* If a_name is an OID than we return it back since inherently the 
+         * OID is another name for the object referred to by OID and the
+         * caller does not know that the argument is an OID String.
+         */
+        if ( Character.isDigit( a_name.charAt( 0 ) ) 
+            && m_byOid.containsKey( a_name ) )
+        {
+            m_monitor.getOidWithOid( a_name ) ;
+            return a_name ;
+        }
+
+        // If a_name is mapped to a OID already return OID
+        if ( m_byName.containsKey( a_name ) )
+        {
+            String l_oid = ( String ) m_byName.get( a_name ) ; 
+            m_monitor.oidResolved( a_name, l_oid ) ;
+            return l_oid ;
+        }
+        
+        /*
+         * As a last resort we check if a_name is not normalized and if the 
+         * normalized version used as a key returns an OID.  If the normalized
+         * name works add the normalized name as a key with its OID to the 
+         * byName lookup.  BTW these normalized versions of the key are not 
+         * returned on a getNameSet.
+         */
+         String l_lowerCase = a_name.trim().toLowerCase() ;
+         if ( ! a_name.equals( l_lowerCase ) 
+            && m_byName.containsKey( l_lowerCase ) )
+         {
+             String l_oid = ( String ) m_byName.get( l_lowerCase ) ;
+             m_monitor.oidResolved( a_name, l_lowerCase, l_oid ) ;
+             
+             // We expect to see this version of the key again so we add it 
+             m_byName.put( a_name, l_oid ) ;
+             return l_oid ;
+         }
+         
+         NamingException l_fault = new NamingException ( "OID for name '" 
+                 + a_name + "' was not " + "found within the OID registry" ) ; 
+         m_monitor.oidResolutionFailed( a_name, l_fault ) ;
+         throw l_fault ;
+    }
+
+
+    /**
+     * @see org.apache.ldap.server.schema.OidRegistry#getPrimaryName(java.lang.String)
+     */
+    public String getPrimaryName( String a_oid ) throws NamingException
+    {
+        Object l_value = m_byOid.get( a_oid ) ;
+        
+        if ( null == l_value )
+        {
+            NamingException l_fault = new NamingException ( "OID '" + a_oid 
+                    + "' was not found within the OID registry" ) ; 
+            m_monitor.oidDoesNotExist( a_oid, l_fault ) ;
+            throw l_fault ;
+        }
+        
+        if ( l_value instanceof String )
+        {
+            m_monitor.nameResolved( a_oid, ( String ) l_value ) ;
+            return ( String ) l_value ;
+        }
+        
+        String l_name = ( String ) ( ( List ) l_value ).get( 0 ) ;
+        m_monitor.nameResolved( a_oid, l_name ) ;
+        return l_name ;
+    }
+
+
+    /**
+     * @see org.apache.ldap.server.schema.OidRegistry#getNameSet(java.lang.String)
+     */
+    public List getNameSet( String a_oid ) throws NamingException
+    {
+        Object l_value = m_byOid.get( a_oid ) ;
+        
+        if ( null == l_value )
+        {
+            NamingException l_fault = new NamingException ( "OID '" + a_oid 
+                    + "' was not found within the OID registry" ) ; 
+            m_monitor.oidDoesNotExist( a_oid, l_fault ) ;
+            throw l_fault ;
+        }
+        
+        if ( l_value instanceof String )
+        {
+            List l_list = Collections.singletonList( l_value ) ;
+            m_monitor.namesResolved( a_oid, l_list ) ;
+            return l_list ;
+        }
+        
+        m_monitor.namesResolved( a_oid, ( List ) l_value ) ;
+        return ( List ) l_value ;
+    }
+
+
+    /**
+     * @see org.apache.ldap.server.schema.OidRegistry#listOids()
+     */
+    public Iterator listOids()
+    {
+        return Collections.unmodifiableSet( m_byOid.keySet() ).iterator() ;
+    }
+
+
+    /**
+     * @see org.apache.ldap.server.schema.OidRegistry#add(java.lang.String, 
+     * java.lang.String)
+     */
+    public void register( String a_name, String a_oid )
+    {
+        /*
+         * Add the entry for the given name as is and its lowercased version if
+         * the lower cased name is different from the given name name.  
+         */
+        String l_lowerCase = a_name.toLowerCase() ;
+        if ( ! l_lowerCase.equals( a_name ) )
+        {
+            m_byName.put( l_lowerCase, a_oid ) ;
+        }
+        
+        // Put both the name and the oid as names
+        m_byName.put( a_name, a_oid ) ;
+        m_byName.put( a_oid, a_oid ) ;
+        
+        /*
+         * Update OID Map
+         * 
+         * 1). Check if we already have a value[s] stored
+         *      1a). Value is a single value and is a String
+         *          Replace value with list containing old and new values
+         *      1b). More than one value stored in a list
+         *          Add new value to the list
+         * 2). If we do not have a value then we just add it as a String
+         */
+        Object l_value = null ;
+        if ( ! m_byOid.containsKey( a_oid ) )
+        {
+            l_value = a_name ;
+        }
+        else 
+        {
+            ArrayList l_list = null ;
+            l_value = m_byOid.get( a_oid ) ;
+            
+            if ( l_value instanceof String )
+            {
+                String l_existingName = ( String ) l_value ;
+                
+                // if the existing name is already there we don't readd it
+                if ( l_existingName.equalsIgnoreCase( a_name ) )
+                {
+                    return ;
+                }
+                
+                l_list = new ArrayList() ;
+                l_list.add( l_value ) ;
+                l_value = l_list ;
+            }
+            else if ( l_value instanceof ArrayList )
+            {
+                l_list = ( ArrayList ) l_list ;
+                
+                for ( int ii = 0; ii < l_list.size(); ii++ )
+                {
+                    // One form or another of the name already exists in list
+                    if ( ! a_name.equalsIgnoreCase( ( String ) 
+                        l_list.get( ii ) ) )
+                    {
+                        return ;
+                    }
+                }
+                
+                l_list.add( a_name ) ;
+            }
+        }
+
+        m_byOid.put( a_oid, l_value ) ;
+        m_monitor.registered( a_name, a_oid ) ;
+    }
+}
+

Modified: incubator/directory/ldap/trunk/eve/backend/schema/syntax/api/src/java/org/apache/eve/schema/SyntaxRegistry.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/syntax/api/src/java/org/apache/eve/schema/SyntaxRegistry.java	(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/syntax/api/src/java/org/apache/eve/schema/SyntaxRegistry.java	Tue Dec 16 17:21:15 2003
@@ -1,62 +1,62 @@
-/*
-
- ============================================================================
-                   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.schema;
-
-/**
- * $todo$ doc me
- *
- * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
- * @author $LastChangedBy$
- * @version $LastChangedRevision$
- */
-public interface SyntaxRegistry
-{
-
-}
+/*
+
+ ============================================================================
+                   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.schema;
+
+/**
+ * $todo$ doc me
+ *
+ * @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Rev$
+ */
+public interface SyntaxRegistry
+{
+
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/DefaultBufferPool.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/DefaultBufferPool.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/DefaultBufferPool.java	Tue Dec 16 17:21:15 2003
@@ -1,232 +1,232 @@
-/*
-
- ============================================================================
-                   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.buffer ;
-
-
-import java.nio.ByteBuffer ;
-
-import java.util.HashMap ;
-import java.util.ArrayList ;
-
-import org.apache.eve.ResourceException ;
-
-
-/**
- * The default BufferPool implementation.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class DefaultBufferPool implements BufferPool
-{
-    /** a configuration bean */
-    private final BufferPoolConfig m_config ;
-    /** list of currently free buffers */
-    private final ArrayList m_freeList ;
-    /** list of currently in use buffers */
-    private final ArrayList m_inUseList ;
-    /** map of buffers to their interest lists */
-    private final HashMap m_interestLists ;
-
-    /** the monitor for this DefaultBufferPool */
-    private BufferPoolMonitor m_monitor = new BufferPoolMonitorAdapter() ;
-    
-    
-    /**
-     * Creates a BufferPool using a pool configuration bean.
-     * 
-     * @param a_config the pool configuration bean
-     */
-    public DefaultBufferPool( BufferPoolConfig a_config )
-    {
-        super() ;
-        
-        m_config = a_config ;
-        m_freeList = new ArrayList( a_config.getIncrement() ) ;
-        m_inUseList = new ArrayList( a_config.getIncrement() ) ;
-        m_interestLists = new HashMap( a_config.getIncrement() ) ;
-
-        for( int ii = 0; ii < m_config.getInitialSize(); ii++ )
-        {
-            ByteBuffer l_buf = ByteBuffer.allocateDirect( m_config
-                    .getBufferSize() ) ;
-            m_freeList.add( l_buf ) ;
-            
-            // create interest lists in advance for the buffers
-            m_interestLists.put( l_buf, new ArrayList( 3 ) ) ;
-        }
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPool#getBuffer(java.lang.Object)
-     */
-    public synchronized ByteBuffer getBuffer( Object a_party ) 
-        throws ResourceException
-    {
-        ByteBuffer l_buf = null ;
-        
-        if ( m_freeList.size() == 0 )
-        {
-            if ( ( m_freeList.size() + m_config.getIncrement() ) <= 
-                    m_config.getMaximumSize() )
-            {
-                for ( int ii = 0; ii < m_config.getIncrement(); ii++ )
-                {
-                    l_buf = ByteBuffer.allocateDirect( m_config
-                            .getBufferSize() ) ; 
-                    m_interestLists.put( l_buf, new ArrayList( 3 ) ) ;
-                }
-            }
-            else
-            {    
-                m_monitor.resourceUnavailable( this, a_party ) ;
-                throw new ResourceException( "Free Buffers unavailable" ) ;
-            }
-        }
-        
-        // remove from free list and add to in use list then report to monitir
-        l_buf = ( ByteBuffer ) m_freeList.remove( 0 ) ;
-        m_inUseList.add( l_buf ) ;
-        m_monitor.bufferTaken( this, l_buf, a_party ) ;
-
-        // claim interest on the buffer automatically then report to monitor
-        ArrayList l_list = ( ArrayList ) m_interestLists.get( l_buf ) ;
-        l_list.add( a_party ) ;
-        m_monitor.interestClaimed( this, l_buf, a_party ) ;
-        return l_buf ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPool#claimInterest(java.nio.ByteBuffer, 
-     * java.lang.Object)
-     */
-    public synchronized void claimInterest( ByteBuffer a_buffer, 
-                                            Object a_party )
-    {
-        if ( ! m_interestLists.containsKey( a_buffer ) )
-        {
-            m_monitor.nonPooledBuffer( this, a_buffer, a_party ) ;
-            throw new IllegalStateException( "Not a BufferPool resource" ) ;
-        }
-        
-        ArrayList l_list = ( ArrayList ) m_interestLists.get( a_buffer ) ;
-        l_list.add( a_party ) ;
-        m_monitor.interestClaimed( this, a_buffer, a_party ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPool#releaseClaim(java.nio.ByteBuffer, 
-     * java.lang.Object)
-     */
-    public synchronized void releaseClaim( ByteBuffer a_buffer, Object a_party )
-    {
-        if ( ! m_interestLists.containsKey( a_buffer ) )
-        {
-            m_monitor.nonPooledBuffer( this, a_buffer, a_party ) ;
-            throw new IllegalStateException( "Not a BufferPool resource" ) ;
-        }
-        
-        ArrayList l_list = ( ArrayList ) m_interestLists.get( a_buffer ) ;
-        
-        if ( ! l_list.contains( a_party ) )
-        {
-            m_monitor.unregisteredParty( this, a_buffer, a_party ) ;
-            throw new IllegalStateException( 
-                    "Party never registered interest with buffer" ) ;
-        }
-        
-        l_list.remove( a_party ) ;
-        m_monitor.interestReleased( this, a_buffer, a_party ) ;
-        
-        // if the list of interested parties hits zero then we release buf
-        if ( l_list.size() == 0 )
-        {
-            m_inUseList.remove( a_buffer ) ;
-            m_freeList.add( a_buffer ) ;
-            m_monitor.bufferReleased( this, a_buffer, a_party ) ;
-        }
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPool#getConfig()
-     */
-    public BufferPoolConfig getConfig()
-    {
-        return m_config ;
-    }
-    
-    
-    /**
-     * Gets the monitor.
-     * 
-     * @return returns the monitor
-     */
-    public BufferPoolMonitor getMonitor()
-    {
-        return m_monitor ;
-    }
-    
-
-    /**
-     * Sets the monitor.
-     * 
-     * @param a_monitor the monitor to set
-     */
-    public void setMonitor( BufferPoolMonitor a_monitor )
-    {
-        m_monitor = a_monitor ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.buffer ;
+
+
+import java.nio.ByteBuffer ;
+
+import java.util.HashMap ;
+import java.util.ArrayList ;
+
+import org.apache.eve.ResourceException ;
+
+
+/**
+ * The default BufferPool implementation.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class DefaultBufferPool implements BufferPool
+{
+    /** a configuration bean */
+    private final BufferPoolConfig m_config ;
+    /** list of currently free buffers */
+    private final ArrayList m_freeList ;
+    /** list of currently in use buffers */
+    private final ArrayList m_inUseList ;
+    /** map of buffers to their interest lists */
+    private final HashMap m_interestLists ;
+
+    /** the monitor for this DefaultBufferPool */
+    private BufferPoolMonitor m_monitor = new BufferPoolMonitorAdapter() ;
+    
+    
+    /**
+     * Creates a BufferPool using a pool configuration bean.
+     * 
+     * @param a_config the pool configuration bean
+     */
+    public DefaultBufferPool( BufferPoolConfig a_config )
+    {
+        super() ;
+        
+        m_config = a_config ;
+        m_freeList = new ArrayList( a_config.getIncrement() ) ;
+        m_inUseList = new ArrayList( a_config.getIncrement() ) ;
+        m_interestLists = new HashMap( a_config.getIncrement() ) ;
+
+        for( int ii = 0; ii < m_config.getInitialSize(); ii++ )
+        {
+            ByteBuffer l_buf = ByteBuffer.allocateDirect( m_config
+                    .getBufferSize() ) ;
+            m_freeList.add( l_buf ) ;
+            
+            // create interest lists in advance for the buffers
+            m_interestLists.put( l_buf, new ArrayList( 3 ) ) ;
+        }
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPool#getBuffer(java.lang.Object)
+     */
+    public synchronized ByteBuffer getBuffer( Object a_party ) 
+        throws ResourceException
+    {
+        ByteBuffer l_buf = null ;
+        
+        if ( m_freeList.size() == 0 )
+        {
+            if ( ( m_freeList.size() + m_config.getIncrement() ) <= 
+                    m_config.getMaximumSize() )
+            {
+                for ( int ii = 0; ii < m_config.getIncrement(); ii++ )
+                {
+                    l_buf = ByteBuffer.allocateDirect( m_config
+                            .getBufferSize() ) ; 
+                    m_interestLists.put( l_buf, new ArrayList( 3 ) ) ;
+                }
+            }
+            else
+            {    
+                m_monitor.resourceUnavailable( this, a_party ) ;
+                throw new ResourceException( "Free Buffers unavailable" ) ;
+            }
+        }
+        
+        // remove from free list and add to in use list then report to monitir
+        l_buf = ( ByteBuffer ) m_freeList.remove( 0 ) ;
+        m_inUseList.add( l_buf ) ;
+        m_monitor.bufferTaken( this, l_buf, a_party ) ;
+
+        // claim interest on the buffer automatically then report to monitor
+        ArrayList l_list = ( ArrayList ) m_interestLists.get( l_buf ) ;
+        l_list.add( a_party ) ;
+        m_monitor.interestClaimed( this, l_buf, a_party ) ;
+        return l_buf ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPool#claimInterest(java.nio.ByteBuffer, 
+     * java.lang.Object)
+     */
+    public synchronized void claimInterest( ByteBuffer a_buffer, 
+                                            Object a_party )
+    {
+        if ( ! m_interestLists.containsKey( a_buffer ) )
+        {
+            m_monitor.nonPooledBuffer( this, a_buffer, a_party ) ;
+            throw new IllegalStateException( "Not a BufferPool resource" ) ;
+        }
+        
+        ArrayList l_list = ( ArrayList ) m_interestLists.get( a_buffer ) ;
+        l_list.add( a_party ) ;
+        m_monitor.interestClaimed( this, a_buffer, a_party ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPool#releaseClaim(java.nio.ByteBuffer, 
+     * java.lang.Object)
+     */
+    public synchronized void releaseClaim( ByteBuffer a_buffer, Object a_party )
+    {
+        if ( ! m_interestLists.containsKey( a_buffer ) )
+        {
+            m_monitor.nonPooledBuffer( this, a_buffer, a_party ) ;
+            throw new IllegalStateException( "Not a BufferPool resource" ) ;
+        }
+        
+        ArrayList l_list = ( ArrayList ) m_interestLists.get( a_buffer ) ;
+        
+        if ( ! l_list.contains( a_party ) )
+        {
+            m_monitor.unregisteredParty( this, a_buffer, a_party ) ;
+            throw new IllegalStateException( 
+                    "Party never registered interest with buffer" ) ;
+        }
+        
+        l_list.remove( a_party ) ;
+        m_monitor.interestReleased( this, a_buffer, a_party ) ;
+        
+        // if the list of interested parties hits zero then we release buf
+        if ( l_list.size() == 0 )
+        {
+            m_inUseList.remove( a_buffer ) ;
+            m_freeList.add( a_buffer ) ;
+            m_monitor.bufferReleased( this, a_buffer, a_party ) ;
+        }
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPool#getConfig()
+     */
+    public BufferPoolConfig getConfig()
+    {
+        return m_config ;
+    }
+    
+    
+    /**
+     * Gets the monitor.
+     * 
+     * @return returns the monitor
+     */
+    public BufferPoolMonitor getMonitor()
+    {
+        return m_monitor ;
+    }
+    
+
+    /**
+     * Sets the monitor.
+     * 
+     * @param a_monitor the monitor to set
+     */
+    public void setMonitor( BufferPoolMonitor a_monitor )
+    {
+        m_monitor = a_monitor ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPool.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPool.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPool.java	Tue Dec 16 17:21:15 2003
@@ -1,162 +1,162 @@
-/*
-
- ============================================================================
-                   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.buffer ;
-
-
-import java.nio.ByteBuffer ;
-
-import org.apache.eve.ResourceException ;
-
-import org.apache.avalon.framework.activity.Initializable ;
-import org.apache.avalon.framework.logger.AbstractLogEnabled ;
-import org.apache.avalon.framework.configuration.Configurable ;
-import org.apache.avalon.framework.configuration.Configuration ;
-import org.apache.avalon.framework.configuration.ConfigurationException ;
-
-
-/**
- * A Merlin BufferPool service. 
- * 
- * @avalon.component name="buffer-pool" lifestyle="singleton"
- * @avalon.service type="org.apache.eve.buffer.BufferPool" version="1.0"
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class MerlinBufferPool
-    extends AbstractLogEnabled
-    implements BufferPool, Initializable, Configurable
-{
-    /** the underlying BufferPool implementation wrapped by this service */
-    private DefaultBufferPool m_bp = null ;
-    /** the configuration bean for this BufferPool */
-    private BufferPoolConfig m_config = null ;
-    
-    
-    // ------------------------------------------------------------------------
-    // BufferPool Interface Methods
-    // ------------------------------------------------------------------------
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPool#getBuffer(java.lang.Object)
-     */
-    public ByteBuffer getBuffer( Object a_party ) throws ResourceException
-    {
-        return m_bp.getBuffer( a_party ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPool#claimInterest(java.nio.ByteBuffer,
-     * java.lang.Object)
-     */
-    public void claimInterest( ByteBuffer a_buffer, Object a_party )
-    {
-        m_bp.claimInterest( a_buffer, a_party ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPool#releaseClaim(
-     * java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void releaseClaim( ByteBuffer a_buffer, Object a_party )
-    {
-        m_bp.releaseClaim( a_buffer, a_party ) ;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPool#getConfig()
-     */
-    public BufferPoolConfig getConfig()
-    {
-        return m_config ;
-    }
-    
-    
-    // ------------------------------------------------------------------------
-    // Avalon Life Cycle Methods
-    // ------------------------------------------------------------------------
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.avalon.framework.activity.Initializable#initialize()
-     */
-    public void initialize() throws Exception
-    {
-        m_bp = new DefaultBufferPool( m_config ) ;
-        MerlinBufferPoolMonitor l_monitor = new MerlinBufferPoolMonitor() ;
-        l_monitor.enableLogging( getLogger() ) ;
-        m_bp.setMonitor( l_monitor ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(
-     * org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure( Configuration a_config ) 
-        throws ConfigurationException
-    {
-        int l_max = Integer.parseInt( a_config
-                .getChild( "maximum" ).getValue() ) ;
-        int l_ini = Integer.parseInt( a_config
-                .getChild( "initial" ).getValue() ) ;
-        int l_inc = Integer.parseInt( a_config
-                .getChild( "increment" ).getValue() ) ;
-        int l_size = Integer.parseInt( a_config
-                .getChild( "bufferSize" ).getValue() ) ;
-        
-        m_config = new DefaultBufferPoolConfig( l_inc, l_max, l_ini, l_size ) ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.buffer ;
+
+
+import java.nio.ByteBuffer ;
+
+import org.apache.eve.ResourceException ;
+
+import org.apache.avalon.framework.activity.Initializable ;
+import org.apache.avalon.framework.logger.AbstractLogEnabled ;
+import org.apache.avalon.framework.configuration.Configurable ;
+import org.apache.avalon.framework.configuration.Configuration ;
+import org.apache.avalon.framework.configuration.ConfigurationException ;
+
+
+/**
+ * A Merlin BufferPool service. 
+ * 
+ * @avalon.component name="buffer-pool" lifestyle="singleton"
+ * @avalon.service type="org.apache.eve.buffer.BufferPool" version="1.0"
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class MerlinBufferPool
+    extends AbstractLogEnabled
+    implements BufferPool, Initializable, Configurable
+{
+    /** the underlying BufferPool implementation wrapped by this service */
+    private DefaultBufferPool m_bp = null ;
+    /** the configuration bean for this BufferPool */
+    private BufferPoolConfig m_config = null ;
+    
+    
+    // ------------------------------------------------------------------------
+    // BufferPool Interface Methods
+    // ------------------------------------------------------------------------
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPool#getBuffer(java.lang.Object)
+     */
+    public ByteBuffer getBuffer( Object a_party ) throws ResourceException
+    {
+        return m_bp.getBuffer( a_party ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPool#claimInterest(java.nio.ByteBuffer,
+     * java.lang.Object)
+     */
+    public void claimInterest( ByteBuffer a_buffer, Object a_party )
+    {
+        m_bp.claimInterest( a_buffer, a_party ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPool#releaseClaim(
+     * java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void releaseClaim( ByteBuffer a_buffer, Object a_party )
+    {
+        m_bp.releaseClaim( a_buffer, a_party ) ;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPool#getConfig()
+     */
+    public BufferPoolConfig getConfig()
+    {
+        return m_config ;
+    }
+    
+    
+    // ------------------------------------------------------------------------
+    // Avalon Life Cycle Methods
+    // ------------------------------------------------------------------------
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.avalon.framework.activity.Initializable#initialize()
+     */
+    public void initialize() throws Exception
+    {
+        m_bp = new DefaultBufferPool( m_config ) ;
+        MerlinBufferPoolMonitor l_monitor = new MerlinBufferPoolMonitor() ;
+        l_monitor.enableLogging( getLogger() ) ;
+        m_bp.setMonitor( l_monitor ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.avalon.framework.configuration.Configurable#configure(
+     * org.apache.avalon.framework.configuration.Configuration)
+     */
+    public void configure( Configuration a_config ) 
+        throws ConfigurationException
+    {
+        int l_max = Integer.parseInt( a_config
+                .getChild( "maximum" ).getValue() ) ;
+        int l_ini = Integer.parseInt( a_config
+                .getChild( "initial" ).getValue() ) ;
+        int l_inc = Integer.parseInt( a_config
+                .getChild( "increment" ).getValue() ) ;
+        int l_size = Integer.parseInt( a_config
+                .getChild( "bufferSize" ).getValue() ) ;
+        
+        m_config = new DefaultBufferPoolConfig( l_inc, l_max, l_ini, l_size ) ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPoolMonitor.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPoolMonitor.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPoolMonitor.java	Tue Dec 16 17:21:15 2003
@@ -1,143 +1,143 @@
-/*
-
- ============================================================================
-                   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.buffer;
-
-import java.nio.ByteBuffer;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-
-/**
- * $todo$ doc me
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class MerlinBufferPoolMonitor
-    extends AbstractLogEnabled
-    implements BufferPoolMonitor
-{
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#augmented(
-     * org.apache.eve.buffer.BufferPool)
-     */
-    public void augmented( BufferPool a_bp )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#bufferTaken(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void bufferTaken( BufferPool a_bp, ByteBuffer a_buffer,
-        Object a_taker )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#bufferReleased(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void bufferReleased( BufferPool a_bp, ByteBuffer a_buffer,
-        Object a_releaser )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#interestClaimed(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void interestClaimed( BufferPool a_bp, ByteBuffer a_buffer,
-        Object a_claimer )
-    {
-    }
-    
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#interestReleased(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void interestReleased( BufferPool a_bp, ByteBuffer a_buffer,
-                                  Object a_releaser )
-    {
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#resourceUnavailable(
-     * org.apache.eve.buffer.BufferPool, java.lang.Object)
-     */
-    public void resourceUnavailable( BufferPool a_bp, Object a_party ) 
-    {
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#unregisteredParty(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void unregisteredParty( BufferPool a_bp, ByteBuffer a_buffer, 
-                                   Object a_party ) 
-    {
-    }
-    
-    /*
-     * (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#nonPooledBuffer(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, 
-                                 Object a_party )
-    {
-    }
-}
+/*
+
+ ============================================================================
+                   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.buffer;
+
+import java.nio.ByteBuffer;
+
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+
+/**
+ * $todo$ doc me
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class MerlinBufferPoolMonitor
+    extends AbstractLogEnabled
+    implements BufferPoolMonitor
+{
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#augmented(
+     * org.apache.eve.buffer.BufferPool)
+     */
+    public void augmented( BufferPool a_bp )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#bufferTaken(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void bufferTaken( BufferPool a_bp, ByteBuffer a_buffer,
+        Object a_taker )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#bufferReleased(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void bufferReleased( BufferPool a_bp, ByteBuffer a_buffer,
+        Object a_releaser )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#interestClaimed(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void interestClaimed( BufferPool a_bp, ByteBuffer a_buffer,
+        Object a_claimer )
+    {
+    }
+    
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#interestReleased(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void interestReleased( BufferPool a_bp, ByteBuffer a_buffer,
+                                  Object a_releaser )
+    {
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#resourceUnavailable(
+     * org.apache.eve.buffer.BufferPool, java.lang.Object)
+     */
+    public void resourceUnavailable( BufferPool a_bp, Object a_party ) 
+    {
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#unregisteredParty(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void unregisteredParty( BufferPool a_bp, ByteBuffer a_buffer, 
+                                   Object a_party ) 
+    {
+    }
+    
+    /*
+     * (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#nonPooledBuffer(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, 
+                                 Object a_party )
+    {
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPool.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPool.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPool.java	Tue Dec 16 17:21:15 2003
@@ -1,109 +1,109 @@
-/*
-
- ============================================================================
-                   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.buffer ;
-
-
-import java.nio.ByteBuffer ;
-
-import org.apache.eve.ResourceException;
-
-
-/**
- * Service interface for an NIO direct memory buffer pool.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface BufferPool
-{
-    /** for Avalon compatability */
-    String ROLE = BufferPool.class.getName() ;
-    
-    /**
-     * Acquires a dedicated buffer from the buffer pool and claims interest with
-     * the buffer using an object representing the interested party.
-     * 
-     * @param a_party the object interested in the buffer
-     * @return a claimed direct memory buffer
-     */
-    ByteBuffer getBuffer( Object a_party ) throws ResourceException ;
-    
-    /**
-     * Allows a party to claim interest on a buffer pooled by this buffer.  The
-     * buffer cannot be reclaimed until all the interested parties release their
-     * interest claim on the buffer.
-     * 
-     * @param a_party the object interested in the buffer
-     * @param a_buffer a claimed direct memory buffer pooled by this BufferPool
-     * @throws IllegalArgumentException if the buffer is not direct or has not 
-     * been recognized as a pooled resource of this pool. 
-     */
-    void claimInterest( ByteBuffer a_buffer, Object a_party ) ; 
-    
-    /**
-     * Allows a party that claimed interest on a buffer to release the buffer.  
-     * The buffer cannot be reclaimed until all the interested parties release 
-     * their interest claim on the buffer.
-     * 
-     * @param a_buffer the buffer to release
-     * @param a_owner the owner of the buffer
-     * @throws IllegalArgumentException if the buffer is not direct or has not 
-     * been recognized as a pooled resource of this pool. 
-     */
-    void releaseClaim( ByteBuffer a_buffer, Object a_party ) ;
-    
-    /**
-     * Gets the configuration for this BufferPool.
-     * 
-     * @return the configuration for this BufferPool
-     */
-    BufferPoolConfig getConfig() ;
-}
+/*
+
+ ============================================================================
+                   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.buffer ;
+
+
+import java.nio.ByteBuffer ;
+
+import org.apache.eve.ResourceException;
+
+
+/**
+ * Service interface for an NIO direct memory buffer pool.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface BufferPool
+{
+    /** for Avalon compatability */
+    String ROLE = BufferPool.class.getName() ;
+    
+    /**
+     * Acquires a dedicated buffer from the buffer pool and claims interest with
+     * the buffer using an object representing the interested party.
+     * 
+     * @param a_party the object interested in the buffer
+     * @return a claimed direct memory buffer
+     */
+    ByteBuffer getBuffer( Object a_party ) throws ResourceException ;
+    
+    /**
+     * Allows a party to claim interest on a buffer pooled by this buffer.  The
+     * buffer cannot be reclaimed until all the interested parties release their
+     * interest claim on the buffer.
+     * 
+     * @param a_party the object interested in the buffer
+     * @param a_buffer a claimed direct memory buffer pooled by this BufferPool
+     * @throws IllegalArgumentException if the buffer is not direct or has not 
+     * been recognized as a pooled resource of this pool. 
+     */
+    void claimInterest( ByteBuffer a_buffer, Object a_party ) ; 
+    
+    /**
+     * Allows a party that claimed interest on a buffer to release the buffer.  
+     * The buffer cannot be reclaimed until all the interested parties release 
+     * their interest claim on the buffer.
+     * 
+     * @param a_buffer the buffer to release
+     * @param a_owner the owner of the buffer
+     * @throws IllegalArgumentException if the buffer is not direct or has not 
+     * been recognized as a pooled resource of this pool. 
+     */
+    void releaseClaim( ByteBuffer a_buffer, Object a_party ) ;
+    
+    /**
+     * Gets the configuration for this BufferPool.
+     * 
+     * @return the configuration for this BufferPool
+     */
+    BufferPoolConfig getConfig() ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolConfig.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolConfig.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolConfig.java	Tue Dec 16 17:21:15 2003
@@ -1,91 +1,91 @@
-/*
-
- ============================================================================
-                   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.buffer ;
-
-/**
- * BufferPool configuration parameters used regardless of implementation.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface BufferPoolConfig
-{
-    /**
-     * The increment by which the BufferPool should grow.
-     * 
-     * @return the increment amount for the BufferPool
-     */
-    int getIncrement() ;
-    
-    /**
-     * The size of the buffers that are pooled.  Recommended settings are of 
-     * multiples of 1024: 1k, 2k, 4k and 8k.
-     * 
-     * @return the size of the pooled buffers
-     */
-    int getBufferSize() ;
-    
-    /**
-     * Gets the initial size of the pool.  This should be a multiple of the 
-     * pool's growth increment.
-     * 
-     * @return the initial pool size.
-     */
-    int getInitialSize() ;
-    
-    /**
-     * The maximum size a BufferPool can grow to.  This should be a multiple of
-     * the pool's growth increment.
-     * 
-     * @return the maximum pool size.
-     */
-    int getMaximumSize() ;
-}
+/*
+
+ ============================================================================
+                   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.buffer ;
+
+/**
+ * BufferPool configuration parameters used regardless of implementation.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface BufferPoolConfig
+{
+    /**
+     * The increment by which the BufferPool should grow.
+     * 
+     * @return the increment amount for the BufferPool
+     */
+    int getIncrement() ;
+    
+    /**
+     * The size of the buffers that are pooled.  Recommended settings are of 
+     * multiples of 1024: 1k, 2k, 4k and 8k.
+     * 
+     * @return the size of the pooled buffers
+     */
+    int getBufferSize() ;
+    
+    /**
+     * Gets the initial size of the pool.  This should be a multiple of the 
+     * pool's growth increment.
+     * 
+     * @return the initial pool size.
+     */
+    int getInitialSize() ;
+    
+    /**
+     * The maximum size a BufferPool can grow to.  This should be a multiple of
+     * the pool's growth increment.
+     * 
+     * @return the maximum pool size.
+     */
+    int getMaximumSize() ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitor.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitor.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitor.java	Tue Dec 16 17:21:15 2003
@@ -1,140 +1,140 @@
-/*
-
- ============================================================================
-                   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.buffer ;
-
-
-import java.nio.ByteBuffer ;
-
-
-/**
- * The BufferPool monitor interface.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface BufferPoolMonitor
-{
-    /**
-     * Monitors the augmentation of a BufferPool.
-     * 
-     * @param a_bp the BufferPool that grew
-     */
-    void augmented( BufferPool a_bp ) ;
-    
-    /**
-     * Monitors the giving of a buffer to a client.
-     * 
-     * @param a_bp the BufferPool the buffer is taken from
-     * @param a_buffer the buffer that is taken
-     * @param a_taker the object doing the taking
-     */
-    void bufferTaken( BufferPool a_bp, ByteBuffer a_buffer, Object a_taker ) ;
-    
-    /**
-     * Monitors the release of a buffer to be reclaimed onto the free list.
-     * 
-     * @param a_bp the BufferPool the buffer is released back to
-     * @param a_buffer the buffer that is released
-     * @param a_releaser the object doing the releasing
-     */
-    void bufferReleased( BufferPool a_bp, ByteBuffer a_buffer, 
-                         Object a_releaser ) ;
-    
-    /**
-     * Monitors the claim of interest in a buffer.
-     * 
-     * @param a_bp the BufferPool the buffer of interest is from
-     * @param a_buffer the buffer that is the interest
-     * @param a_claimer the object doing the interest claiming
-     */
-    void interestClaimed( BufferPool a_bp,  ByteBuffer a_buffer, 
-                          Object a_claimer ) ;
-    
-    /**
-     * Monitors the release of a claim on a buffer.
-     * 
-     * @param a_bp the BufferPool the buffer of interest is from
-     * @param a_buffer the buffer that has an interest claim released
-     * @param a_releaser the object doing the interest claim releasing
-     */
-    void interestReleased( BufferPool a_bp,  ByteBuffer a_buffer, 
-                          Object a_releaser ) ;
-
-    /**
-     * Monitors situations where the BufferPool is in full use at its maximum 
-     * capacity and a request for a Buffer cannot be satisfied.
-     * 
-     * @param a_bp the BufferPool the where the buffer is unavailable
-     * @param a_party the party trying to acquire the buffer resource
-     */
-    void resourceUnavailable( BufferPool a_bp, Object a_party ) ;
-    
-    /**
-     * A party that never registered interest in a buffer is attempting to 
-     * remove its interest on a buffer.
-     * 
-     * @param a_bp the buffer pool this fault is occuring in
-     * @param a_buffer the buffer the party is trying to claim interest on
-     * @param a_party the party trying to claim interest
-     */
-    void unregisteredParty( BufferPool a_bp, ByteBuffer a_buffer, 
-                            Object a_party ) ;
-    
-    /**
-     * Monitors attempts to deal with a buffer that is not a pooled resource.
-     * 
-     * @param a_bp the BufferPool that does not contain the buffer
-     * @param a_buffer the buffer that is not pooled in the BufferPool
-     * @param a_party the party that attempted the operation causing the fault
-     */
-    void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, 
-                          Object a_party ) ;
-}
+/*
+
+ ============================================================================
+                   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.buffer ;
+
+
+import java.nio.ByteBuffer ;
+
+
+/**
+ * The BufferPool monitor interface.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface BufferPoolMonitor
+{
+    /**
+     * Monitors the augmentation of a BufferPool.
+     * 
+     * @param a_bp the BufferPool that grew
+     */
+    void augmented( BufferPool a_bp ) ;
+    
+    /**
+     * Monitors the giving of a buffer to a client.
+     * 
+     * @param a_bp the BufferPool the buffer is taken from
+     * @param a_buffer the buffer that is taken
+     * @param a_taker the object doing the taking
+     */
+    void bufferTaken( BufferPool a_bp, ByteBuffer a_buffer, Object a_taker ) ;
+    
+    /**
+     * Monitors the release of a buffer to be reclaimed onto the free list.
+     * 
+     * @param a_bp the BufferPool the buffer is released back to
+     * @param a_buffer the buffer that is released
+     * @param a_releaser the object doing the releasing
+     */
+    void bufferReleased( BufferPool a_bp, ByteBuffer a_buffer, 
+                         Object a_releaser ) ;
+    
+    /**
+     * Monitors the claim of interest in a buffer.
+     * 
+     * @param a_bp the BufferPool the buffer of interest is from
+     * @param a_buffer the buffer that is the interest
+     * @param a_claimer the object doing the interest claiming
+     */
+    void interestClaimed( BufferPool a_bp,  ByteBuffer a_buffer, 
+                          Object a_claimer ) ;
+    
+    /**
+     * Monitors the release of a claim on a buffer.
+     * 
+     * @param a_bp the BufferPool the buffer of interest is from
+     * @param a_buffer the buffer that has an interest claim released
+     * @param a_releaser the object doing the interest claim releasing
+     */
+    void interestReleased( BufferPool a_bp,  ByteBuffer a_buffer, 
+                          Object a_releaser ) ;
+
+    /**
+     * Monitors situations where the BufferPool is in full use at its maximum 
+     * capacity and a request for a Buffer cannot be satisfied.
+     * 
+     * @param a_bp the BufferPool the where the buffer is unavailable
+     * @param a_party the party trying to acquire the buffer resource
+     */
+    void resourceUnavailable( BufferPool a_bp, Object a_party ) ;
+    
+    /**
+     * A party that never registered interest in a buffer is attempting to 
+     * remove its interest on a buffer.
+     * 
+     * @param a_bp the buffer pool this fault is occuring in
+     * @param a_buffer the buffer the party is trying to claim interest on
+     * @param a_party the party trying to claim interest
+     */
+    void unregisteredParty( BufferPool a_bp, ByteBuffer a_buffer, 
+                            Object a_party ) ;
+    
+    /**
+     * Monitors attempts to deal with a buffer that is not a pooled resource.
+     * 
+     * @param a_bp the BufferPool that does not contain the buffer
+     * @param a_buffer the buffer that is not pooled in the BufferPool
+     * @param a_party the party that attempted the operation causing the fault
+     */
+    void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, 
+                          Object a_party ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitorAdapter.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitorAdapter.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitorAdapter.java	Tue Dec 16 17:21:15 2003
@@ -1,143 +1,143 @@
-/*
-
- ============================================================================
-                   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.buffer ;
-
-
-import java.nio.ByteBuffer ;
-
-
-/**
- * A BufferPoolMonitor adapter to extend to monitor only those signals that
- * are of interest.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class BufferPoolMonitorAdapter implements BufferPoolMonitor
-{
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#augmented(
-     * org.apache.eve.buffer.BufferPool)
-     */
-    public void augmented( BufferPool a_bp )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#bufferTaken(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void bufferTaken( BufferPool a_bp, ByteBuffer a_buffer,
-        Object a_taker )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#bufferReleased(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void bufferReleased( BufferPool a_bp, ByteBuffer a_buffer,
-        Object a_releaser )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#interestClaimed(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void interestClaimed( BufferPool a_bp, ByteBuffer a_buffer,
-        Object a_claimer )
-    {
-    }
-    
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#interestReleased(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void interestReleased( BufferPool a_bp, ByteBuffer a_buffer,
-                                  Object a_releaser )
-    {
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#resourceUnavailable(
-     * org.apache.eve.buffer.BufferPool, java.lang.Object)
-     */
-    public void resourceUnavailable( BufferPool a_bp, Object a_party ) 
-    {
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#unregisteredParty(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void unregisteredParty( BufferPool a_bp, ByteBuffer a_buffer, 
-                                   Object a_party ) 
-    {
-    }
-    
-    /*
-     * (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolMonitor#nonPooledBuffer(
-     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
-     */
-    public void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, 
-                                 Object a_party )
-    {
-    }
-}
+/*
+
+ ============================================================================
+                   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.buffer ;
+
+
+import java.nio.ByteBuffer ;
+
+
+/**
+ * A BufferPoolMonitor adapter to extend to monitor only those signals that
+ * are of interest.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class BufferPoolMonitorAdapter implements BufferPoolMonitor
+{
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#augmented(
+     * org.apache.eve.buffer.BufferPool)
+     */
+    public void augmented( BufferPool a_bp )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#bufferTaken(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void bufferTaken( BufferPool a_bp, ByteBuffer a_buffer,
+        Object a_taker )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#bufferReleased(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void bufferReleased( BufferPool a_bp, ByteBuffer a_buffer,
+        Object a_releaser )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#interestClaimed(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void interestClaimed( BufferPool a_bp, ByteBuffer a_buffer,
+        Object a_claimer )
+    {
+    }
+    
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#interestReleased(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void interestReleased( BufferPool a_bp, ByteBuffer a_buffer,
+                                  Object a_releaser )
+    {
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#resourceUnavailable(
+     * org.apache.eve.buffer.BufferPool, java.lang.Object)
+     */
+    public void resourceUnavailable( BufferPool a_bp, Object a_party ) 
+    {
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#unregisteredParty(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void unregisteredParty( BufferPool a_bp, ByteBuffer a_buffer, 
+                                   Object a_party ) 
+    {
+    }
+    
+    /*
+     * (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolMonitor#nonPooledBuffer(
+     * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object)
+     */
+    public void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, 
+                                 Object a_party )
+    {
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/DefaultBufferPoolConfig.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/DefaultBufferPoolConfig.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/DefaultBufferPoolConfig.java	Tue Dec 16 17:21:15 2003
@@ -1,123 +1,123 @@
-/*
-
- ============================================================================
-                   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.buffer;
-
-/**
- * A BufferPoolConfig implementation bean.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class DefaultBufferPoolConfig implements BufferPoolConfig
-{
-    /** the growth increment */
-    private int m_inc = 0 ;
-    /** the maximum pool size */
-    private int m_max = 0 ;
-    /** the initial pool size */
-    private int m_ini = 0 ;
-    /** the size of the buffers pooled */
-    private int m_size = 0 ;
-    
-    
-    /**
-     * Creates a BufferPool configuration bean using the supplied values.
-     * 
-     * @param a_inc the growth increment
-     * @param a_max the maximum pool size
-     * @param a_ini the initial pool size 
-     * @param a_size the size of the buffers pooled
-     */
-    public DefaultBufferPoolConfig( int a_inc, int a_max, int a_ini, 
-                                    int a_size )
-    {
-        m_inc = a_inc ;
-        m_max = a_max ;
-        m_ini = a_ini ;
-        m_size = a_size ;
-    }
-    
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolConfig#getIncrement()
-     */
-    public int getIncrement()
-    {
-        return m_inc ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolConfig#getBufferSize()
-     */
-    public int getBufferSize()
-    {
-        return m_size ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolConfig#getInitialSize()
-     */
-    public int getInitialSize()
-    {
-        return m_ini ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.buffer.BufferPoolConfig#getMaximumSize()
-     */
-    public int getMaximumSize()
-    {
-        return m_max ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.buffer;
+
+/**
+ * A BufferPoolConfig implementation bean.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class DefaultBufferPoolConfig implements BufferPoolConfig
+{
+    /** the growth increment */
+    private int m_inc = 0 ;
+    /** the maximum pool size */
+    private int m_max = 0 ;
+    /** the initial pool size */
+    private int m_ini = 0 ;
+    /** the size of the buffers pooled */
+    private int m_size = 0 ;
+    
+    
+    /**
+     * Creates a BufferPool configuration bean using the supplied values.
+     * 
+     * @param a_inc the growth increment
+     * @param a_max the maximum pool size
+     * @param a_ini the initial pool size 
+     * @param a_size the size of the buffers pooled
+     */
+    public DefaultBufferPoolConfig( int a_inc, int a_max, int a_ini, 
+                                    int a_size )
+    {
+        m_inc = a_inc ;
+        m_max = a_max ;
+        m_ini = a_ini ;
+        m_size = a_size ;
+    }
+    
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolConfig#getIncrement()
+     */
+    public int getIncrement()
+    {
+        return m_inc ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolConfig#getBufferSize()
+     */
+    public int getBufferSize()
+    {
+        return m_size ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolConfig#getInitialSize()
+     */
+    public int getInitialSize()
+    {
+        return m_ini ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.buffer.BufferPoolConfig#getMaximumSize()
+     */
+    public int getMaximumSize()
+    {
+        return m_max ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/ResourceException.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/ResourceException.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/ResourceException.java	Tue Dec 16 17:21:15 2003
@@ -1,80 +1,80 @@
-/*
-
- ============================================================================
-                   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 ;
-
-
-/**
- * Exception thrown when a resource was needed and could not be acquired. 
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class ResourceException extends Exception
-{
-    /**
-     * Creates a simple ResourceException without any details. 
-     */
-    public ResourceException()
-    {
-        super() ;
-    }
-
-
-    /**
-     * Creates a simple ResourceException with a message.
-     *  
-     * @param a_message a detailed message
-     */
-    public ResourceException( String a_message )
-    {
-        super( a_message ) ;
-    }
-}
+/*
+
+ ============================================================================
+                   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 ;
+
+
+/**
+ * Exception thrown when a resource was needed and could not be acquired. 
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class ResourceException extends Exception
+{
+    /**
+     * Creates a simple ResourceException without any details. 
+     */
+    public ResourceException()
+    {
+        super() ;
+    }
+
+
+    /**
+     * Creates a simple ResourceException with a message.
+     *  
+     * @param a_message a detailed message
+     */
+    public ResourceException( String a_message )
+    {
+        super( a_message ) ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/SessionCreationSubscriber.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/SessionCreationSubscriber.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/SessionCreationSubscriber.java	Tue Dec 16 17:21:15 2003
@@ -1,68 +1,68 @@
-/*
-
- ============================================================================
-                   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.event ;
-
-
-/**
- * Type safe Subscriber for session creation events for clients.
- * 
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface SessionCreationSubscriber extends Subscriber
-{
-    /**
-     * Informs the Subscriber interested in SessionCreationEvents.
-     * 
-     * @param an_event the event to inform this Subscriber about.
-     */
-    public void inform( SessionCreationEvent an_event ) ;
-}
+/*
+
+ ============================================================================
+                   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.event ;
+
+
+/**
+ * Type safe Subscriber for session creation events for clients.
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface SessionCreationSubscriber extends Subscriber
+{
+    /**
+     * Informs the Subscriber interested in SessionCreationEvents.
+     * 
+     * @param an_event the event to inform this Subscriber about.
+     */
+    public void inform( SessionCreationEvent an_event ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/SessionDestructionListener.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/SessionDestructionListener.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/SessionDestructionListener.java	Tue Dec 16 17:21:15 2003
@@ -1,68 +1,68 @@
-/*
-
- ============================================================================
-                   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.event ;
-
-
-/**
- * Type safe Subscriber interested in session deletion events.
- * 
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface SessionDestructionListener
-{
-    /**
-     * Informs this Subscriber of session destruction events.
-     * 
-     * @param an_event the destruction event to inform of
-     */
-    public void inform( SessionDestructionEvent an_event ) ;
-}
+/*
+
+ ============================================================================
+                   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.event ;
+
+
+/**
+ * Type safe Subscriber interested in session deletion events.
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface SessionDestructionListener
+{
+    /**
+     * Informs this Subscriber of session destruction events.
+     * 
+     * @param an_event the destruction event to inform of
+     */
+    public void inform( SessionDestructionEvent an_event ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/Subscriber.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/Subscriber.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/event/Subscriber.java	Tue Dec 16 17:21:15 2003
@@ -1,74 +1,74 @@
-/*
-
- ============================================================================
-                   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.event ;
-
-
-import java.util.EventObject ;
-import java.util.EventListener ;
-
-
-/**
- * A Subscriber from the Event Notifier pattern. 
- * 
- * @see <a href="http://members.ispwest.com/jeffhartkopf/notifier">
- * Event Notifier Pattern</a>
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface Subscriber extends EventListener
-{
-    /**
-     * Informs this Subscriber of an event.
-     * 
-     * @param a_event the event notified of 
-     */
-    void inform( EventObject a_event ) ;
-}
+/*
+
+ ============================================================================
+                   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.event ;
+
+
+import java.util.EventObject ;
+import java.util.EventListener ;
+
+
+/**
+ * A Subscriber from the Event Notifier pattern. 
+ * 
+ * @see <a href="http://members.ispwest.com/jeffhartkopf/notifier">
+ * Event Notifier Pattern</a>
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface Subscriber extends EventListener
+{
+    /**
+     * Informs this Subscriber of an event.
+     * 
+     * @param a_event the event notified of 
+     */
+    void inform( EventObject a_event ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/listener/KeyExpiryException.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/listener/KeyExpiryException.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/listener/KeyExpiryException.java	Tue Dec 16 17:21:15 2003
@@ -1,103 +1,103 @@
-/*
-
- ============================================================================
-                   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.listener ;
-
-
-import java.io.IOException ;
-
-
-/**
- * An exception that is raised when the accessor methods on an expired ClientKey
- * are used.
- * 
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class KeyExpiryException extends IOException
-{
-    /** the key that caused this exception by being accessed after expiring */
-    private final ClientKey m_key ;
-    
-    /** 
-     * Constructs an Exception without a message.
-     * 
-     * @param a_key the unique key for the client which expired. 
-     */
-    public KeyExpiryException( ClientKey a_key ) 
-    {
-        super() ;
-        m_key = a_key ;
-    }
-
-    
-    /**
-     * Constructs an Exception with a detailed message.
-     * 
-     * @param a_key the unique key for the client which expired. 
-     * @param a_message The message associated with the exception.
-     */
-    public KeyExpiryException( ClientKey a_key, String a_message ) 
-    {
-        super( a_message );
-        m_key = a_key ;
-    }
-
-
-    /**
-     * Gets the expired key which caused this exception when it was accessed.
-     * 
-     * @return the expired ClientKey.
-     */
-    public ClientKey getClientKey()
-    {
-        return m_key ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.listener ;
+
+
+import java.io.IOException ;
+
+
+/**
+ * An exception that is raised when the accessor methods on an expired ClientKey
+ * are used.
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class KeyExpiryException extends IOException
+{
+    /** the key that caused this exception by being accessed after expiring */
+    private final ClientKey m_key ;
+    
+    /** 
+     * Constructs an Exception without a message.
+     * 
+     * @param a_key the unique key for the client which expired. 
+     */
+    public KeyExpiryException( ClientKey a_key ) 
+    {
+        super() ;
+        m_key = a_key ;
+    }
+
+    
+    /**
+     * Constructs an Exception with a detailed message.
+     * 
+     * @param a_key the unique key for the client which expired. 
+     * @param a_message The message associated with the exception.
+     */
+    public KeyExpiryException( ClientKey a_key, String a_message ) 
+    {
+        super( a_message );
+        m_key = a_key ;
+    }
+
+
+    /**
+     * Gets the expired key which caused this exception when it was accessed.
+     * 
+     * @return the expired ClientKey.
+     */
+    public ClientKey getClientKey()
+    {
+        return m_key ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/security/LdapPrincipal.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/security/LdapPrincipal.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/security/LdapPrincipal.java	Tue Dec 16 17:21:15 2003
@@ -1,80 +1,80 @@
-/*
-
- ============================================================================
-                   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.security ;
-
-
-import java.util.Locale ;
-import javax.naming.Name ;
-import java.security.Principal ;
-
-
-/**
- * Principal with accessors to a Name and a Locale.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface LdapPrincipal extends Principal
-{
-    /**
-     * Gets the distinguished name associated with this Principal as a Name.
-     * 
-     * @return the distinguished name of this Principal as a Name
-     */
-    Name getDn() ;
-    
-    /**
-     * Gets the Locale of this Principal.
-     * 
-     * @return the Locale of the Principal.
-     */
-    Locale getLocale() ;
-}
+/*
+
+ ============================================================================
+                   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.security ;
+
+
+import java.util.Locale ;
+import javax.naming.Name ;
+import java.security.Principal ;
+
+
+/**
+ * Principal with accessors to a Name and a Locale.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface LdapPrincipal extends Principal
+{
+    /**
+     * Gets the distinguished name associated with this Principal as a Name.
+     * 
+     * @return the distinguished name of this Principal as a Name
+     */
+    Name getDn() ;
+    
+    /**
+     * Gets the Locale of this Principal.
+     * 
+     * @return the Locale of the Principal.
+     */
+    Locale getLocale() ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/DefaultStage.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/DefaultStage.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/DefaultStage.java	Tue Dec 16 17:21:15 2003
@@ -1,319 +1,319 @@
-/*
-
- ============================================================================
-                   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.Set ;
-import java.util.HashSet ;
-import java.util.LinkedList ;
-import java.util.EventObject ;
-
-
-/**
- * The default Stage implementation.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class DefaultStage implements Stage
-{
-    /** driver max wait/timeout in millis */
-    private static final long DRIVER_WAIT = 200 ;
-    /** the configuration bean */
-    protected final StageConfig m_config ;
-    /** this Stage's event queue */
-    private final LinkedList m_queue = new LinkedList() ;
-    /** this Stage's active handler threads */
-    private final Set m_activeWorkers = new HashSet() ;
-
-    /** this Stage's StageDriver's driving thread */
-    private Thread m_thread = null ;
-    /** the start stop control variable */
-    private Boolean m_hasStarted = new Boolean( false ) ;
-    /** this Stage's monitor */
-    private StageMonitor m_monitor = new StageMonitorAdapter() ;
-
-    
-    // ------------------------------------------------------------------------
-    // C O N S T R U C T O R S
-    // ------------------------------------------------------------------------
-
-
-    /**
-     * Creates a DefaultStage using a configuration bean.
-     * 
-     * @param a_config the configuration bean
-     */
-    public DefaultStage( StageConfig a_config )
-    {
-        m_config = a_config ;
-        m_hasStarted = new Boolean( false ) ;
-    }
-    
-    
-    // ------------------------------------------------------------------------
-    // Stage Methods
-    // ------------------------------------------------------------------------
-
-
-    /**
-     * @see org.apache.eve.seda.Stage#
-     * addPredicate(org.apache.eve.seda.EnqueuePredicate)
-     */
-    public void addPredicate( EnqueuePredicate a_predicate )
-    {
-        m_config.getPredicates().add( a_predicate ) ;
-    }
-    
-    
-    /**
-     * @see org.apache.eve.seda.Stage#getConfig()
-     */
-    public StageConfig getConfig()
-    {
-        return m_config ;
-    }
-
-
-    /**
-     * @see org.apache.eve.seda.Stage#enqueue(java.util.EventObject)
-     */
-    public void enqueue( final EventObject an_event )
-    {
-        boolean l_isAccepted = true ;
-        
-        for ( int ii = 0; ii < m_config.getPredicates().size() && l_isAccepted; 
-            ii++ ) 
-        {
-            EnqueuePredicate l_test = 
-                ( EnqueuePredicate ) m_config.getPredicates().get( ii ) ;
-            l_isAccepted &= l_test.accept( an_event ) ;
-        }
-
-        if( l_isAccepted ) 
-        {
-            synchronized ( m_queue ) 
-            {
-                m_monitor.lockedQueue( this, an_event ) ;
-                m_queue.addFirst( an_event ) ;
-                m_queue.notifyAll() ;
-            }
-
-            m_monitor.enqueueOccurred( this, an_event ) ;
-        } 
-        else 
-        {
-            m_monitor.enqueueRejected( this, an_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 
-    // ------------------------------------------------------------------------
-
-
-    /**
-     * The runnable driving the main thread of this Stage.
-     *
-     * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
-     * @author $Author$
-     * @version $Revision$
-     */
-    class StageDriver implements Runnable
-    {
-        public final void run()
-        {
-            m_monitor.startedDriver( DefaultStage.this ) ;
-    
-            while( m_hasStarted.booleanValue() ) 
-            {
-                synchronized ( m_queue ) 
-                {
-                    if( m_queue.isEmpty() ) 
-                    {
-                        try 
-                        {
-                            m_queue.wait( DRIVER_WAIT ) ;
-                        } 
-                        catch( InterruptedException e ) 
-                        {
-                            try { stop() ; } catch ( Exception e2 ) 
-                            {/*NOT THROWN*/}
-                            m_monitor.driverFailed( DefaultStage.this, e ) ;
-                        }
-                    } 
-                    else 
-                    {
-                        EventObject l_event = 
-                            ( EventObject ) m_queue.removeLast() ;
-                        m_monitor.eventDequeued( DefaultStage.this, l_event ) ;
-                        Runnable l_runnable = new ExecutableHandler( l_event ) ;
-                        m_config.getThreadPool().execute( l_runnable ) ;
-                    }
-                }
-            }
-        }
-    }
-    
-    
-    /**
-     * The runnable driving the work of this Stage's handler.
-     *
-     * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
-     * @author $Author$
-     * @version $Revision$
-     */
-    class ExecutableHandler implements Runnable
-    {
-        final EventObject m_event ;
-        
-        public ExecutableHandler( EventObject an_event )
-        {
-            m_event = an_event ;
-        }
-        
-        public void run()
-        {
-            synchronized( m_activeWorkers )
-            {
-                m_activeWorkers.add( Thread.currentThread() ) ;
-            }
-            
-            try 
-            {
-                m_config.getHandler().handleEvent( m_event ) ;
-            } 
-            catch( Throwable t ) 
-            {
-                m_monitor.handlerFailed( DefaultStage.this, m_event, t ) ;
-            }
-            
-            synchronized( m_activeWorkers )
-            {
-                m_activeWorkers.remove( Thread.currentThread() ) ;
-            }
-
-            m_monitor.eventHandled( DefaultStage.this, m_event ) ;
-        }
-    }
-
-
-    // ------------------------------------------------------------------------
-    // start stop controls
-    // ------------------------------------------------------------------------
-    
-    
-    /**
-     * Starts up this Stage's driver.
-     */
-    public void start()
-    {
-        synchronized( m_hasStarted )
-        {
-            if ( m_hasStarted.booleanValue() )
-            {
-                throw new IllegalStateException( "Already started!" ) ;
-            }
-            
-            m_hasStarted = new Boolean( true ) ;
-            m_thread = new Thread( new StageDriver() ) ;
-            m_thread.start() ;
-        }
-        
-        m_monitor.started( this ) ;
-    }
-    
-    
-    /**
-     * Blocks calling thread until this Stage gracefully stops its driver and
-     * all its worker threads.
-     */
-    public void stop() throws InterruptedException
-    {
-        synchronized( m_hasStarted )
-        {
-            m_hasStarted = new Boolean( false ) ;
-
-            synchronized( m_activeWorkers ) 
-            {
-                while ( m_thread.isAlive() || ! m_activeWorkers.isEmpty() )
-                {
-                    Thread.sleep( 100 ) ;
-                }
-            }
-        }
-        
-        m_monitor.stopped( this ) ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.Set ;
+import java.util.HashSet ;
+import java.util.LinkedList ;
+import java.util.EventObject ;
+
+
+/**
+ * The default Stage implementation.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class DefaultStage implements Stage
+{
+    /** driver max wait/timeout in millis */
+    private static final long DRIVER_WAIT = 200 ;
+    /** the configuration bean */
+    protected final StageConfig m_config ;
+    /** this Stage's event queue */
+    private final LinkedList m_queue = new LinkedList() ;
+    /** this Stage's active handler threads */
+    private final Set m_activeWorkers = new HashSet() ;
+
+    /** this Stage's StageDriver's driving thread */
+    private Thread m_thread = null ;
+    /** the start stop control variable */
+    private Boolean m_hasStarted = new Boolean( false ) ;
+    /** this Stage's monitor */
+    private StageMonitor m_monitor = new StageMonitorAdapter() ;
+
+    
+    // ------------------------------------------------------------------------
+    // C O N S T R U C T O R S
+    // ------------------------------------------------------------------------
+
+
+    /**
+     * Creates a DefaultStage using a configuration bean.
+     * 
+     * @param a_config the configuration bean
+     */
+    public DefaultStage( StageConfig a_config )
+    {
+        m_config = a_config ;
+        m_hasStarted = new Boolean( false ) ;
+    }
+    
+    
+    // ------------------------------------------------------------------------
+    // Stage Methods
+    // ------------------------------------------------------------------------
+
+
+    /**
+     * @see org.apache.eve.seda.Stage#
+     * addPredicate(org.apache.eve.seda.EnqueuePredicate)
+     */
+    public void addPredicate( EnqueuePredicate a_predicate )
+    {
+        m_config.getPredicates().add( a_predicate ) ;
+    }
+    
+    
+    /**
+     * @see org.apache.eve.seda.Stage#getConfig()
+     */
+    public StageConfig getConfig()
+    {
+        return m_config ;
+    }
+
+
+    /**
+     * @see org.apache.eve.seda.Stage#enqueue(java.util.EventObject)
+     */
+    public void enqueue( final EventObject an_event )
+    {
+        boolean l_isAccepted = true ;
+        
+        for ( int ii = 0; ii < m_config.getPredicates().size() && l_isAccepted; 
+            ii++ ) 
+        {
+            EnqueuePredicate l_test = 
+                ( EnqueuePredicate ) m_config.getPredicates().get( ii ) ;
+            l_isAccepted &= l_test.accept( an_event ) ;
+        }
+
+        if( l_isAccepted ) 
+        {
+            synchronized ( m_queue ) 
+            {
+                m_monitor.lockedQueue( this, an_event ) ;
+                m_queue.addFirst( an_event ) ;
+                m_queue.notifyAll() ;
+            }
+
+            m_monitor.enqueueOccurred( this, an_event ) ;
+        } 
+        else 
+        {
+            m_monitor.enqueueRejected( this, an_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 
+    // ------------------------------------------------------------------------
+
+
+    /**
+     * The runnable driving the main thread of this Stage.
+     *
+     * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+     * @author $Author$
+     * @version $Revision$
+     */
+    class StageDriver implements Runnable
+    {
+        public final void run()
+        {
+            m_monitor.startedDriver( DefaultStage.this ) ;
+    
+            while( m_hasStarted.booleanValue() ) 
+            {
+                synchronized ( m_queue ) 
+                {
+                    if( m_queue.isEmpty() ) 
+                    {
+                        try 
+                        {
+                            m_queue.wait( DRIVER_WAIT ) ;
+                        } 
+                        catch( InterruptedException e ) 
+                        {
+                            try { stop() ; } catch ( Exception e2 ) 
+                            {/*NOT THROWN*/}
+                            m_monitor.driverFailed( DefaultStage.this, e ) ;
+                        }
+                    } 
+                    else 
+                    {
+                        EventObject l_event = 
+                            ( EventObject ) m_queue.removeLast() ;
+                        m_monitor.eventDequeued( DefaultStage.this, l_event ) ;
+                        Runnable l_runnable = new ExecutableHandler( l_event ) ;
+                        m_config.getThreadPool().execute( l_runnable ) ;
+                    }
+                }
+            }
+        }
+    }
+    
+    
+    /**
+     * The runnable driving the work of this Stage's handler.
+     *
+     * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+     * @author $Author$
+     * @version $Revision$
+     */
+    class ExecutableHandler implements Runnable
+    {
+        final EventObject m_event ;
+        
+        public ExecutableHandler( EventObject an_event )
+        {
+            m_event = an_event ;
+        }
+        
+        public void run()
+        {
+            synchronized( m_activeWorkers )
+            {
+                m_activeWorkers.add( Thread.currentThread() ) ;
+            }
+            
+            try 
+            {
+                m_config.getHandler().handleEvent( m_event ) ;
+            } 
+            catch( Throwable t ) 
+            {
+                m_monitor.handlerFailed( DefaultStage.this, m_event, t ) ;
+            }
+            
+            synchronized( m_activeWorkers )
+            {
+                m_activeWorkers.remove( Thread.currentThread() ) ;
+            }
+
+            m_monitor.eventHandled( DefaultStage.this, m_event ) ;
+        }
+    }
+
+
+    // ------------------------------------------------------------------------
+    // start stop controls
+    // ------------------------------------------------------------------------
+    
+    
+    /**
+     * Starts up this Stage's driver.
+     */
+    public void start()
+    {
+        synchronized( m_hasStarted )
+        {
+            if ( m_hasStarted.booleanValue() )
+            {
+                throw new IllegalStateException( "Already started!" ) ;
+            }
+            
+            m_hasStarted = new Boolean( true ) ;
+            m_thread = new Thread( new StageDriver() ) ;
+            m_thread.start() ;
+        }
+        
+        m_monitor.started( this ) ;
+    }
+    
+    
+    /**
+     * Blocks calling thread until this Stage gracefully stops its driver and
+     * all its worker threads.
+     */
+    public void stop() throws InterruptedException
+    {
+        synchronized( m_hasStarted )
+        {
+            m_hasStarted = new Boolean( false ) ;
+
+            synchronized( m_activeWorkers ) 
+            {
+                while ( m_thread.isAlive() || ! m_activeWorkers.isEmpty() )
+                {
+                    Thread.sleep( 100 ) ;
+                }
+            }
+        }
+        
+        m_monitor.stopped( this ) ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/EnqueuePredicate.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/EnqueuePredicate.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/EnqueuePredicate.java	Tue Dec 16 17:21:15 2003
@@ -1,72 +1,72 @@
-/*
-
- ============================================================================
-                   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 ;
-
-
-/**
- * Predicate used to determine whether or not an event is enqueued onto a Stage.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface EnqueuePredicate
-{
-    /**
-     * Determines whether or not an event gets enqueued onto a Stage queue.
-     * 
-     * @param an_event the event to enqueue
-     * @return true if an enqueue operation is allowed false if it is denied
-     */
-    public boolean accept( EventObject an_event ) ; 
-}
+/*
+
+ ============================================================================
+                   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 ;
+
+
+/**
+ * Predicate used to determine whether or not an event is enqueued onto a Stage.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface EnqueuePredicate
+{
+    /**
+     * Determines whether or not an event gets enqueued onto a Stage queue.
+     * 
+     * @param an_event the event to enqueue
+     * @return true if an enqueue operation is allowed false if it is denied
+     */
+    public boolean accept( EventObject an_event ) ; 
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/Stage.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/Stage.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/Stage.java	Tue Dec 16 17:21:15 2003
@@ -1,87 +1,87 @@
-/*
-
- ============================================================================
-                   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 ;
-
-
-/**
- * Simple SEDA Stage interface.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface Stage
-{
-    /**
-     * Gets the configuration for this Stage.
-     * 
-     * @return this Stage's configuration bean 
-     */
-    StageConfig getConfig() ;
-    
-    /**
-     * Enqueues an event onto this stage.
-     * 
-     * @param an_event the event to enqueue
-     */
-    void enqueue( EventObject an_event ) ;
-    
-    /**
-     * Adds an EnqueuePredicate to control what events can and cannot be 
-     * enqueued onto this Stage.
-     * 
-     * @param a_predicate the enqueue predecate to add
-     */
-    void addPredicate( EnqueuePredicate a_predicate ) ;
-}
-
+/*
+
+ ============================================================================
+                   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 ;
+
+
+/**
+ * Simple SEDA Stage interface.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface Stage
+{
+    /**
+     * Gets the configuration for this Stage.
+     * 
+     * @return this Stage's configuration bean 
+     */
+    StageConfig getConfig() ;
+    
+    /**
+     * Enqueues an event onto this stage.
+     * 
+     * @param an_event the event to enqueue
+     */
+    void enqueue( EventObject an_event ) ;
+    
+    /**
+     * Adds an EnqueuePredicate to control what events can and cannot be 
+     * enqueued onto this Stage.
+     * 
+     * @param a_predicate the enqueue predecate to add
+     */
+    void addPredicate( EnqueuePredicate a_predicate ) ;
+}
+

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageConfig.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageConfig.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageConfig.java	Tue Dec 16 17:21:15 2003
@@ -1,95 +1,95 @@
-/*
-
- ============================================================================
-                   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.ArrayList ;
-
-import org.apache.eve.thread.ThreadPool ;
-
-
-/**
- * The configuration required for a stage.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface StageConfig
-{
-    /**
-     * Gets the name of the Stage.
-     * 
-     * @return the name of the stage
-     */
-    String getName() ;
-    
-    /**
-     * Gets the Stage's handler. 
-     * 
-     * @return the Stage's handler
-     */
-    StageHandler getHandler() ;
-    
-    /**
-     * Gets the set of enqueue predicates used by the Stage to throttle and 
-     * control the enqueue operation.
-     * 
-     * @return the enqueue predicates used by the Stage
-     */
-    ArrayList getPredicates() ;
-    
-    /**
-     * Gets the Stage's thread pool.
-     * 
-     * @return the thread pool used by the Stage
-     */
-    ThreadPool getThreadPool() ;
-}
+/*
+
+ ============================================================================
+                   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.ArrayList ;
+
+import org.apache.eve.thread.ThreadPool ;
+
+
+/**
+ * The configuration required for a stage.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface StageConfig
+{
+    /**
+     * Gets the name of the Stage.
+     * 
+     * @return the name of the stage
+     */
+    String getName() ;
+    
+    /**
+     * Gets the Stage's handler. 
+     * 
+     * @return the Stage's handler
+     */
+    StageHandler getHandler() ;
+    
+    /**
+     * Gets the set of enqueue predicates used by the Stage to throttle and 
+     * control the enqueue operation.
+     * 
+     * @return the enqueue predicates used by the Stage
+     */
+    ArrayList getPredicates() ;
+    
+    /**
+     * Gets the Stage's thread pool.
+     * 
+     * @return the thread pool used by the Stage
+     */
+    ThreadPool getThreadPool() ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitor.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitor.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitor.java	Tue Dec 16 17:21:15 2003
@@ -1,147 +1,147 @@
-/*
-
- ============================================================================
-                   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 ;
-
-
-/**
- * Interface used to monitor Stage services.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface StageMonitor
-{
-    /**
-     * Monitors Stage has starts.
-     * 
-     * @param a_stage the started Stage 
-     */
-    void started( Stage a_stage ) ;
-
-    /**
-     * Monitors Stage has stops.
-     * 
-     * @param a_stage the stopped Stage 
-     */
-    void stopped( Stage a_stage ) ;
-    
-    /**
-     * Monitors StageDriver starts.
-     * 
-     * @param a_stage the Stage whose driver started
-     */
-    void startedDriver( Stage a_stage ) ;
-    
-    /**
-     * Monitor for successful enqueue operations on the stage.
-     * 
-     * @param a_stage the stage enqueued on
-     * @param an_event the event enqueued
-     */
-    void enqueueOccurred( Stage a_stage, EventObject an_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
-     */
-    void enqueueRejected( Stage a_stage, EventObject an_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
-     */
-    void lockedQueue( Stage a_stage, EventObject an_event ) ;
-    
-    /**
-     * Monitor for dequeue operations.
-     * 
-     * @param a_stage the Stage dequeued
-     * @param an_event the event that was dequeued
-     */
-    void eventDequeued( Stage a_stage, EventObject an_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
-     */
-    void eventHandled( Stage a_stage, EventObject an_event ) ;
-    
-    // ------------------------------------------------------------------------
-    // failure monitors
-    // ------------------------------------------------------------------------
-
-    /**
-     * Monitors driver thread interruption failures.
-     * 
-     * @param a_stage the stage that caused the failure
-     * @param a_fault the faulting exception
-     */
-    void driverFailed( Stage a_stage, InterruptedException a_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
-     */
-    void handlerFailed( Stage a_stage, EventObject an_event, 
-                        Throwable a_fault ) ;
-}
+/*
+
+ ============================================================================
+                   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 ;
+
+
+/**
+ * Interface used to monitor Stage services.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface StageMonitor
+{
+    /**
+     * Monitors Stage has starts.
+     * 
+     * @param a_stage the started Stage 
+     */
+    void started( Stage a_stage ) ;
+
+    /**
+     * Monitors Stage has stops.
+     * 
+     * @param a_stage the stopped Stage 
+     */
+    void stopped( Stage a_stage ) ;
+    
+    /**
+     * Monitors StageDriver starts.
+     * 
+     * @param a_stage the Stage whose driver started
+     */
+    void startedDriver( Stage a_stage ) ;
+    
+    /**
+     * Monitor for successful enqueue operations on the stage.
+     * 
+     * @param a_stage the stage enqueued on
+     * @param an_event the event enqueued
+     */
+    void enqueueOccurred( Stage a_stage, EventObject an_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
+     */
+    void enqueueRejected( Stage a_stage, EventObject an_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
+     */
+    void lockedQueue( Stage a_stage, EventObject an_event ) ;
+    
+    /**
+     * Monitor for dequeue operations.
+     * 
+     * @param a_stage the Stage dequeued
+     * @param an_event the event that was dequeued
+     */
+    void eventDequeued( Stage a_stage, EventObject an_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
+     */
+    void eventHandled( Stage a_stage, EventObject an_event ) ;
+    
+    // ------------------------------------------------------------------------
+    // failure monitors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Monitors driver thread interruption failures.
+     * 
+     * @param a_stage the stage that caused the failure
+     * @param a_fault the faulting exception
+     */
+    void driverFailed( Stage a_stage, InterruptedException a_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
+     */
+    void handlerFailed( Stage a_stage, EventObject an_event, 
+                        Throwable a_fault ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitorAdapter.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitorAdapter.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/seda/StageMonitorAdapter.java	Tue Dec 16 17:21:15 2003
@@ -1,150 +1,150 @@
-/*
-
- ============================================================================
-                   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;
-
-/**
- * $todo$ doc me
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class StageMonitorAdapter implements StageMonitor
-{
-    /* (non-Javadoc)
-     * @see org.apache.eve.seda.StageMonitor#started(org.apache.eve.seda.Stage)
-     */
-    public void started( Stage a_stage )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.seda.StageMonitor#stopped(org.apache.eve.seda.Stage)
-     */
-    public void stopped( Stage a_stage )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.seda.StageMonitor#startedDriver(
-     * org.apache.eve.seda.Stage)
-     */
-    public void startedDriver( Stage a_stage )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.seda.StageMonitor#enqueueOccurred(
-     * org.apache.eve.seda.Stage, java.util.EventObject)
-     */
-    public void enqueueOccurred( Stage a_stage, EventObject an_event )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.seda.StageMonitor#enqueueRejected(
-     * org.apache.eve.seda.Stage, java.util.EventObject)
-     */
-    public void enqueueRejected( Stage a_stage, EventObject an_event )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.seda.StageMonitor#lockedQueue(
-     * org.apache.eve.seda.Stage, java.util.EventObject)
-     */
-    public void lockedQueue( Stage a_stage, EventObject an_event )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.seda.StageMonitor#eventDequeued(
-     * org.apache.eve.seda.Stage, java.util.EventObject)
-     */
-    public void eventDequeued( Stage a_stage, EventObject an_event )
-    {
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.seda.StageMonitor#eventHandled(
-     * org.apache.eve.seda.Stage, java.util.EventObject)
-     */
-    public void eventHandled( Stage a_stage, EventObject an_event )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.seda.StageMonitor#driverFailed(
-     * org.apache.eve.seda.Stage, java.lang.InterruptedException)
-     */
-    public void driverFailed( Stage a_stage, InterruptedException a_fault )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @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)
-    {
-    }
-}
+/*
+
+ ============================================================================
+                   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;
+
+/**
+ * $todo$ doc me
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class StageMonitorAdapter implements StageMonitor
+{
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageMonitor#started(org.apache.eve.seda.Stage)
+     */
+    public void started( Stage a_stage )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageMonitor#stopped(org.apache.eve.seda.Stage)
+     */
+    public void stopped( Stage a_stage )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageMonitor#startedDriver(
+     * org.apache.eve.seda.Stage)
+     */
+    public void startedDriver( Stage a_stage )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageMonitor#enqueueOccurred(
+     * org.apache.eve.seda.Stage, java.util.EventObject)
+     */
+    public void enqueueOccurred( Stage a_stage, EventObject an_event )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageMonitor#enqueueRejected(
+     * org.apache.eve.seda.Stage, java.util.EventObject)
+     */
+    public void enqueueRejected( Stage a_stage, EventObject an_event )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageMonitor#lockedQueue(
+     * org.apache.eve.seda.Stage, java.util.EventObject)
+     */
+    public void lockedQueue( Stage a_stage, EventObject an_event )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageMonitor#eventDequeued(
+     * org.apache.eve.seda.Stage, java.util.EventObject)
+     */
+    public void eventDequeued( Stage a_stage, EventObject an_event )
+    {
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageMonitor#eventHandled(
+     * org.apache.eve.seda.Stage, java.util.EventObject)
+     */
+    public void eventHandled( Stage a_stage, EventObject an_event )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.seda.StageMonitor#driverFailed(
+     * org.apache.eve.seda.Stage, java.lang.InterruptedException)
+     */
+    public void driverFailed( Stage a_stage, InterruptedException a_fault )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @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)
+    {
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/thread/ThreadPool.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/thread/ThreadPool.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/common/api/src/java/org/apache/eve/thread/ThreadPool.java	Tue Dec 16 17:21:15 2003
@@ -1,69 +1,69 @@
-/*
-
- ============================================================================
-                   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.thread ;
-
-
-/**
- * A pool of threads used by the server or its Stages.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface ThreadPool
-{
-    /**
-     * Allocates Thread from pool to execute a runnable and releases it on 
-     * completion.
-     * 
-     * @param a_runnable the runnable to execute
-     */
-    void execute( Runnable a_runnable ) ;
-}
+/*
+
+ ============================================================================
+                   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.thread ;
+
+
+/**
+ * A pool of threads used by the server or its Stages.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface ThreadPool
+{
+    /**
+     * Allocates Thread from pool to execute a runnable and releases it on 
+     * completion.
+     * 
+     * @param a_runnable the runnable to execute
+     */
+    void execute( Runnable a_runnable ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/DefaultEventRouter.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/DefaultEventRouter.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/DefaultEventRouter.java	Tue Dec 16 17:21:15 2003
@@ -1,227 +1,227 @@
-/*
-
- ============================================================================
-                   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.event ;
-
-
-import java.util.Set ;
-import java.util.HashSet ;
-import java.util.Iterator ;
-import java.util.EventObject ;
-
-
-/**
- * An synchronous implementation of the event router / notification pattern.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class DefaultEventRouter implements EventRouter
-{
-    /** the set of subscriptions made with this router */
-    private Set m_subscriptions = new HashSet() ;
-    /** the monitor - initially set to the null monitor */
-    private EventRouterMonitor m_monitor = new EventRouterMonitorAdapter() ;
-    
-    
-    /**
-     * @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 )
-    {
-        if ( ! EventObject.class.isAssignableFrom( a_type ) ) 
-        {
-            throw new IllegalArgumentException( "Invalid event class: " 
-                    + a_type.getName() ) ;
-        }
-
-        Subscription l_subscription = 
-            new Subscription( a_type, a_filter, a_subscriber ) ;
-
-        if ( ! m_subscriptions.contains( l_subscription ) )
-        {
-            synchronized ( m_subscriptions )
-            {
-                m_subscriptions.add( l_subscription ) ;
-            }
-            
-            m_monitor.addedSubscription( l_subscription ) ;
-        }
-    }
-
-    
-    /**
-     * @see org.apache.eve.event.EventRouter#unsubscribe(
-     * org.apache.eve.event.Subscriber)
-     */
-    public void unsubscribe( Subscriber a_subscriber )
-    {
-        Iterator l_list = m_subscriptions.iterator() ;
-        
-        synchronized ( m_subscriptions )
-        {
-            while ( l_list.hasNext() )
-            {
-                Subscription l_subscription = ( Subscription ) l_list.next() ;
-                if ( a_subscriber == l_subscription.getSubscriber() )
-                {
-                    l_list.remove() ;
-                    m_monitor.removedSubscription( l_subscription ) ;
-                }
-            }
-        }
-    }
-
-
-    /**
-     * (non-Javadoc)
-     * @see org.apache.eve.event.EventRouter#unsubscribe(java.lang.Class, 
-     * org.apache.eve.event.Subscriber)
-     */
-    public void unsubscribe( Class a_type, Subscriber a_subscriber )
-    {
-        Iterator l_list = m_subscriptions.iterator() ;
-        
-        synchronized ( m_subscriptions )
-        {
-            while ( l_list.hasNext() )
-            {
-                Subscription l_subscription = ( Subscription ) l_list.next() ;
-                if ( a_subscriber == l_subscription.getSubscriber()
-                  && a_type.equals( l_subscription.getType() ) )
-                {
-                    l_list.remove() ;
-                    m_monitor.removedSubscription( l_subscription ) ;
-                }
-            }
-        }
-    }
-
-
-    /**
-     * (non-Javadoc)
-     * @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 )
-    {
-        if ( ! EventObject.class.isAssignableFrom( a_type ) ) 
-        {
-            throw new IllegalArgumentException( "Invalid event class: " 
-                    + a_type.getName() ) ;
-        }
-        
-        final Subscription l_subscription = new Subscription( a_type, a_filter, 
-                a_subscriber ) ;
-        
-        synchronized ( m_subscriptions )
-        {
-            m_subscriptions.remove( l_subscription ) ;
-        }
-    }
-
-
-    /**
-     * (non-Javadoc)
-     * @see org.apache.eve.event.EventRouter#publish(org.apache.eve.event.Event)
-     */
-    public void publish( EventObject a_event ) 
-    {
-        final Subscription [] l_subscriptions ;
-        
-        synchronized ( m_subscriptions )
-        {
-            l_subscriptions = ( Subscription [] ) m_subscriptions
-                .toArray( new Subscription [ m_subscriptions.size() ] ) ;
-        }
-
-        for ( int ii = 0; ii < l_subscriptions.length; ii++ )
-        {
-            boolean isAssignable = l_subscriptions[ii].getType()
-                .isAssignableFrom( a_event.getClass() ) ;
-            
-            if ( ! isAssignable )
-            {
-                continue ;
-            }
-            
-            if ( l_subscriptions[ii].getFilter() != null && 
-                 l_subscriptions[ii].getFilter().apply( a_event ) )  
-            {
-                l_subscriptions[ii].getSubscriber().inform( a_event ) ;
-            }
-        }
-    }
-    
-    
-    /**
-     * Sets the event router's monitor.
-     * 
-     * @param a_monitor the monitor
-     */
-    public void setMonitor( EventRouterMonitor a_monitor )
-    {
-        m_monitor = a_monitor ;
-    }
-    
-    
-    /**
-     * Gets the event router's monitor.
-     * 
-     * @return the monitor
-     */
-    public EventRouterMonitor getMonitor()
-    {
-        return m_monitor ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.event ;
+
+
+import java.util.Set ;
+import java.util.HashSet ;
+import java.util.Iterator ;
+import java.util.EventObject ;
+
+
+/**
+ * An synchronous implementation of the event router / notification pattern.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class DefaultEventRouter implements EventRouter
+{
+    /** the set of subscriptions made with this router */
+    private Set m_subscriptions = new HashSet() ;
+    /** the monitor - initially set to the null monitor */
+    private EventRouterMonitor m_monitor = new EventRouterMonitorAdapter() ;
+    
+    
+    /**
+     * @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 )
+    {
+        if ( ! EventObject.class.isAssignableFrom( a_type ) ) 
+        {
+            throw new IllegalArgumentException( "Invalid event class: " 
+                    + a_type.getName() ) ;
+        }
+
+        Subscription l_subscription = 
+            new Subscription( a_type, a_filter, a_subscriber ) ;
+
+        if ( ! m_subscriptions.contains( l_subscription ) )
+        {
+            synchronized ( m_subscriptions )
+            {
+                m_subscriptions.add( l_subscription ) ;
+            }
+            
+            m_monitor.addedSubscription( l_subscription ) ;
+        }
+    }
+
+    
+    /**
+     * @see org.apache.eve.event.EventRouter#unsubscribe(
+     * org.apache.eve.event.Subscriber)
+     */
+    public void unsubscribe( Subscriber a_subscriber )
+    {
+        Iterator l_list = m_subscriptions.iterator() ;
+        
+        synchronized ( m_subscriptions )
+        {
+            while ( l_list.hasNext() )
+            {
+                Subscription l_subscription = ( Subscription ) l_list.next() ;
+                if ( a_subscriber == l_subscription.getSubscriber() )
+                {
+                    l_list.remove() ;
+                    m_monitor.removedSubscription( l_subscription ) ;
+                }
+            }
+        }
+    }
+
+
+    /**
+     * (non-Javadoc)
+     * @see org.apache.eve.event.EventRouter#unsubscribe(java.lang.Class, 
+     * org.apache.eve.event.Subscriber)
+     */
+    public void unsubscribe( Class a_type, Subscriber a_subscriber )
+    {
+        Iterator l_list = m_subscriptions.iterator() ;
+        
+        synchronized ( m_subscriptions )
+        {
+            while ( l_list.hasNext() )
+            {
+                Subscription l_subscription = ( Subscription ) l_list.next() ;
+                if ( a_subscriber == l_subscription.getSubscriber()
+                  && a_type.equals( l_subscription.getType() ) )
+                {
+                    l_list.remove() ;
+                    m_monitor.removedSubscription( l_subscription ) ;
+                }
+            }
+        }
+    }
+
+
+    /**
+     * (non-Javadoc)
+     * @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 )
+    {
+        if ( ! EventObject.class.isAssignableFrom( a_type ) ) 
+        {
+            throw new IllegalArgumentException( "Invalid event class: " 
+                    + a_type.getName() ) ;
+        }
+        
+        final Subscription l_subscription = new Subscription( a_type, a_filter, 
+                a_subscriber ) ;
+        
+        synchronized ( m_subscriptions )
+        {
+            m_subscriptions.remove( l_subscription ) ;
+        }
+    }
+
+
+    /**
+     * (non-Javadoc)
+     * @see org.apache.eve.event.EventRouter#publish(org.apache.eve.event.Event)
+     */
+    public void publish( EventObject a_event ) 
+    {
+        final Subscription [] l_subscriptions ;
+        
+        synchronized ( m_subscriptions )
+        {
+            l_subscriptions = ( Subscription [] ) m_subscriptions
+                .toArray( new Subscription [ m_subscriptions.size() ] ) ;
+        }
+
+        for ( int ii = 0; ii < l_subscriptions.length; ii++ )
+        {
+            boolean isAssignable = l_subscriptions[ii].getType()
+                .isAssignableFrom( a_event.getClass() ) ;
+            
+            if ( ! isAssignable )
+            {
+                continue ;
+            }
+            
+            if ( l_subscriptions[ii].getFilter() != null && 
+                 l_subscriptions[ii].getFilter().apply( a_event ) )  
+            {
+                l_subscriptions[ii].getSubscriber().inform( a_event ) ;
+            }
+        }
+    }
+    
+    
+    /**
+     * Sets the event router's monitor.
+     * 
+     * @param a_monitor the monitor
+     */
+    public void setMonitor( EventRouterMonitor a_monitor )
+    {
+        m_monitor = a_monitor ;
+    }
+    
+    
+    /**
+     * Gets the event router's monitor.
+     * 
+     * @return the monitor
+     */
+    public EventRouterMonitor getMonitor()
+    {
+        return m_monitor ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/MerlinEventRouter.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/MerlinEventRouter.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/MerlinEventRouter.java	Tue Dec 16 17:21:15 2003
@@ -1,185 +1,185 @@
-/*
-
- ============================================================================
-                   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.event ;
-
-
-import java.util.EventObject ;
-
-import org.apache.avalon.framework.activity.Initializable ;
-import org.apache.avalon.framework.logger.AbstractLogEnabled ;
-
-
-/**
- * A Merlin and Avalon specific event router wrapping the the default 
- * implementation.
- * 
- * @avalon.component name="event-router" lifestyle="singleton"
- * @avalon.service type="org.apache.eve.event.EventRouter" version="1.0"
- * 
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class MerlinEventRouter extends AbstractLogEnabled 
-    implements 
-    EventRouter,
-    Initializable
-{
-    /** the default EventRouter implementation we wrap */ 
-    private DefaultEventRouter m_router ;
-    
-    
-    // ------------------------------------------------------------------------
-    // EventRouter Methods
-    // ------------------------------------------------------------------------
-    
-    
-    /* (non-Javadoc)
-     * @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 )
-    {
-        m_router.subscribe( a_type, a_filter, a_subscriber ) ;
-    }
-    
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.event.EventRouter#unsubscribe(
-     * org.apache.eve.event.Subscriber)
-     */
-    public void unsubscribe( Subscriber a_subscriber )
-    {
-        m_router.unsubscribe( a_subscriber ) ;
-    }
-    
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.event.EventRouter#unsubscribe(java.lang.Class, 
-     * org.apache.eve.event.Subscriber)
-     */
-    public void unsubscribe( Class a_type, Subscriber a_subscriber )
-    {
-        m_router.unsubscribe( a_type, a_subscriber ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.event.EventRouter#publish(java.util.EventObject)
-     */
-    public void publish( EventObject a_event )
-    {
-        m_router.publish( a_event ) ;
-    }
-
-    
-    // ------------------------------------------------------------------------
-    // Avalon Life Cycle Methods
-    // ------------------------------------------------------------------------
-
-    
-    /*
-     *  (non-Javadoc)
-     * @see org.apache.avalon.framework.activity.Initializable#initialize()
-     */
-    public void initialize()
-    {
-        m_router = new DefaultEventRouter() ;
-        m_router.setMonitor( new Monitor() ) ;
-    }
-    
-    
-    // ------------------------------------------------------------------------
-    // Avalon specific EventRouterMonitor
-    // ------------------------------------------------------------------------
-
-    
-    /**
-     * EventRouterMonitor that uses this module's logger.
-     *
-     * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
-     * @author $Author$
-     * @version $Revision$
-     */
-    class Monitor implements EventRouterMonitor
-    {
-        /* (non-Javadoc)
-         * @see org.apache.eve.event.EventRouterMonitor#eventPublished(
-         * java.util.EventObject)
-         */
-        public void eventPublished( EventObject a_event )
-        {
-            getLogger().debug( "published event: " + a_event ) ;
-        }
-
-    
-        /* (non-Javadoc)
-         * @see org.apache.eve.event.EventRouterMonitor#addedSubscription(
-         * org.apache.eve.event.Subscription)
-         */
-        public void addedSubscription( Subscription a_subscription )
-        {
-            getLogger().debug( "added subscription: " + a_subscription ) ;
-        }
-
-    
-        /* (non-Javadoc)
-         * @see org.apache.eve.event.EventRouterMonitor#removedSubscription(
-         * org.apache.eve.event.Subscription)
-         */
-        public void removedSubscription( Subscription a_subscription )
-        {
-            getLogger().debug( "removed subscription: " + a_subscription ) ;
-        }
-    }
-}
+/*
+
+ ============================================================================
+                   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.event ;
+
+
+import java.util.EventObject ;
+
+import org.apache.avalon.framework.activity.Initializable ;
+import org.apache.avalon.framework.logger.AbstractLogEnabled ;
+
+
+/**
+ * A Merlin and Avalon specific event router wrapping the the default 
+ * implementation.
+ * 
+ * @avalon.component name="event-router" lifestyle="singleton"
+ * @avalon.service type="org.apache.eve.event.EventRouter" version="1.0"
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class MerlinEventRouter extends AbstractLogEnabled 
+    implements 
+    EventRouter,
+    Initializable
+{
+    /** the default EventRouter implementation we wrap */ 
+    private DefaultEventRouter m_router ;
+    
+    
+    // ------------------------------------------------------------------------
+    // EventRouter Methods
+    // ------------------------------------------------------------------------
+    
+    
+    /* (non-Javadoc)
+     * @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 )
+    {
+        m_router.subscribe( a_type, a_filter, a_subscriber ) ;
+    }
+    
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.event.EventRouter#unsubscribe(
+     * org.apache.eve.event.Subscriber)
+     */
+    public void unsubscribe( Subscriber a_subscriber )
+    {
+        m_router.unsubscribe( a_subscriber ) ;
+    }
+    
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.event.EventRouter#unsubscribe(java.lang.Class, 
+     * org.apache.eve.event.Subscriber)
+     */
+    public void unsubscribe( Class a_type, Subscriber a_subscriber )
+    {
+        m_router.unsubscribe( a_type, a_subscriber ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.event.EventRouter#publish(java.util.EventObject)
+     */
+    public void publish( EventObject a_event )
+    {
+        m_router.publish( a_event ) ;
+    }
+
+    
+    // ------------------------------------------------------------------------
+    // Avalon Life Cycle Methods
+    // ------------------------------------------------------------------------
+
+    
+    /*
+     *  (non-Javadoc)
+     * @see org.apache.avalon.framework.activity.Initializable#initialize()
+     */
+    public void initialize()
+    {
+        m_router = new DefaultEventRouter() ;
+        m_router.setMonitor( new Monitor() ) ;
+    }
+    
+    
+    // ------------------------------------------------------------------------
+    // Avalon specific EventRouterMonitor
+    // ------------------------------------------------------------------------
+
+    
+    /**
+     * EventRouterMonitor that uses this module's logger.
+     *
+     * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+     * @author $Author$
+     * @version $Revision$
+     */
+    class Monitor implements EventRouterMonitor
+    {
+        /* (non-Javadoc)
+         * @see org.apache.eve.event.EventRouterMonitor#eventPublished(
+         * java.util.EventObject)
+         */
+        public void eventPublished( EventObject a_event )
+        {
+            getLogger().debug( "published event: " + a_event ) ;
+        }
+
+    
+        /* (non-Javadoc)
+         * @see org.apache.eve.event.EventRouterMonitor#addedSubscription(
+         * org.apache.eve.event.Subscription)
+         */
+        public void addedSubscription( Subscription a_subscription )
+        {
+            getLogger().debug( "added subscription: " + a_subscription ) ;
+        }
+
+    
+        /* (non-Javadoc)
+         * @see org.apache.eve.event.EventRouterMonitor#removedSubscription(
+         * org.apache.eve.event.Subscription)
+         */
+        public void removedSubscription( Subscription a_subscription )
+        {
+            getLogger().debug( "removed subscription: " + a_subscription ) ;
+        }
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java	Tue Dec 16 17:21:15 2003
@@ -1,100 +1,100 @@
-/*
-
- ============================================================================
-                   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.event ;
-
-
-import java.util.EventObject ;
-
-
-/**
- * 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:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface EventRouter
-{
-    /** Avalon compliant service interface role */
-    String ROLE = EventRouter.class.getName() ;
-    
-    /**
-     * 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
-     */
-    void subscribe( Class a_type, Filter a_filter, 
-                    Subscriber a_subscriber ) ;
-    
-    /**
-     * Unsubscribes an event subscriber.
-     * 
-     * @param a_subscriber the Subscriber to unsubscribe
-     */
-    void unsubscribe( Subscriber a_subscriber ) ;
-    
-    /**
-     * Unsubscribes an event subscriber.
-     * 
-     * @param a_subscriber the Subscriber to unsubscribe
-     */
-    void unsubscribe( Class a_type, Subscriber a_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
-     */
-    void publish( EventObject a_event ) ;
-}
+/*
+
+ ============================================================================
+                   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.event ;
+
+
+import java.util.EventObject ;
+
+
+/**
+ * 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:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface EventRouter
+{
+    /** Avalon compliant service interface role */
+    String ROLE = EventRouter.class.getName() ;
+    
+    /**
+     * 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
+     */
+    void subscribe( Class a_type, Filter a_filter, 
+                    Subscriber a_subscriber ) ;
+    
+    /**
+     * Unsubscribes an event subscriber.
+     * 
+     * @param a_subscriber the Subscriber to unsubscribe
+     */
+    void unsubscribe( Subscriber a_subscriber ) ;
+    
+    /**
+     * Unsubscribes an event subscriber.
+     * 
+     * @param a_subscriber the Subscriber to unsubscribe
+     */
+    void unsubscribe( Class a_type, Subscriber a_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
+     */
+    void publish( EventObject a_event ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java	Tue Dec 16 17:21:15 2003
@@ -1,85 +1,85 @@
-/*
-
- ============================================================================
-                   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.event ;
-
-
-import java.util.EventObject ;
-
-
-/**
- * Monitors the activities of the event router.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface EventRouterMonitor
-{
-    /**
-     * Monitors events that are published.
-     * 
-     * @param a_event the published event object 
-     */
-    void eventPublished( EventObject a_event ) ;
-    
-    /**
-     * Monitores the addition of new subscriptions.
-     * 
-     * @param a_subscription
-     */
-    void addedSubscription( Subscription a_subscription ) ;
-    
-    /**
-     * Monitors the removal of new subscriptions
-     * 
-     * @param a_subscription
-     */
-    void removedSubscription( Subscription a_subscription ) ;
-}
+/*
+
+ ============================================================================
+                   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.event ;
+
+
+import java.util.EventObject ;
+
+
+/**
+ * Monitors the activities of the event router.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface EventRouterMonitor
+{
+    /**
+     * Monitors events that are published.
+     * 
+     * @param a_event the published event object 
+     */
+    void eventPublished( EventObject a_event ) ;
+    
+    /**
+     * Monitores the addition of new subscriptions.
+     * 
+     * @param a_subscription
+     */
+    void addedSubscription( Subscription a_subscription ) ;
+    
+    /**
+     * Monitors the removal of new subscriptions
+     * 
+     * @param a_subscription
+     */
+    void removedSubscription( Subscription a_subscription ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java	Tue Dec 16 17:21:15 2003
@@ -1,85 +1,85 @@
-/*
-
- ============================================================================
-                   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.event ;
-
-
-import java.util.EventObject ;
-
-
-/**
- * Does nothing and created by the default constructor.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class EventRouterMonitorAdapter implements EventRouterMonitor
-{
-    /* (non-Javadoc)
-     * @see org.apache.eve.event.EventRouterMonitor#eventPublished(java.util.EventObject)
-     */
-    public void eventPublished(EventObject a_a_event)
-    {
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.event.EventRouterMonitor#addedSubscription(org.apache.eve.event.Subscription)
-     */
-    public void addedSubscription(Subscription a_a_subscription)
-    {
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.event.EventRouterMonitor#removedSubscription(org.apache.eve.event.Subscription)
-     */
-    public void removedSubscription(Subscription a_a_subscription)
-    {
-    }
-}
+/*
+
+ ============================================================================
+                   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.event ;
+
+
+import java.util.EventObject ;
+
+
+/**
+ * Does nothing and created by the default constructor.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class EventRouterMonitorAdapter implements EventRouterMonitor
+{
+    /* (non-Javadoc)
+     * @see org.apache.eve.event.EventRouterMonitor#eventPublished(java.util.EventObject)
+     */
+    public void eventPublished(EventObject a_a_event)
+    {
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.event.EventRouterMonitor#addedSubscription(org.apache.eve.event.Subscription)
+     */
+    public void addedSubscription(Subscription a_a_subscription)
+    {
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.event.EventRouterMonitor#removedSubscription(org.apache.eve.event.Subscription)
+     */
+    public void removedSubscription(Subscription a_a_subscription)
+    {
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java	Tue Dec 16 17:21:15 2003
@@ -1,73 +1,73 @@
-/*
-
- ============================================================================
-                   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.event ;
-
-
-import java.util.EventObject ;
-
-
-/**
- * A filter in the event router is used to further prune the subscriber's 
- * interest list.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface Filter
-{
-    /**
-     * Determines whether or not to inform a subscriber of an event.
-     * 
-     * @param a_event the event to test 
-     * @return true if the event can be sent, false if it cannot
-     */
-    boolean apply( EventObject a_event ) ;
-}
+/*
+
+ ============================================================================
+                   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.event ;
+
+
+import java.util.EventObject ;
+
+
+/**
+ * A filter in the event router is used to further prune the subscriber's 
+ * interest list.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface Filter
+{
+    /**
+     * Determines whether or not to inform a subscriber of an event.
+     * 
+     * @param a_event the event to test 
+     * @return true if the event can be sent, false if it cannot
+     */
+    boolean apply( EventObject a_event ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java	Tue Dec 16 17:21:15 2003
@@ -1,186 +1,186 @@
-/*
-
- ============================================================================
-                   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.event ;
-
-
-/**
- * A subscription bean.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class Subscription
-{
-    /** the filter if any used to filter out events */
-    private final Filter m_filter ; 
-    /** the event class */
-    private final Class m_type ; 
-    /** the subscriber */
-    private final Subscriber m_subscriber ; 
-
-    
-    /**
-     * 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
-     */
-    public Subscription( Class a_type, Filter a_filter, 
-                         Subscriber a_subscriber ) 
-    { 
-        m_type = a_type ;
-        m_filter = a_filter ;
-        m_subscriber = a_subscriber ;
-    }
-    
-    
-    /**
-     * Get the event class/type
-     *
-     * @return the event class/type
-     */
-    public Class getType() 
-    {
-        return m_type ;
-    }
-    
-
-    /**
-     * Get the filter used with this subscription.
-     *
-     * @return  The filter
-     */
-    public Filter getFilter() 
-    {
-        return m_filter ;
-    }
-
-    
-    /**
-     * Get the subscriber.
-     *
-     * @return the subscriber
-     */
-    public Subscriber getSubscriber() 
-    {
-        return m_subscriber ;
-    }
-
-    
-    /**
-     * Compare two Subscriptions to each other.
-     *
-     * @param a_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 ) 
-    {
-        if ( this == a_obj ) 
-        {
-            return true ;
-        }
-        
-        if ( ! ( a_obj instanceof Subscription ) ) 
-        { 
-            return false ;
-        }
-
-        final Subscription l_subscription = ( Subscription ) a_obj ;
-
-        if ( ! m_type.equals( l_subscription.getType() ) )
-        {    
-            return false ;
-        }
-        
-        if ( m_filter != null )
-        {
-            if ( l_subscription.getFilter() == null )
-            {
-                return false ;
-            }
-            
-            if ( ! m_filter.equals( l_subscription.getFilter() ) )
-            {    
-                return false ;
-            }
-        }
-        
-        if ( ! m_subscriber.equals( l_subscription.getSubscriber() ) ) 
-        {
-            return false ;
-        }
-
-        return true ;
-    }
-    
-
-    /**
-     * Get the hashcode (used in HashMaps).
-     *
-     * hashCode = 37 * (37 * (629 + event.hashCode()) + filter.hashCode())
-     *            + subscriber.hashCode()
-     * 
-     * This method was borrowed from Berin Loritsch.
-     * 
-     * @return the hashCode value
-     */
-    public int hashCode() 
-    {
-        int l_result = 17 ;
-        l_result = 37 * l_result + m_type.hashCode() ;
-        l_result = 37 * l_result + 
-            ( m_filter != null ? m_filter.hashCode() : 0 ) ;
-        l_result = 37 * l_result + m_subscriber.hashCode() ;
-        return l_result ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.event ;
+
+
+/**
+ * A subscription bean.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class Subscription
+{
+    /** the filter if any used to filter out events */
+    private final Filter m_filter ; 
+    /** the event class */
+    private final Class m_type ; 
+    /** the subscriber */
+    private final Subscriber m_subscriber ; 
+
+    
+    /**
+     * 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
+     */
+    public Subscription( Class a_type, Filter a_filter, 
+                         Subscriber a_subscriber ) 
+    { 
+        m_type = a_type ;
+        m_filter = a_filter ;
+        m_subscriber = a_subscriber ;
+    }
+    
+    
+    /**
+     * Get the event class/type
+     *
+     * @return the event class/type
+     */
+    public Class getType() 
+    {
+        return m_type ;
+    }
+    
+
+    /**
+     * Get the filter used with this subscription.
+     *
+     * @return  The filter
+     */
+    public Filter getFilter() 
+    {
+        return m_filter ;
+    }
+
+    
+    /**
+     * Get the subscriber.
+     *
+     * @return the subscriber
+     */
+    public Subscriber getSubscriber() 
+    {
+        return m_subscriber ;
+    }
+
+    
+    /**
+     * Compare two Subscriptions to each other.
+     *
+     * @param a_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 ) 
+    {
+        if ( this == a_obj ) 
+        {
+            return true ;
+        }
+        
+        if ( ! ( a_obj instanceof Subscription ) ) 
+        { 
+            return false ;
+        }
+
+        final Subscription l_subscription = ( Subscription ) a_obj ;
+
+        if ( ! m_type.equals( l_subscription.getType() ) )
+        {    
+            return false ;
+        }
+        
+        if ( m_filter != null )
+        {
+            if ( l_subscription.getFilter() == null )
+            {
+                return false ;
+            }
+            
+            if ( ! m_filter.equals( l_subscription.getFilter() ) )
+            {    
+                return false ;
+            }
+        }
+        
+        if ( ! m_subscriber.equals( l_subscription.getSubscriber() ) ) 
+        {
+            return false ;
+        }
+
+        return true ;
+    }
+    
+
+    /**
+     * Get the hashcode (used in HashMaps).
+     *
+     * hashCode = 37 * (37 * (629 + event.hashCode()) + filter.hashCode())
+     *            + subscriber.hashCode()
+     * 
+     * This method was borrowed from Berin Loritsch.
+     * 
+     * @return the hashCode value
+     */
+    public int hashCode() 
+    {
+        int l_result = 17 ;
+        l_result = 37 * l_result + m_type.hashCode() ;
+        l_result = 37 * l_result + 
+            ( m_filter != null ? m_filter.hashCode() : 0 ) ;
+        l_result = 37 * l_result + m_subscriber.hashCode() ;
+        return l_result ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java	Tue Dec 16 17:21:15 2003
@@ -1,76 +1,76 @@
-/*
-
- ============================================================================
-                   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.input ;
-
-
-import org.apache.avalon.framework.logger.LogEnabled ;
-import org.apache.avalon.framework.logger.Logger;
-
-
-/**
- * A monitor that uses Avolon logging life-cycle an loggers to report events
- * in the InputManager.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class AvalonInputManagerMonitor extends InputManagerMonitorAdapter
-    implements LogEnabled
-{
-    /** the logger used to log messages */
-    private Logger m_log ;
-    
-    
-    public void enableLogging( Logger a_logger )
-    {
-        m_log = a_logger ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.input ;
+
+
+import org.apache.avalon.framework.logger.LogEnabled ;
+import org.apache.avalon.framework.logger.Logger;
+
+
+/**
+ * A monitor that uses Avolon logging life-cycle an loggers to report events
+ * in the InputManager.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class AvalonInputManagerMonitor extends InputManagerMonitorAdapter
+    implements LogEnabled
+{
+    /** the logger used to log messages */
+    private Logger m_log ;
+    
+    
+    public void enableLogging( Logger a_logger )
+    {
+        m_log = a_logger ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/DefaultInputManager.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/DefaultInputManager.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/DefaultInputManager.java	Tue Dec 16 17:21:15 2003
@@ -1,400 +1,400 @@
-/*
-
- ============================================================================
-                   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.input ;
-
-
-import java.util.Iterator ;
-import java.util.EventObject ;
-
-import java.io.IOException ;
-import java.nio.ByteBuffer ;
-import java.nio.channels.Selector ;
-import java.nio.channels.SelectionKey ;
-import java.nio.channels.SocketChannel ;
-
-import org.apache.eve.event.InputEvent ;
-import org.apache.eve.ResourceException ;
-import org.apache.eve.buffer.BufferPool ;
-import org.apache.eve.event.EventRouter ;
-import org.apache.eve.listener.ClientKey ;
-import org.apache.eve.event.ConnectEvent ;
-import org.apache.eve.event.DisconnectEvent ;
-import org.apache.eve.listener.KeyExpiryException ;
-
-
-/**
- * Default InputManager implementation based on NIO selectors and channels.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class DefaultInputManager implements InputManager
-{
-    /** the thread driving this Runnable */ 
-    private Thread m_thread = null ;
-    /** parameter used to politely stop running thread */
-    private Boolean m_hasStarted = null ;
-    /** the buffer pool we get direct buffers from */
-    private BufferPool m_bp = null ;
-    /** event router used to decouple source to sink relationships */
-    private EventRouter m_router = null ;
-    /** selector used to select a ready socket channel */
-    private Selector m_selector = null ;
-    /** the input manager's monitor */
-    private InputManagerMonitor m_monitor = new InputManagerMonitorAdapter() ;
-
-    
-    // ------------------------------------------------------------------------
-    // C O N S T R U C T O R S
-    // ------------------------------------------------------------------------
-    
-    
-    /**
-     * Creates a default InputManager implementation
-     *  
-     * @param a_router an event router service
-     * @param a_bp a buffer pool service
-     */
-    public DefaultInputManager( EventRouter a_router, BufferPool a_bp )
-        throws IOException
-    {
-        m_bp = a_bp ;
-        m_router = a_router ;
-        m_hasStarted = new Boolean( false ) ;
-        m_selector = Selector.open() ;
-    }
-    
-
-        // ------------------------------------------------------------------------
-        // start, stop and runnable code
-        // ------------------------------------------------------------------------
-    
-    
-    /**
-     * Runnable used to drive the selection loop. 
-     *
-     * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
-     * @author $Author$
-     * @version $Revision$
-     */
-    class SelectionDriver implements Runnable
-    {
-        public void run()
-        {
-            while ( m_hasStarted.booleanValue() ) 
-            {
-                int l_count = 0 ;
-                
-                /*
-                 * check if we have input waiting and continue if there is
-                 * nothing to read from any of the registered channels  
-                 */
-                try
-                {
-                    if ( 0 == ( l_count = m_selector.select( 100 ) ) )
-                    {
-                        m_monitor.selectorReturned( m_selector ) ;
-                        continue ;
-                    }
-                } 
-                catch( IOException e )
-                {
-                    m_monitor.selectFailure( m_selector, e ) ;
-                    continue ;
-                }
-                
-                processInput() ;
-            }
-        }
-    }
-
-
-    /**
-     * Starts up this module.
-     */
-    public void start() 
-    {
-        synchronized( m_hasStarted )
-        {
-            if ( m_hasStarted.booleanValue() )
-            {
-                throw new IllegalStateException( "Already started!" ) ;
-            }
-            
-            m_hasStarted = new Boolean( true ) ;
-            m_thread = new Thread( new SelectionDriver() ) ;
-            m_thread.start() ;
-        }
-    }
-    
-    
-    /**
-     * Blocks calling thread until this module gracefully stops.
-     */
-    public void stop() throws InterruptedException
-    {
-        synchronized( m_hasStarted )
-        {
-            m_hasStarted = new Boolean( false ) ;
-            
-            while ( m_thread.isAlive() )
-            {
-                Thread.sleep( 100 ) ;
-            }
-        }
-    }
-    
-    
-    // ------------------------------------------------------------------------
-    // subscriber methods
-    // ------------------------------------------------------------------------
-    
-    
-    /**
-     * @see org.apache.eve.event.ConnectListener#
-     * connectPerformed(org.apache.eve.event.ConnectEvent)
-     */
-    public void inform( ConnectEvent an_event )
-    {
-        ClientKey l_key = null ;
-        SocketChannel l_channel = null ;
-        
-        try
-        {
-            l_key = an_event.getClientKey() ;
-            l_channel = l_key.getSocket().getChannel() ;
-            
-            // hands-off blocking sockets!
-            if ( null == l_channel )
-            {
-                return ;
-            }
-            
-            l_channel.configureBlocking( false ) ;
-            l_channel.register( m_selector, SelectionKey.OP_READ, l_key ) ;
-            m_monitor.registeredChannel( l_key, m_selector ) ;
-        }
-        catch ( KeyExpiryException e )
-        {
-            String l_msg = "Attempting session creation using expired key for "
-                + an_event.getClientKey() ;
-            m_monitor.keyExpiryFailure( l_key, e ) ;
-        }
-        catch ( IOException e )
-        {
-            String l_msg = "Input managmer registration failure for " +
-                an_event.getClientKey() + " due to exception." ;
-            m_monitor.channelRegistrationFailure( m_selector, l_channel, 
-                    SelectionKey.OP_READ, e ) ;
-        }
-    }
-
-    
-    /**
-     * @see org.apache.eve.event.DisconnectListener#
-     * inform(org.apache.eve.event.DisconnectEvent)
-     */
-    public void inform( DisconnectEvent an_event )
-    {
-        SelectionKey l_key = null ;
-        Iterator l_keys = m_selector.keys().iterator() ;
-        
-        while ( l_keys.hasNext() )
-        {
-            l_key = ( SelectionKey ) l_keys.next() ;
-            if ( l_key.attachment().equals( an_event.getClientKey() ) )
-            {
-                break ;
-            }
-        }
-
-        if ( null == l_key )
-        {
-            return ;
-        }
-        
-        try
-        {
-            l_key.channel().close() ;
-        }
-        catch ( IOException e )
-        {
-            m_monitor.channelCloseFailure( 
-                    ( SocketChannel ) l_key.channel(), e ) ;
-        }
-        
-        l_key.cancel() ;
-        m_monitor.disconnectedClient( an_event.getClientKey() ) ;
-    }
-    
-
-    /**
-     * @see org.apache.eve.event.Subscriber#inform(java.util.EventObject)
-     */
-    public void inform( EventObject an_event )
-    {
-        Class l_clazz = an_event.getClass() ;
-        
-        if ( l_clazz.isAssignableFrom( ConnectEvent.class ) )
-        {
-            inform( ( ConnectEvent ) an_event ) ;
-        }
-        else if ( l_clazz.isAssignableFrom( DisconnectEvent.class ) ) ;
-        {
-            inform( ( DisconnectEvent ) an_event ) ;
-        }
-    }
-    
-    
-    // ------------------------------------------------------------------------
-    // private utilities
-    // ------------------------------------------------------------------------
-    
-    
-    /**
-     * Processes input on channels of the read ready selected keys.
-     */
-    void processInput()
-    {
-        /*
-         * Process the selectors that are ready.  For each selector that
-         * is ready we read some data into a buffer we claim from a buffer
-         * pool.  Next we create an InputEvent using the buffer and publish
-         * it using the event notifier/router.
-         */
-        Iterator l_list = m_selector.selectedKeys().iterator() ;
-        while ( l_list.hasNext() )
-        {
-            SelectionKey l_key = ( SelectionKey ) l_list.next() ;
-            ClientKey l_client = ( ClientKey ) l_key.attachment() ; 
-                
-            if ( l_key.isReadable() )
-            {
-                ByteBuffer l_buf = null ;
-                SocketChannel l_channel = ( SocketChannel ) l_key.channel() ;
-
-                // claim a buffer and read & return buffer on errors 
-                try
-                {
-                    l_buf = m_bp.getBuffer( this ) ;
-                    l_channel.read( l_buf ) ;
-                }
-                catch ( ResourceException e )
-                {
-                    m_monitor.bufferUnavailable( m_bp, e ) ;
-                    continue ;
-                }
-                catch ( IOException e )
-                {
-                    m_monitor.readFailed( l_client, e ) ;
-                    m_bp.releaseClaim( l_buf, this ) ;
-                    continue ;
-                }
-                    
-                // report to monitor, create the event, and publish it
-                m_monitor.inputRecieved( l_client ) ;
-                InputEvent l_event = new ConcreteInputEvent( l_client, l_buf ) ;
-                m_router.publish( l_event ) ;
-                m_bp.releaseClaim( l_buf, this ) ;
-            }
-        }
-    }
-    
-    
-    /**
-     * A concrete InputEvent that uses the buffer pool to properly implement
-     * the interest claim and release methods.
-     *
-     * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
-     * @author $Author$
-     * @version $Revision$
-     */
-    class ConcreteInputEvent extends InputEvent
-    {
-        ConcreteInputEvent( ClientKey a_key, ByteBuffer a_buffer )
-        {
-            super( a_key, a_buffer ) ;
-        }
-        
-        public ByteBuffer claimInterest( Object a_party )
-        {
-            m_bp.claimInterest( m_buffer, a_party ) ;
-            return m_buffer.asReadOnlyBuffer() ;
-        }
-        
-        public void releaseInterest( Object a_party )
-        {
-            m_bp.releaseClaim( m_buffer, a_party ) ;
-        }
-    }
-    
-    
-    /**
-     * Gets the monitor associated with this InputManager.
-     * 
-     * @return returns the monitor
-     */
-    public InputManagerMonitor getMonitor()
-    {
-        return m_monitor ;
-    }
-
-    
-    /**
-     * Sets the monitor associated with this InputManager.
-     * 
-     * @param a_monitor the monitor to set
-     */
-    public void setMonitor( InputManagerMonitor a_monitor )
-    {
-        m_monitor = a_monitor ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.input ;
+
+
+import java.util.Iterator ;
+import java.util.EventObject ;
+
+import java.io.IOException ;
+import java.nio.ByteBuffer ;
+import java.nio.channels.Selector ;
+import java.nio.channels.SelectionKey ;
+import java.nio.channels.SocketChannel ;
+
+import org.apache.eve.event.InputEvent ;
+import org.apache.eve.ResourceException ;
+import org.apache.eve.buffer.BufferPool ;
+import org.apache.eve.event.EventRouter ;
+import org.apache.eve.listener.ClientKey ;
+import org.apache.eve.event.ConnectEvent ;
+import org.apache.eve.event.DisconnectEvent ;
+import org.apache.eve.listener.KeyExpiryException ;
+
+
+/**
+ * Default InputManager implementation based on NIO selectors and channels.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class DefaultInputManager implements InputManager
+{
+    /** the thread driving this Runnable */ 
+    private Thread m_thread = null ;
+    /** parameter used to politely stop running thread */
+    private Boolean m_hasStarted = null ;
+    /** the buffer pool we get direct buffers from */
+    private BufferPool m_bp = null ;
+    /** event router used to decouple source to sink relationships */
+    private EventRouter m_router = null ;
+    /** selector used to select a ready socket channel */
+    private Selector m_selector = null ;
+    /** the input manager's monitor */
+    private InputManagerMonitor m_monitor = new InputManagerMonitorAdapter() ;
+
+    
+    // ------------------------------------------------------------------------
+    // C O N S T R U C T O R S
+    // ------------------------------------------------------------------------
+    
+    
+    /**
+     * Creates a default InputManager implementation
+     *  
+     * @param a_router an event router service
+     * @param a_bp a buffer pool service
+     */
+    public DefaultInputManager( EventRouter a_router, BufferPool a_bp )
+        throws IOException
+    {
+        m_bp = a_bp ;
+        m_router = a_router ;
+        m_hasStarted = new Boolean( false ) ;
+        m_selector = Selector.open() ;
+    }
+    
+
+        // ------------------------------------------------------------------------
+        // start, stop and runnable code
+        // ------------------------------------------------------------------------
+    
+    
+    /**
+     * Runnable used to drive the selection loop. 
+     *
+     * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+     * @author $Author$
+     * @version $Revision$
+     */
+    class SelectionDriver implements Runnable
+    {
+        public void run()
+        {
+            while ( m_hasStarted.booleanValue() ) 
+            {
+                int l_count = 0 ;
+                
+                /*
+                 * check if we have input waiting and continue if there is
+                 * nothing to read from any of the registered channels  
+                 */
+                try
+                {
+                    if ( 0 == ( l_count = m_selector.select( 100 ) ) )
+                    {
+                        m_monitor.selectorReturned( m_selector ) ;
+                        continue ;
+                    }
+                } 
+                catch( IOException e )
+                {
+                    m_monitor.selectFailure( m_selector, e ) ;
+                    continue ;
+                }
+                
+                processInput() ;
+            }
+        }
+    }
+
+
+    /**
+     * Starts up this module.
+     */
+    public void start() 
+    {
+        synchronized( m_hasStarted )
+        {
+            if ( m_hasStarted.booleanValue() )
+            {
+                throw new IllegalStateException( "Already started!" ) ;
+            }
+            
+            m_hasStarted = new Boolean( true ) ;
+            m_thread = new Thread( new SelectionDriver() ) ;
+            m_thread.start() ;
+        }
+    }
+    
+    
+    /**
+     * Blocks calling thread until this module gracefully stops.
+     */
+    public void stop() throws InterruptedException
+    {
+        synchronized( m_hasStarted )
+        {
+            m_hasStarted = new Boolean( false ) ;
+            
+            while ( m_thread.isAlive() )
+            {
+                Thread.sleep( 100 ) ;
+            }
+        }
+    }
+    
+    
+    // ------------------------------------------------------------------------
+    // subscriber methods
+    // ------------------------------------------------------------------------
+    
+    
+    /**
+     * @see org.apache.eve.event.ConnectListener#
+     * connectPerformed(org.apache.eve.event.ConnectEvent)
+     */
+    public void inform( ConnectEvent an_event )
+    {
+        ClientKey l_key = null ;
+        SocketChannel l_channel = null ;
+        
+        try
+        {
+            l_key = an_event.getClientKey() ;
+            l_channel = l_key.getSocket().getChannel() ;
+            
+            // hands-off blocking sockets!
+            if ( null == l_channel )
+            {
+                return ;
+            }
+            
+            l_channel.configureBlocking( false ) ;
+            l_channel.register( m_selector, SelectionKey.OP_READ, l_key ) ;
+            m_monitor.registeredChannel( l_key, m_selector ) ;
+        }
+        catch ( KeyExpiryException e )
+        {
+            String l_msg = "Attempting session creation using expired key for "
+                + an_event.getClientKey() ;
+            m_monitor.keyExpiryFailure( l_key, e ) ;
+        }
+        catch ( IOException e )
+        {
+            String l_msg = "Input managmer registration failure for " +
+                an_event.getClientKey() + " due to exception." ;
+            m_monitor.channelRegistrationFailure( m_selector, l_channel, 
+                    SelectionKey.OP_READ, e ) ;
+        }
+    }
+
+    
+    /**
+     * @see org.apache.eve.event.DisconnectListener#
+     * inform(org.apache.eve.event.DisconnectEvent)
+     */
+    public void inform( DisconnectEvent an_event )
+    {
+        SelectionKey l_key = null ;
+        Iterator l_keys = m_selector.keys().iterator() ;
+        
+        while ( l_keys.hasNext() )
+        {
+            l_key = ( SelectionKey ) l_keys.next() ;
+            if ( l_key.attachment().equals( an_event.getClientKey() ) )
+            {
+                break ;
+            }
+        }
+
+        if ( null == l_key )
+        {
+            return ;
+        }
+        
+        try
+        {
+            l_key.channel().close() ;
+        }
+        catch ( IOException e )
+        {
+            m_monitor.channelCloseFailure( 
+                    ( SocketChannel ) l_key.channel(), e ) ;
+        }
+        
+        l_key.cancel() ;
+        m_monitor.disconnectedClient( an_event.getClientKey() ) ;
+    }
+    
+
+    /**
+     * @see org.apache.eve.event.Subscriber#inform(java.util.EventObject)
+     */
+    public void inform( EventObject an_event )
+    {
+        Class l_clazz = an_event.getClass() ;
+        
+        if ( l_clazz.isAssignableFrom( ConnectEvent.class ) )
+        {
+            inform( ( ConnectEvent ) an_event ) ;
+        }
+        else if ( l_clazz.isAssignableFrom( DisconnectEvent.class ) ) ;
+        {
+            inform( ( DisconnectEvent ) an_event ) ;
+        }
+    }
+    
+    
+    // ------------------------------------------------------------------------
+    // private utilities
+    // ------------------------------------------------------------------------
+    
+    
+    /**
+     * Processes input on channels of the read ready selected keys.
+     */
+    void processInput()
+    {
+        /*
+         * Process the selectors that are ready.  For each selector that
+         * is ready we read some data into a buffer we claim from a buffer
+         * pool.  Next we create an InputEvent using the buffer and publish
+         * it using the event notifier/router.
+         */
+        Iterator l_list = m_selector.selectedKeys().iterator() ;
+        while ( l_list.hasNext() )
+        {
+            SelectionKey l_key = ( SelectionKey ) l_list.next() ;
+            ClientKey l_client = ( ClientKey ) l_key.attachment() ; 
+                
+            if ( l_key.isReadable() )
+            {
+                ByteBuffer l_buf = null ;
+                SocketChannel l_channel = ( SocketChannel ) l_key.channel() ;
+
+                // claim a buffer and read & return buffer on errors 
+                try
+                {
+                    l_buf = m_bp.getBuffer( this ) ;
+                    l_channel.read( l_buf ) ;
+                }
+                catch ( ResourceException e )
+                {
+                    m_monitor.bufferUnavailable( m_bp, e ) ;
+                    continue ;
+                }
+                catch ( IOException e )
+                {
+                    m_monitor.readFailed( l_client, e ) ;
+                    m_bp.releaseClaim( l_buf, this ) ;
+                    continue ;
+                }
+                    
+                // report to monitor, create the event, and publish it
+                m_monitor.inputRecieved( l_client ) ;
+                InputEvent l_event = new ConcreteInputEvent( l_client, l_buf ) ;
+                m_router.publish( l_event ) ;
+                m_bp.releaseClaim( l_buf, this ) ;
+            }
+        }
+    }
+    
+    
+    /**
+     * A concrete InputEvent that uses the buffer pool to properly implement
+     * the interest claim and release methods.
+     *
+     * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+     * @author $Author$
+     * @version $Revision$
+     */
+    class ConcreteInputEvent extends InputEvent
+    {
+        ConcreteInputEvent( ClientKey a_key, ByteBuffer a_buffer )
+        {
+            super( a_key, a_buffer ) ;
+        }
+        
+        public ByteBuffer claimInterest( Object a_party )
+        {
+            m_bp.claimInterest( m_buffer, a_party ) ;
+            return m_buffer.asReadOnlyBuffer() ;
+        }
+        
+        public void releaseInterest( Object a_party )
+        {
+            m_bp.releaseClaim( m_buffer, a_party ) ;
+        }
+    }
+    
+    
+    /**
+     * Gets the monitor associated with this InputManager.
+     * 
+     * @return returns the monitor
+     */
+    public InputManagerMonitor getMonitor()
+    {
+        return m_monitor ;
+    }
+
+    
+    /**
+     * Sets the monitor associated with this InputManager.
+     * 
+     * @param a_monitor the monitor to set
+     */
+    public void setMonitor( InputManagerMonitor a_monitor )
+    {
+        m_monitor = a_monitor ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/MerlinInputManager.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/MerlinInputManager.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/MerlinInputManager.java	Tue Dec 16 17:21:15 2003
@@ -1,179 +1,179 @@
-/*
-
- ============================================================================
-                   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.input ;
-
-
-import java.util.EventObject ;
-
-import java.nio.channels.Selector ;
-
-import org.apache.avalon.framework.activity.Startable ;
-import org.apache.avalon.framework.service.Serviceable ;
-import org.apache.avalon.framework.activity.Initializable ;
-import org.apache.avalon.framework.service.ServiceManager ;
-import org.apache.avalon.framework.service.ServiceException ;
-import org.apache.avalon.framework.logger.AbstractLogEnabled ;
-
-import org.apache.eve.buffer.BufferPool ;
-import org.apache.eve.event.EventRouter ;
-import org.apache.eve.event.ConnectEvent ;
-import org.apache.eve.event.DisconnectEvent ;
-
-
-/**
- * A non-blocking input manager.
- * 
- * @avalon.component name="input-manager" lifestyle="singleton"
- * @avalon.service type="org.apache.eve.input.InputManager" version="1.0"
- * 
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class MerlinInputManager extends AbstractLogEnabled 
-    implements
-    InputManager,
-    Serviceable,
-    Startable,
-    Initializable
-{
-    /** the buffer pool to get buffers from */
-    private BufferPool m_bp = null ;
-    /** event router used to decouple source to sink relationships */
-    private EventRouter m_router = null ;
-    /** selector used to select a ready socket channel */
-    private Selector m_selector = null ;
-    /** the wrapped input manager implementation */
-    private DefaultInputManager m_inputManager = null ;
-    
-    
-    // ------------------------------------------------------------------------
-    // Listener Interfaces
-    // ------------------------------------------------------------------------
-    
-    
-    /**
-     * @see org.apache.eve.event.ConnectListener#
-     * connectPerformed(org.apache.eve.event.ConnectEvent)
-     */
-    public void inform( ConnectEvent an_event )
-    {
-    }
-
-    
-    /**
-     * @see org.apache.eve.event.DisconnectListener#
-     * inform(org.apache.eve.event.DisconnectEvent)
-     */
-    public void inform( DisconnectEvent an_event )
-    {
-    }
-    
-    
-    /**
-     * 
-     */
-    public void inform( EventObject an_event )
-    {
-    }
-    
-
-    // ------------------------------------------------------------------------
-    // Life Cycle Methods
-    // ------------------------------------------------------------------------
-    
-    
-    /**
-     * Starts up this module.
-     * 
-     * @see org.apache.avalon.framework.activity.Startable#start()
-     */
-    public void start() throws Exception
-    {
-        m_inputManager.start() ;
-    }
-    
-    
-    /**
-     * Blocks calling thread until this module gracefully stops.
-     * 
-     * @see org.apache.avalon.framework.activity.Startable#stop()
-     */
-    public void stop() throws Exception
-    {
-        m_inputManager.stop() ;
-    }
-    
-    
-    /**
-     * @see org.apache.avalon.framework.activity.Initializable#initialize()
-     */
-    public void initialize() throws Exception
-    {
-        m_inputManager = new DefaultInputManager( m_router, m_bp ) ;
-        
-    }
-
-    
-    /**
-     * @avalon.dependency type="org.apache.eve.event.EventRouter"
-     *         key="event-router" version="1.0" 
-     * @avalon.dependency type="org.apache.eve.buffer.BufferPool"
-     *         key="buffer-pool" version="1.0" 
-     * 
-     * @see org.apache.avalon.framework.service.Serviceable#service(
-     * org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service( ServiceManager a_manager ) throws ServiceException
-    {
-        m_bp = ( BufferPool ) a_manager.lookup( "buffer-pool" ) ;
-        m_router = ( EventRouter ) a_manager.lookup( "event-router" ) ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.input ;
+
+
+import java.util.EventObject ;
+
+import java.nio.channels.Selector ;
+
+import org.apache.avalon.framework.activity.Startable ;
+import org.apache.avalon.framework.service.Serviceable ;
+import org.apache.avalon.framework.activity.Initializable ;
+import org.apache.avalon.framework.service.ServiceManager ;
+import org.apache.avalon.framework.service.ServiceException ;
+import org.apache.avalon.framework.logger.AbstractLogEnabled ;
+
+import org.apache.eve.buffer.BufferPool ;
+import org.apache.eve.event.EventRouter ;
+import org.apache.eve.event.ConnectEvent ;
+import org.apache.eve.event.DisconnectEvent ;
+
+
+/**
+ * A non-blocking input manager.
+ * 
+ * @avalon.component name="input-manager" lifestyle="singleton"
+ * @avalon.service type="org.apache.eve.input.InputManager" version="1.0"
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class MerlinInputManager extends AbstractLogEnabled 
+    implements
+    InputManager,
+    Serviceable,
+    Startable,
+    Initializable
+{
+    /** the buffer pool to get buffers from */
+    private BufferPool m_bp = null ;
+    /** event router used to decouple source to sink relationships */
+    private EventRouter m_router = null ;
+    /** selector used to select a ready socket channel */
+    private Selector m_selector = null ;
+    /** the wrapped input manager implementation */
+    private DefaultInputManager m_inputManager = null ;
+    
+    
+    // ------------------------------------------------------------------------
+    // Listener Interfaces
+    // ------------------------------------------------------------------------
+    
+    
+    /**
+     * @see org.apache.eve.event.ConnectListener#
+     * connectPerformed(org.apache.eve.event.ConnectEvent)
+     */
+    public void inform( ConnectEvent an_event )
+    {
+    }
+
+    
+    /**
+     * @see org.apache.eve.event.DisconnectListener#
+     * inform(org.apache.eve.event.DisconnectEvent)
+     */
+    public void inform( DisconnectEvent an_event )
+    {
+    }
+    
+    
+    /**
+     * 
+     */
+    public void inform( EventObject an_event )
+    {
+    }
+    
+
+    // ------------------------------------------------------------------------
+    // Life Cycle Methods
+    // ------------------------------------------------------------------------
+    
+    
+    /**
+     * Starts up this module.
+     * 
+     * @see org.apache.avalon.framework.activity.Startable#start()
+     */
+    public void start() throws Exception
+    {
+        m_inputManager.start() ;
+    }
+    
+    
+    /**
+     * Blocks calling thread until this module gracefully stops.
+     * 
+     * @see org.apache.avalon.framework.activity.Startable#stop()
+     */
+    public void stop() throws Exception
+    {
+        m_inputManager.stop() ;
+    }
+    
+    
+    /**
+     * @see org.apache.avalon.framework.activity.Initializable#initialize()
+     */
+    public void initialize() throws Exception
+    {
+        m_inputManager = new DefaultInputManager( m_router, m_bp ) ;
+        
+    }
+
+    
+    /**
+     * @avalon.dependency type="org.apache.eve.event.EventRouter"
+     *         key="event-router" version="1.0" 
+     * @avalon.dependency type="org.apache.eve.buffer.BufferPool"
+     *         key="buffer-pool" version="1.0" 
+     * 
+     * @see org.apache.avalon.framework.service.Serviceable#service(
+     * org.apache.avalon.framework.service.ServiceManager)
+     */
+    public void service( ServiceManager a_manager ) throws ServiceException
+    {
+        m_bp = ( BufferPool ) a_manager.lookup( "buffer-pool" ) ;
+        m_router = ( EventRouter ) a_manager.lookup( "event-router" ) ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManager.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManager.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManager.java	Tue Dec 16 17:21:15 2003
@@ -1,66 +1,66 @@
-/*
-
- ============================================================================
-                   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.input ;
-
-
-import org.apache.eve.event.ConnectSubscriber ;
-import org.apache.eve.event.DisconnectSubscriber ;
-
-
-/**
- * Service interface for server modules that monitor incomming PDU requests on
- * a client's inputs.
- */
-public interface InputManager
-    extends ConnectSubscriber, DisconnectSubscriber
-{
-    /** Role played by this service as specified by Avalon */
-    public static final String ROLE = InputManager.class.getName() ;
-}
+/*
+
+ ============================================================================
+                   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.input ;
+
+
+import org.apache.eve.event.ConnectSubscriber ;
+import org.apache.eve.event.DisconnectSubscriber ;
+
+
+/**
+ * Service interface for server modules that monitor incomming PDU requests on
+ * a client's inputs.
+ */
+public interface InputManager
+    extends ConnectSubscriber, DisconnectSubscriber
+{
+    /** Role played by this service as specified by Avalon */
+    public static final String ROLE = InputManager.class.getName() ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java	Tue Dec 16 17:21:15 2003
@@ -1,160 +1,160 @@
-/*
-
- ============================================================================
-                   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.input ;
-
-
-import java.io.IOException ;
-import java.nio.channels.Selector ;
-import java.nio.channels.SocketChannel ;
-
-import org.apache.eve.ResourceException ;
-import org.apache.eve.buffer.BufferPool ;
-import org.apache.eve.listener.ClientKey ;
-import org.apache.eve.listener.KeyExpiryException ;
-
-
-/**
- * Monitors input activity managed by the the InputManager.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface InputManagerMonitor
-{
-    /**
-     * Monitors client disconnections.
-     * 
-     * @param a_key the key of the client that was disconnected
-     */
-    void disconnectedClient( ClientKey a_key ) ;
-    
-    /**
-     * Monitors channel registrations which occur on client sockets.
-     * 
-     * @param a_key the key of the client whose channel got registered
-     * @param a_selector the selector used to register the client's channel
-     */
-    void registeredChannel( ClientKey a_key, Selector a_selector ) ;
-    
-    /**
-     * Monitors returns from the selector denoting a timeout or a wakeup due to
-     * input availability.
-     *
-     * @param a_selector the selector that has returned
-     */
-    void selectorReturned( Selector a_selector ) ;
-    
-    /**
-     * Monitors input read from a client socket channel.
-     * 
-     * @param a_key the key of the client sending the request
-     */
-    void inputRecieved( ClientKey a_key ) ;
-
-    
-    // ------------------------------------------------------------------------
-    // failure monitoring methods
-    // ------------------------------------------------------------------------
-
-
-    /**
-     * Monitor method for handling selector select call failures.
-     * 
-     * @param a_selector the selector the select was called on
-     * @param a_fault the faulting exception
-     */
-    void selectFailure( Selector a_selector, IOException a_fault ) ;
-    
-    /**
-     * Monitors attempts to use client key's that have expired.
-     *  
-     * @param a_key the client key that expired
-     * @param a_fault the faulting exception
-     */
-    void keyExpiryFailure( ClientKey a_key, KeyExpiryException a_fault ) ;
-    
-    /**
-     * Monitors failed read attempts from client socket channel.
-     * 
-     * @param a_key the key of the client the read failed on
-     * @param a_fault the faulting exception
-     */
-    void readFailed( ClientKey a_key, IOException a_fault ) ;
-
-    /**
-     * Monitors failed attempts to acquire a buffer from the BufferPool.
-     * 
-     * @param a_bp the buffer pool a buffer was requested from
-     * @param a_fault the faulting exception
-     */
-    void bufferUnavailable( BufferPool a_bp, ResourceException a_fault ) ;
-    
-    /**
-     * Monitors failures to register channels with a selector.
-     * 
-     * @param a_selector the selector the register method was called on
-     * @param a_channel the channel that failed registeration
-     * @param a_selectionKey the selection key used to register
-     * @param a_fault the faulting exception
-     */
-    void channelRegistrationFailure( Selector a_selector, 
-                                     SocketChannel a_channel,
-                                     int a_selectionKey,
-                                     IOException a_fault ) ;
-    
-    /**
-     * Monitors failures to close a client's socket channel.
-     * 
-     * @param a_channel the channel that failed to close
-     * @param a_fault the faulting exception
-     */
-    void channelCloseFailure( SocketChannel a_channel, IOException a_fault ) ;
-}
+/*
+
+ ============================================================================
+                   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.input ;
+
+
+import java.io.IOException ;
+import java.nio.channels.Selector ;
+import java.nio.channels.SocketChannel ;
+
+import org.apache.eve.ResourceException ;
+import org.apache.eve.buffer.BufferPool ;
+import org.apache.eve.listener.ClientKey ;
+import org.apache.eve.listener.KeyExpiryException ;
+
+
+/**
+ * Monitors input activity managed by the the InputManager.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface InputManagerMonitor
+{
+    /**
+     * Monitors client disconnections.
+     * 
+     * @param a_key the key of the client that was disconnected
+     */
+    void disconnectedClient( ClientKey a_key ) ;
+    
+    /**
+     * Monitors channel registrations which occur on client sockets.
+     * 
+     * @param a_key the key of the client whose channel got registered
+     * @param a_selector the selector used to register the client's channel
+     */
+    void registeredChannel( ClientKey a_key, Selector a_selector ) ;
+    
+    /**
+     * Monitors returns from the selector denoting a timeout or a wakeup due to
+     * input availability.
+     *
+     * @param a_selector the selector that has returned
+     */
+    void selectorReturned( Selector a_selector ) ;
+    
+    /**
+     * Monitors input read from a client socket channel.
+     * 
+     * @param a_key the key of the client sending the request
+     */
+    void inputRecieved( ClientKey a_key ) ;
+
+    
+    // ------------------------------------------------------------------------
+    // failure monitoring methods
+    // ------------------------------------------------------------------------
+
+
+    /**
+     * Monitor method for handling selector select call failures.
+     * 
+     * @param a_selector the selector the select was called on
+     * @param a_fault the faulting exception
+     */
+    void selectFailure( Selector a_selector, IOException a_fault ) ;
+    
+    /**
+     * Monitors attempts to use client key's that have expired.
+     *  
+     * @param a_key the client key that expired
+     * @param a_fault the faulting exception
+     */
+    void keyExpiryFailure( ClientKey a_key, KeyExpiryException a_fault ) ;
+    
+    /**
+     * Monitors failed read attempts from client socket channel.
+     * 
+     * @param a_key the key of the client the read failed on
+     * @param a_fault the faulting exception
+     */
+    void readFailed( ClientKey a_key, IOException a_fault ) ;
+
+    /**
+     * Monitors failed attempts to acquire a buffer from the BufferPool.
+     * 
+     * @param a_bp the buffer pool a buffer was requested from
+     * @param a_fault the faulting exception
+     */
+    void bufferUnavailable( BufferPool a_bp, ResourceException a_fault ) ;
+    
+    /**
+     * Monitors failures to register channels with a selector.
+     * 
+     * @param a_selector the selector the register method was called on
+     * @param a_channel the channel that failed registeration
+     * @param a_selectionKey the selection key used to register
+     * @param a_fault the faulting exception
+     */
+    void channelRegistrationFailure( Selector a_selector, 
+                                     SocketChannel a_channel,
+                                     int a_selectionKey,
+                                     IOException a_fault ) ;
+    
+    /**
+     * Monitors failures to close a client's socket channel.
+     * 
+     * @param a_channel the channel that failed to close
+     * @param a_fault the faulting exception
+     */
+    void channelCloseFailure( SocketChannel a_channel, IOException a_fault ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java	Tue Dec 16 17:21:15 2003
@@ -1,166 +1,166 @@
-/*
-
- ============================================================================
-                   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.input ;
-
-
-import java.io.IOException ;
-import java.nio.channels.Selector ; 
-import java.nio.channels.SocketChannel ;
-
-import org.apache.eve.ResourceException ;
-import org.apache.eve.buffer.BufferPool ;
-import org.apache.eve.listener.ClientKey ;
-import org.apache.eve.listener.KeyExpiryException ;
-
-
-/**
- * An adaptor for the InputManagerMonitor interface.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class InputManagerMonitorAdapter implements InputManagerMonitor
-{
-    /* (non-Javadoc)
-     * @see org.apache.eve.input.InputManagerMonitor#
-     * disconnectedClient(org.apache.eve.listener.ClientKey)
-     */
-    public void disconnectedClient( ClientKey a_key )
-    {
-    }
-    
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.input.InputManagerMonitor#
-     * registeredChannel(org.apache.eve.listener.ClientKey, 
-     * java.nio.channels.Selector)
-     */
-    public void registeredChannel( ClientKey a_key, Selector a_selector )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.input.InputManagerMonitor#
-     * selectorReturned(java.nio.channels.Selector)
-     */
-    public void selectorReturned( Selector a_selector )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.input.InputManagerMonitor#
-     * inputRecieved(org.apache.eve.listener.ClientKey)
-     */
-    public void inputRecieved( ClientKey a_key )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.input.InputManagerMonitor#
-     * selectFailure(java.nio.channels.Selector, java.io.IOException)
-     */
-    public void selectFailure( Selector a_selector, IOException a_fault )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.input.InputManagerMonitor#keyExpiryFailure(
-     * org.apache.eve.listener.ClientKey, 
-     * org.apache.eve.listener.KeyExpiryException)
-     */
-    public void keyExpiryFailure( ClientKey a_key, KeyExpiryException a_fault )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.input.InputManagerMonitor#
-     * readFailed(org.apache.eve.listener.ClientKey, java.io.IOException)
-     */
-    public void readFailed( ClientKey a_key, IOException a_fault ) 
-    {
-    }
-    
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.input.InputManagerMonitor#
-     * bufferUnavailable(org.apache.eve.buffer.BufferPool, 
-     * org.apache.eve.ResourceException)
-     */
-    public void bufferUnavailable( BufferPool a_bp, ResourceException a_fault )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.input.InputManagerMonitor#
-     * channelRegistrationFailure(java.nio.channels.Selector, 
-     * java.nio.channels.SocketChannel, int, java.io.IOException)
-     */
-    public void channelRegistrationFailure( Selector a_selector,
-        SocketChannel a_channel, int a_key, IOException a_fault)
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.input.InputManagerMonitor#
-     * channelCloseFailure(java.nio.channels.SocketChannel, java.io.IOException)
-     */
-    public void channelCloseFailure( SocketChannel a_channel, 
-                                     IOException a_fault )
-    {
-    }
-}
+/*
+
+ ============================================================================
+                   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.input ;
+
+
+import java.io.IOException ;
+import java.nio.channels.Selector ; 
+import java.nio.channels.SocketChannel ;
+
+import org.apache.eve.ResourceException ;
+import org.apache.eve.buffer.BufferPool ;
+import org.apache.eve.listener.ClientKey ;
+import org.apache.eve.listener.KeyExpiryException ;
+
+
+/**
+ * An adaptor for the InputManagerMonitor interface.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class InputManagerMonitorAdapter implements InputManagerMonitor
+{
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#
+     * disconnectedClient(org.apache.eve.listener.ClientKey)
+     */
+    public void disconnectedClient( ClientKey a_key )
+    {
+    }
+    
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#
+     * registeredChannel(org.apache.eve.listener.ClientKey, 
+     * java.nio.channels.Selector)
+     */
+    public void registeredChannel( ClientKey a_key, Selector a_selector )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#
+     * selectorReturned(java.nio.channels.Selector)
+     */
+    public void selectorReturned( Selector a_selector )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#
+     * inputRecieved(org.apache.eve.listener.ClientKey)
+     */
+    public void inputRecieved( ClientKey a_key )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#
+     * selectFailure(java.nio.channels.Selector, java.io.IOException)
+     */
+    public void selectFailure( Selector a_selector, IOException a_fault )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#keyExpiryFailure(
+     * org.apache.eve.listener.ClientKey, 
+     * org.apache.eve.listener.KeyExpiryException)
+     */
+    public void keyExpiryFailure( ClientKey a_key, KeyExpiryException a_fault )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#
+     * readFailed(org.apache.eve.listener.ClientKey, java.io.IOException)
+     */
+    public void readFailed( ClientKey a_key, IOException a_fault ) 
+    {
+    }
+    
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#
+     * bufferUnavailable(org.apache.eve.buffer.BufferPool, 
+     * org.apache.eve.ResourceException)
+     */
+    public void bufferUnavailable( BufferPool a_bp, ResourceException a_fault )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#
+     * channelRegistrationFailure(java.nio.channels.Selector, 
+     * java.nio.channels.SocketChannel, int, java.io.IOException)
+     */
+    public void channelRegistrationFailure( Selector a_selector,
+        SocketChannel a_channel, int a_key, IOException a_fault)
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#
+     * channelCloseFailure(java.nio.channels.SocketChannel, java.io.IOException)
+     */
+    public void channelCloseFailure( SocketChannel a_channel, 
+                                     IOException a_fault )
+    {
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/AvalonListenerManagerMonitor.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/AvalonListenerManagerMonitor.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/AvalonListenerManagerMonitor.java	Tue Dec 16 17:21:15 2003
@@ -1,194 +1,194 @@
-/*
-
- ============================================================================
-                   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.listener ;
-
-
-import java.io.IOException ;
-import java.nio.channels.Selector ;
-import java.nio.channels.SelectionKey ;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled ;
-
-
-/**
- * Uses an Avalon logging to monitor component activity.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class AvalonListenerManagerMonitor extends AbstractLogEnabled 
-    implements ListenerManagerMonitor
-{
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#started()
-     */
-    public void started()
-    {
-        getLogger().info( "started ..." ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#stopped()
-     */
-    public void stopped()
-    {
-        getLogger().info( "... stopped" ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#bindOccured(
-     * org.apache.eve.listener.ServerListener)
-     */
-    public void bindOccured( ServerListener a_listener )
-    {
-        getLogger().info( "binding " + a_listener ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#unbindOccured(
-     * org.apache.eve.listener.ServerListener)
-     */
-    public void unbindOccured( ServerListener a_listener )
-    {
-        getLogger().info( "unbinding " + a_listener ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#acceptOccured(
-     * java.nio.channels.SelectionKey)
-     */
-    public void acceptOccured( SelectionKey a_key )
-    {
-        // may occur frequently so we do this right
-        if ( getLogger().isInfoEnabled() )
-        {    
-            StringBuffer l_buf = new StringBuffer( "accepted client " ) ;
-            l_buf.append( a_key.attachment() ) ;
-            getLogger().info( l_buf.toString() ) ;
-        }
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#selectOccured(
-     * java.nio.channels.Selector)
-     */
-    public void selectOccured( Selector a_selector )
-    {
-        // may occur very very frequently so we do this right
-        if ( getLogger().isDebugEnabled() )
-        {
-            StringBuffer l_buf = new StringBuffer( "select on " ) ;
-            l_buf.append( a_selector ) ;
-            getLogger().debug( l_buf.toString() ) ;
-        }
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToBind(
-     * org.apache.eve.listener.ServerListener, java.io.IOException)
-     */
-    public void failedToBind( ServerListener a_listener, IOException a_failure )
-    {
-        getLogger().error( "failed to bind listener to " + a_listener
-                + " encountered exception: " + a_failure.getMessage() ) ;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToUnbind(
-     * org.apache.eve.listener.ServerListener, java.io.IOException)
-     */
-    public void failedToUnbind( ServerListener a_listener, 
-                                IOException a_failure )
-    {
-        getLogger().error( "failed to unbind listener from " + a_listener 
-            + " encountered exception: " + a_failure.getMessage() ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToExpire(
-     * org.apache.eve.listener.ClientKey, java.io.IOException)
-     */
-    public void failedToExpire( ClientKey a_key, IOException a_failure )
-    {
-        getLogger().error( "failed to expire client key " + a_key 
-                + " encountered exception: " + a_failure.getMessage() ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToAccept(
-     * java.nio.channels.SelectionKey, java.io.IOException)
-     */
-    public void failedToAccept( SelectionKey a_key, IOException a_failure )
-    {
-        getLogger().error( "failed to accept on selection key " + a_key 
-                + " encountered exception: " + a_failure.getMessage() ) ;
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToSelect(
-     * java.nio.channels.Selector, java.io.IOException)
-     */
-    public void failedToSelect( Selector a_selector, IOException a_failure )
-    {
-        getLogger().error( "failed on select of selector " + a_selector 
-                + " encountered exception: " + a_failure.getMessage() ) ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.listener ;
+
+
+import java.io.IOException ;
+import java.nio.channels.Selector ;
+import java.nio.channels.SelectionKey ;
+
+import org.apache.avalon.framework.logger.AbstractLogEnabled ;
+
+
+/**
+ * Uses an Avalon logging to monitor component activity.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class AvalonListenerManagerMonitor extends AbstractLogEnabled 
+    implements ListenerManagerMonitor
+{
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#started()
+     */
+    public void started()
+    {
+        getLogger().info( "started ..." ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#stopped()
+     */
+    public void stopped()
+    {
+        getLogger().info( "... stopped" ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#bindOccured(
+     * org.apache.eve.listener.ServerListener)
+     */
+    public void bindOccured( ServerListener a_listener )
+    {
+        getLogger().info( "binding " + a_listener ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#unbindOccured(
+     * org.apache.eve.listener.ServerListener)
+     */
+    public void unbindOccured( ServerListener a_listener )
+    {
+        getLogger().info( "unbinding " + a_listener ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#acceptOccured(
+     * java.nio.channels.SelectionKey)
+     */
+    public void acceptOccured( SelectionKey a_key )
+    {
+        // may occur frequently so we do this right
+        if ( getLogger().isInfoEnabled() )
+        {    
+            StringBuffer l_buf = new StringBuffer( "accepted client " ) ;
+            l_buf.append( a_key.attachment() ) ;
+            getLogger().info( l_buf.toString() ) ;
+        }
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#selectOccured(
+     * java.nio.channels.Selector)
+     */
+    public void selectOccured( Selector a_selector )
+    {
+        // may occur very very frequently so we do this right
+        if ( getLogger().isDebugEnabled() )
+        {
+            StringBuffer l_buf = new StringBuffer( "select on " ) ;
+            l_buf.append( a_selector ) ;
+            getLogger().debug( l_buf.toString() ) ;
+        }
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToBind(
+     * org.apache.eve.listener.ServerListener, java.io.IOException)
+     */
+    public void failedToBind( ServerListener a_listener, IOException a_failure )
+    {
+        getLogger().error( "failed to bind listener to " + a_listener
+                + " encountered exception: " + a_failure.getMessage() ) ;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToUnbind(
+     * org.apache.eve.listener.ServerListener, java.io.IOException)
+     */
+    public void failedToUnbind( ServerListener a_listener, 
+                                IOException a_failure )
+    {
+        getLogger().error( "failed to unbind listener from " + a_listener 
+            + " encountered exception: " + a_failure.getMessage() ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToExpire(
+     * org.apache.eve.listener.ClientKey, java.io.IOException)
+     */
+    public void failedToExpire( ClientKey a_key, IOException a_failure )
+    {
+        getLogger().error( "failed to expire client key " + a_key 
+                + " encountered exception: " + a_failure.getMessage() ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToAccept(
+     * java.nio.channels.SelectionKey, java.io.IOException)
+     */
+    public void failedToAccept( SelectionKey a_key, IOException a_failure )
+    {
+        getLogger().error( "failed to accept on selection key " + a_key 
+                + " encountered exception: " + a_failure.getMessage() ) ;
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToSelect(
+     * java.nio.channels.Selector, java.io.IOException)
+     */
+    public void failedToSelect( Selector a_selector, IOException a_failure )
+    {
+        getLogger().error( "failed on select of selector " + a_selector 
+                + " encountered exception: " + a_failure.getMessage() ) ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/DefaultListenerManager.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/DefaultListenerManager.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/DefaultListenerManager.java	Tue Dec 16 17:21:15 2003
@@ -1,341 +1,341 @@
-/*
-
- ============================================================================
-                   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.listener ;
-
-
-import java.util.Set ;
-import java.util.HashSet ;
-import java.util.Iterator ;
-import java.util.EventObject ;
-
-import java.io.IOException ;
-import java.net.InetSocketAddress ;
-
-import java.nio.channels.Selector ;
-import java.nio.channels.SelectionKey ;
-import java.nio.channels.SocketChannel ;
-import java.nio.channels.ServerSocketChannel ;
-
-import org.apache.eve.event.EventRouter ;
-import org.apache.eve.event.ConnectEvent ;
-import org.apache.eve.event.DisconnectEvent ;
-import org.apache.eve.event.DisconnectSubscriber ;
-
-
-/**
- * A listener manager that uses non-blocking NIO based constructs to detect
- * client connections on server socket listeners.
- * 
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class DefaultListenerManager 
-    implements
-    DisconnectSubscriber,
-    ListenerManager,
-    Runnable
-{
-    /** event manager used to decouple source to sink relationships */
-    private final EventRouter m_router ;
-    /** selector used to select a acceptable socket channel */
-    private final Selector m_selector ;
-    /** the client keys for accepted connections */
-    private final Set m_clients ; 
-    
-    /** the thread driving this Runnable */ 
-    private Thread m_thread = null ;
-    /** parameter used to politely stop running thread */
-    private Boolean m_hasStarted = null ;
-    /** the listner manager's monitor */
-    private ListenerManagerMonitor m_monitor = 
-        new ListenerManagerMonitorAdapter() ;
-    
-
-    /**
-     * Creates a default listener manager using an event router.
-     * 
-     * @param a_router the router to publish events to
-     * @throws IOException
-     */
-    public DefaultListenerManager( EventRouter a_router ) throws IOException
-    {
-        m_router = a_router ;
-        m_clients = new HashSet() ;
-        m_selector = Selector.open() ;
-        m_hasStarted = new Boolean( false ) ;
-        m_router.subscribe( DisconnectEvent.class, null, this ) ;
-    }
-    
-    
-    /**
-     * Gets the monitor.
-     * 
-     * @return Returns the monitor.
-     */
-    public ListenerManagerMonitor getMonitor()
-    {
-        return m_monitor ;
-    }
-
-    
-    /**
-     * Sets the monitor.
-     * 
-     * @param a_monitor The monitor to set.
-     */
-    public void setMonitor( ListenerManagerMonitor a_monitor )
-    {
-        m_monitor = a_monitor ;
-    }
-
-
-    /**
-     * @see org.apache.eve.listener.ListenerManager#register(org.apache.eve.
-     * listener.ServerListener)
-     */
-    public void bind( ServerListener a_listener ) throws IOException
-    {
-        try
-        {
-            ServerSocketChannel l_channel = ServerSocketChannel.open() ;
-            InetSocketAddress l_address = new InetSocketAddress( 
-                    a_listener.getAddress(), 
-                    a_listener.getPort() ) ;
-            l_channel.socket().bind( l_address, a_listener.getBacklog() ) ;
-            l_channel.configureBlocking( false ) ;
-            l_channel.register( m_selector, SelectionKey.OP_ACCEPT, 
-                    a_listener ) ;
-        }
-        catch ( IOException e )
-        {
-            m_monitor.failedToBind( a_listener, e ) ;
-            throw e ;
-        }
-        
-        m_monitor.bindOccured( a_listener ) ;
-    }
-    
-    
-    /**
-     * @see org.apache.eve.listener.ListenerManager#unregister(org.apache.eve.
-     * listener.ServerListener)
-     */
-    public void unbind( ServerListener a_listener ) throws IOException
-    {
-        SelectionKey l_key = null ;
-        Iterator l_keys = m_selector.keys().iterator() ;
-        
-        while ( l_keys.hasNext() )
-        {
-            l_key = ( SelectionKey ) l_keys.next() ;
-            if ( l_key.attachment().equals( a_listener ) )
-            {
-                break ;
-            }
-        }
-
-        try
-        {
-            l_key.channel().close() ;
-        }
-        catch ( IOException e )
-        {
-            m_monitor.failedToUnbind( a_listener, e ) ;
-            throw e ;
-        }
-        
-        l_key.cancel() ;
-        m_monitor.unbindOccured( a_listener ) ;
-    }
-    
-    
-    // ------------------------------------------------------------------------
-    // DisconnectSubscriber Implementation
-    // ------------------------------------------------------------------------
-    
-    
-    /**
-     * Disconnects a client by removing the clientKey from the listener.
-     * 
-     * @param an_event the disconnect event
-     */
-    public void inform( DisconnectEvent an_event )
-    {
-        m_clients.remove( an_event.getClientKey() ) ;
-        
-        try
-        {
-            an_event.getClientKey().expire() ;
-        }
-        catch ( IOException e ) 
-        {
-            m_monitor.failedToExpire( an_event.getClientKey(), e ) ;
-        }
-    }
-    
-    
-    /*
-     *  (non-Javadoc)
-     * @see org.apache.eve.event.Subscriber#inform(java.util.EventObject)
-     */
-    public void inform( EventObject an_event )
-    {
-        inform( ( DisconnectEvent ) an_event ) ;
-    }
-    
-    
-    // ------------------------------------------------------------------------
-    // Runnable implementation and start/stop controls
-    // ------------------------------------------------------------------------
-    
-    
-    /**
-     * @see java.lang.Runnable#run()
-     */
-    public void run()
-    {
-        while ( m_hasStarted.booleanValue() ) 
-        {
-            int l_count = 0 ;
-            
-            try
-            {
-                if ( 0 == ( l_count = m_selector.select() ) )
-                {
-                    m_monitor.selectOccured( m_selector ) ;
-                    continue ;
-                }
-            } 
-            catch( IOException e )
-            {
-                m_monitor.failedToSelect( m_selector, e ) ;
-                continue ;
-            }
-            
-            
-            Iterator l_list = m_selector.selectedKeys().iterator() ;
-            while ( l_list.hasNext() )
-            {
-                SelectionKey l_key = ( SelectionKey ) l_list.next() ;
-                
-                if ( l_key.isAcceptable() )
-                {
-                    SocketChannel l_channel = null ;
-                    ServerSocketChannel l_server = ( ServerSocketChannel )
-                        l_key.channel() ;
-                    
-                    try
-                    {
-                        l_channel = l_server.accept() ;
-                        m_monitor.acceptOccured( l_key ) ;
-                    }
-                    catch ( IOException e )
-                    {
-                        m_monitor.failedToAccept( l_key, e ) ;
-                        continue ;
-                    }
-                    
-                    ClientKey l_clientKey = 
-                        new ClientKey( l_channel.socket() ) ;
-                    ConnectEvent l_event = 
-                        new ConnectEvent( this, l_clientKey ) ;
-                    m_router.publish( l_event ) ;
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Starts up this ListnerManager service.
-     * 
-     * @throws InterruptedException if this service's driver thread cannot start
-     * @throws IllegalStateException if this service has already started
-     */
-    public void start() throws InterruptedException
-    {
-        synchronized( m_hasStarted )
-        {
-            if ( m_hasStarted.booleanValue() )
-            {
-                throw new IllegalStateException( "Already started!" ) ;
-            }
-            
-            m_hasStarted = new Boolean( true ) ;
-            m_thread = new Thread( this ) ;
-            m_thread.start() ;
-        }
-        
-        m_monitor.started() ;
-    }
-    
-    
-    /**
-     * Gracefully stops this ListenerManager service.  Blocks calling thread 
-     * until the service has fully stopped.
-     * 
-     * @throws InterruptedException if this service's driver thread cannot start
-     */
-    public void stop() throws InterruptedException
-    {
-        synchronized( m_hasStarted )
-        {
-            m_hasStarted = new Boolean( false ) ;
-            
-            while ( m_thread.isAlive() )
-            {
-                Thread.sleep( 100 ) ;
-            }
-        }
-        
-        m_monitor.stopped() ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.listener ;
+
+
+import java.util.Set ;
+import java.util.HashSet ;
+import java.util.Iterator ;
+import java.util.EventObject ;
+
+import java.io.IOException ;
+import java.net.InetSocketAddress ;
+
+import java.nio.channels.Selector ;
+import java.nio.channels.SelectionKey ;
+import java.nio.channels.SocketChannel ;
+import java.nio.channels.ServerSocketChannel ;
+
+import org.apache.eve.event.EventRouter ;
+import org.apache.eve.event.ConnectEvent ;
+import org.apache.eve.event.DisconnectEvent ;
+import org.apache.eve.event.DisconnectSubscriber ;
+
+
+/**
+ * A listener manager that uses non-blocking NIO based constructs to detect
+ * client connections on server socket listeners.
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class DefaultListenerManager 
+    implements
+    DisconnectSubscriber,
+    ListenerManager,
+    Runnable
+{
+    /** event manager used to decouple source to sink relationships */
+    private final EventRouter m_router ;
+    /** selector used to select a acceptable socket channel */
+    private final Selector m_selector ;
+    /** the client keys for accepted connections */
+    private final Set m_clients ; 
+    
+    /** the thread driving this Runnable */ 
+    private Thread m_thread = null ;
+    /** parameter used to politely stop running thread */
+    private Boolean m_hasStarted = null ;
+    /** the listner manager's monitor */
+    private ListenerManagerMonitor m_monitor = 
+        new ListenerManagerMonitorAdapter() ;
+    
+
+    /**
+     * Creates a default listener manager using an event router.
+     * 
+     * @param a_router the router to publish events to
+     * @throws IOException
+     */
+    public DefaultListenerManager( EventRouter a_router ) throws IOException
+    {
+        m_router = a_router ;
+        m_clients = new HashSet() ;
+        m_selector = Selector.open() ;
+        m_hasStarted = new Boolean( false ) ;
+        m_router.subscribe( DisconnectEvent.class, null, this ) ;
+    }
+    
+    
+    /**
+     * Gets the monitor.
+     * 
+     * @return Returns the monitor.
+     */
+    public ListenerManagerMonitor getMonitor()
+    {
+        return m_monitor ;
+    }
+
+    
+    /**
+     * Sets the monitor.
+     * 
+     * @param a_monitor The monitor to set.
+     */
+    public void setMonitor( ListenerManagerMonitor a_monitor )
+    {
+        m_monitor = a_monitor ;
+    }
+
+
+    /**
+     * @see org.apache.eve.listener.ListenerManager#register(org.apache.eve.
+     * listener.ServerListener)
+     */
+    public void bind( ServerListener a_listener ) throws IOException
+    {
+        try
+        {
+            ServerSocketChannel l_channel = ServerSocketChannel.open() ;
+            InetSocketAddress l_address = new InetSocketAddress( 
+                    a_listener.getAddress(), 
+                    a_listener.getPort() ) ;
+            l_channel.socket().bind( l_address, a_listener.getBacklog() ) ;
+            l_channel.configureBlocking( false ) ;
+            l_channel.register( m_selector, SelectionKey.OP_ACCEPT, 
+                    a_listener ) ;
+        }
+        catch ( IOException e )
+        {
+            m_monitor.failedToBind( a_listener, e ) ;
+            throw e ;
+        }
+        
+        m_monitor.bindOccured( a_listener ) ;
+    }
+    
+    
+    /**
+     * @see org.apache.eve.listener.ListenerManager#unregister(org.apache.eve.
+     * listener.ServerListener)
+     */
+    public void unbind( ServerListener a_listener ) throws IOException
+    {
+        SelectionKey l_key = null ;
+        Iterator l_keys = m_selector.keys().iterator() ;
+        
+        while ( l_keys.hasNext() )
+        {
+            l_key = ( SelectionKey ) l_keys.next() ;
+            if ( l_key.attachment().equals( a_listener ) )
+            {
+                break ;
+            }
+        }
+
+        try
+        {
+            l_key.channel().close() ;
+        }
+        catch ( IOException e )
+        {
+            m_monitor.failedToUnbind( a_listener, e ) ;
+            throw e ;
+        }
+        
+        l_key.cancel() ;
+        m_monitor.unbindOccured( a_listener ) ;
+    }
+    
+    
+    // ------------------------------------------------------------------------
+    // DisconnectSubscriber Implementation
+    // ------------------------------------------------------------------------
+    
+    
+    /**
+     * Disconnects a client by removing the clientKey from the listener.
+     * 
+     * @param an_event the disconnect event
+     */
+    public void inform( DisconnectEvent an_event )
+    {
+        m_clients.remove( an_event.getClientKey() ) ;
+        
+        try
+        {
+            an_event.getClientKey().expire() ;
+        }
+        catch ( IOException e ) 
+        {
+            m_monitor.failedToExpire( an_event.getClientKey(), e ) ;
+        }
+    }
+    
+    
+    /*
+     *  (non-Javadoc)
+     * @see org.apache.eve.event.Subscriber#inform(java.util.EventObject)
+     */
+    public void inform( EventObject an_event )
+    {
+        inform( ( DisconnectEvent ) an_event ) ;
+    }
+    
+    
+    // ------------------------------------------------------------------------
+    // Runnable implementation and start/stop controls
+    // ------------------------------------------------------------------------
+    
+    
+    /**
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        while ( m_hasStarted.booleanValue() ) 
+        {
+            int l_count = 0 ;
+            
+            try
+            {
+                if ( 0 == ( l_count = m_selector.select() ) )
+                {
+                    m_monitor.selectOccured( m_selector ) ;
+                    continue ;
+                }
+            } 
+            catch( IOException e )
+            {
+                m_monitor.failedToSelect( m_selector, e ) ;
+                continue ;
+            }
+            
+            
+            Iterator l_list = m_selector.selectedKeys().iterator() ;
+            while ( l_list.hasNext() )
+            {
+                SelectionKey l_key = ( SelectionKey ) l_list.next() ;
+                
+                if ( l_key.isAcceptable() )
+                {
+                    SocketChannel l_channel = null ;
+                    ServerSocketChannel l_server = ( ServerSocketChannel )
+                        l_key.channel() ;
+                    
+                    try
+                    {
+                        l_channel = l_server.accept() ;
+                        m_monitor.acceptOccured( l_key ) ;
+                    }
+                    catch ( IOException e )
+                    {
+                        m_monitor.failedToAccept( l_key, e ) ;
+                        continue ;
+                    }
+                    
+                    ClientKey l_clientKey = 
+                        new ClientKey( l_channel.socket() ) ;
+                    ConnectEvent l_event = 
+                        new ConnectEvent( this, l_clientKey ) ;
+                    m_router.publish( l_event ) ;
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Starts up this ListnerManager service.
+     * 
+     * @throws InterruptedException if this service's driver thread cannot start
+     * @throws IllegalStateException if this service has already started
+     */
+    public void start() throws InterruptedException
+    {
+        synchronized( m_hasStarted )
+        {
+            if ( m_hasStarted.booleanValue() )
+            {
+                throw new IllegalStateException( "Already started!" ) ;
+            }
+            
+            m_hasStarted = new Boolean( true ) ;
+            m_thread = new Thread( this ) ;
+            m_thread.start() ;
+        }
+        
+        m_monitor.started() ;
+    }
+    
+    
+    /**
+     * Gracefully stops this ListenerManager service.  Blocks calling thread 
+     * until the service has fully stopped.
+     * 
+     * @throws InterruptedException if this service's driver thread cannot start
+     */
+    public void stop() throws InterruptedException
+    {
+        synchronized( m_hasStarted )
+        {
+            m_hasStarted = new Boolean( false ) ;
+            
+            while ( m_thread.isAlive() )
+            {
+                Thread.sleep( 100 ) ;
+            }
+        }
+        
+        m_monitor.stopped() ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/ListenerManagerMonitorAdapter.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/ListenerManagerMonitorAdapter.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/ListenerManagerMonitorAdapter.java	Tue Dec 16 17:21:15 2003
@@ -1,167 +1,167 @@
-/*
-
- ============================================================================
-                   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.listener ;
-
-
-import java.io.IOException ;
-import java.nio.channels.Selector ;
-import java.nio.channels.SelectionKey ;
-
-
-/**
- * Null adapter for the ListenerManagerMonitor.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class ListenerManagerMonitorAdapter implements ListenerManagerMonitor
-{
-    /*
-     *  (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#started()
-     */
-    public void started() 
-    {
-    }
-
-    
-    /*
-     *  (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#stopped()
-     */
-    public void stopped() 
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#bindOccured(
-     * org.apache.eve.listener.ServerListener)
-     */
-    public void bindOccured( ServerListener a_listener )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#unbindOccured(
-     * org.apache.eve.listener.ServerListener)
-     */
-    public void unbindOccured( ServerListener a_listener )
-    {
-    }
-
-    
-    /*
-     *  (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#acceptOccured(
-     * java.nio.channels.SelectionKey)
-     */
-    public void acceptOccured( SelectionKey a_key ) 
-    {
-    }
-    
-    
-    /*
-     *  (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#selectOccured(
-     * java.nio.channels.Selector)
-     */
-    public void selectOccured( Selector a_selector ) 
-    {
-    }
-    
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToBind(
-     * org.apache.eve.listener.ServerListener, java.io.IOException)
-     */
-    public void failedToBind( ServerListener a_listener, IOException a_failure )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToUnbind(
-     * org.apache.eve.listener.ServerListener, java.io.IOException)
-     */
-    public void failedToUnbind( ServerListener a_listener, 
-                                IOException a_failure )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToExpire(
-     * org.apache.eve.listener.ClientKey, java.io.IOException)
-     */
-    public void failedToExpire( ClientKey a_key, IOException a_failure )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToAccept(
-     * java.nio.channels.SelectionKey, java.io.IOException)
-     */
-    public void failedToAccept( SelectionKey a_key, IOException a_failure )
-    {
-    }
-
-    
-    /* (non-Javadoc)
-     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToSelect(
-     * java.nio.channels.Selector, java.io.IOException)
-     */
-    public void failedToSelect( Selector a_selector, IOException a_failure )
-    {
-    }
-}
+/*
+
+ ============================================================================
+                   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.listener ;
+
+
+import java.io.IOException ;
+import java.nio.channels.Selector ;
+import java.nio.channels.SelectionKey ;
+
+
+/**
+ * Null adapter for the ListenerManagerMonitor.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class ListenerManagerMonitorAdapter implements ListenerManagerMonitor
+{
+    /*
+     *  (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#started()
+     */
+    public void started() 
+    {
+    }
+
+    
+    /*
+     *  (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#stopped()
+     */
+    public void stopped() 
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#bindOccured(
+     * org.apache.eve.listener.ServerListener)
+     */
+    public void bindOccured( ServerListener a_listener )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#unbindOccured(
+     * org.apache.eve.listener.ServerListener)
+     */
+    public void unbindOccured( ServerListener a_listener )
+    {
+    }
+
+    
+    /*
+     *  (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#acceptOccured(
+     * java.nio.channels.SelectionKey)
+     */
+    public void acceptOccured( SelectionKey a_key ) 
+    {
+    }
+    
+    
+    /*
+     *  (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#selectOccured(
+     * java.nio.channels.Selector)
+     */
+    public void selectOccured( Selector a_selector ) 
+    {
+    }
+    
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToBind(
+     * org.apache.eve.listener.ServerListener, java.io.IOException)
+     */
+    public void failedToBind( ServerListener a_listener, IOException a_failure )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToUnbind(
+     * org.apache.eve.listener.ServerListener, java.io.IOException)
+     */
+    public void failedToUnbind( ServerListener a_listener, 
+                                IOException a_failure )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToExpire(
+     * org.apache.eve.listener.ClientKey, java.io.IOException)
+     */
+    public void failedToExpire( ClientKey a_key, IOException a_failure )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToAccept(
+     * java.nio.channels.SelectionKey, java.io.IOException)
+     */
+    public void failedToAccept( SelectionKey a_key, IOException a_failure )
+    {
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.listener.ListenerManagerMonitor#failedToSelect(
+     * java.nio.channels.Selector, java.io.IOException)
+     */
+    public void failedToSelect( Selector a_selector, IOException a_failure )
+    {
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/MerlinListenerManager.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/MerlinListenerManager.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/MerlinListenerManager.java	Tue Dec 16 17:21:15 2003
@@ -1,184 +1,184 @@
-/*
-
- ============================================================================
-                   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.listener ;
-
-
-import java.io.IOException ;
-import java.util.EventObject ;
-
-import org.apache.avalon.framework.activity.Startable ;
-import org.apache.avalon.framework.service.Serviceable ;
-import org.apache.avalon.framework.activity.Initializable ;
-import org.apache.avalon.framework.service.ServiceManager ;
-import org.apache.avalon.framework.service.ServiceException ;
-import org.apache.avalon.framework.logger.AbstractLogEnabled ;
-
-import org.apache.eve.event.EventRouter ;
-import org.apache.eve.event.DisconnectEvent ;
-
-
-/**
- * A listener manager that uses non-blocking NIO based constructs to detect
- * client connections on server socket listeners.
- * 
- * @avalon.component name="listener-manager" lifestyle="singleton"
- * @avalon.service type="org.apache.eve.listener.ListenerManager" version="1.0"
- * 
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public class MerlinListenerManager extends AbstractLogEnabled
-    implements 
-    ListenerManager,
-    Initializable, 
-    Serviceable,
-    Startable
-{
-    /** the listener manager implementation wrapped by this service */
-    private DefaultListenerManager m_manager ;
-    /** a temporary handle on the event router to bridge life-cycle methods */
-    private EventRouter m_router ;
-    
-    
-    // ------------------------------------------------------------------------
-    // ListenerManager delegating methods ...
-    // ------------------------------------------------------------------------
-    
-    
-    /**
-     * @see org.apache.eve.listener.ListenerManager#register(org.apache.eve.
-     * listener.ServerListener)
-     */
-    public void bind( ServerListener a_listener ) throws IOException
-    {
-        m_manager.bind( a_listener ) ;
-    }
-    
-    
-    /**
-     * @see org.apache.eve.listener.ListenerManager#unregister(org.apache.eve.
-     * listener.ServerListener)
-     */
-    public void unbind( ServerListener a_listener ) throws IOException
-    {
-        m_manager.unbind( a_listener ) ;
-    }
-    
-
-    /*
-     *  (non-Javadoc)
-     * @see org.apache.eve.event.DisconnectSubscriber#inform(
-     * org.apache.eve.event.DisconnectEvent)
-     */
-    public void inform( DisconnectEvent an_event )
-    {
-        m_manager.inform( an_event ) ;
-    }
-    
-    
-    /*
-     *  (non-Javadoc)
-     * @see org.apache.eve.event.Subscriber#inform(java.util.EventObject)
-     */
-    public void inform( EventObject an_event )
-    {
-        m_manager.inform( an_event ) ;
-    }
-    
-    
-    // ------------------------------------------------------------------------
-    // Life Cycle Methods
-    // ------------------------------------------------------------------------
-    
-    
-    /**
-     * Starts up this module.
-     * 
-     * @see org.apache.avalon.framework.activity.Startable#start()
-     */
-    public void start() throws Exception
-    {
-        m_manager.start() ;
-    }
-    
-    
-    /**
-     * Blocks calling thread until this module gracefully stops.
-     * 
-     * @see org.apache.avalon.framework.activity.Startable#stop()
-     */
-    public void stop() throws Exception
-    {
-        m_manager.stop() ;
-    }
-    
-    
-    /**
-     * @avalon.dependency type="org.apache.eve.event.EventRouter"
-     *         key="event-router" version="1.0" 
-     * @see org.apache.avalon.framework.service.Serviceable#service(
-     * org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service( ServiceManager a_manager )
-        throws ServiceException
-    {
-       m_router = ( EventRouter ) a_manager.lookup( "event-router" ) ;
-    }
-    
-    
-    /**
-     * @see org.apache.avalon.framework.activity.Initializable#initialize()
-     */
-    public void initialize() throws Exception
-    {
-        m_manager = new DefaultListenerManager( m_router ) ;
-    }
-}
+/*
+
+ ============================================================================
+                   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.listener ;
+
+
+import java.io.IOException ;
+import java.util.EventObject ;
+
+import org.apache.avalon.framework.activity.Startable ;
+import org.apache.avalon.framework.service.Serviceable ;
+import org.apache.avalon.framework.activity.Initializable ;
+import org.apache.avalon.framework.service.ServiceManager ;
+import org.apache.avalon.framework.service.ServiceException ;
+import org.apache.avalon.framework.logger.AbstractLogEnabled ;
+
+import org.apache.eve.event.EventRouter ;
+import org.apache.eve.event.DisconnectEvent ;
+
+
+/**
+ * A listener manager that uses non-blocking NIO based constructs to detect
+ * client connections on server socket listeners.
+ * 
+ * @avalon.component name="listener-manager" lifestyle="singleton"
+ * @avalon.service type="org.apache.eve.listener.ListenerManager" version="1.0"
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class MerlinListenerManager extends AbstractLogEnabled
+    implements 
+    ListenerManager,
+    Initializable, 
+    Serviceable,
+    Startable
+{
+    /** the listener manager implementation wrapped by this service */
+    private DefaultListenerManager m_manager ;
+    /** a temporary handle on the event router to bridge life-cycle methods */
+    private EventRouter m_router ;
+    
+    
+    // ------------------------------------------------------------------------
+    // ListenerManager delegating methods ...
+    // ------------------------------------------------------------------------
+    
+    
+    /**
+     * @see org.apache.eve.listener.ListenerManager#register(org.apache.eve.
+     * listener.ServerListener)
+     */
+    public void bind( ServerListener a_listener ) throws IOException
+    {
+        m_manager.bind( a_listener ) ;
+    }
+    
+    
+    /**
+     * @see org.apache.eve.listener.ListenerManager#unregister(org.apache.eve.
+     * listener.ServerListener)
+     */
+    public void unbind( ServerListener a_listener ) throws IOException
+    {
+        m_manager.unbind( a_listener ) ;
+    }
+    
+
+    /*
+     *  (non-Javadoc)
+     * @see org.apache.eve.event.DisconnectSubscriber#inform(
+     * org.apache.eve.event.DisconnectEvent)
+     */
+    public void inform( DisconnectEvent an_event )
+    {
+        m_manager.inform( an_event ) ;
+    }
+    
+    
+    /*
+     *  (non-Javadoc)
+     * @see org.apache.eve.event.Subscriber#inform(java.util.EventObject)
+     */
+    public void inform( EventObject an_event )
+    {
+        m_manager.inform( an_event ) ;
+    }
+    
+    
+    // ------------------------------------------------------------------------
+    // Life Cycle Methods
+    // ------------------------------------------------------------------------
+    
+    
+    /**
+     * Starts up this module.
+     * 
+     * @see org.apache.avalon.framework.activity.Startable#start()
+     */
+    public void start() throws Exception
+    {
+        m_manager.start() ;
+    }
+    
+    
+    /**
+     * Blocks calling thread until this module gracefully stops.
+     * 
+     * @see org.apache.avalon.framework.activity.Startable#stop()
+     */
+    public void stop() throws Exception
+    {
+        m_manager.stop() ;
+    }
+    
+    
+    /**
+     * @avalon.dependency type="org.apache.eve.event.EventRouter"
+     *         key="event-router" version="1.0" 
+     * @see org.apache.avalon.framework.service.Serviceable#service(
+     * org.apache.avalon.framework.service.ServiceManager)
+     */
+    public void service( ServiceManager a_manager )
+        throws ServiceException
+    {
+       m_router = ( EventRouter ) a_manager.lookup( "event-router" ) ;
+    }
+    
+    
+    /**
+     * @see org.apache.avalon.framework.activity.Initializable#initialize()
+     */
+    public void initialize() throws Exception
+    {
+        m_manager = new DefaultListenerManager( m_router ) ;
+    }
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManager.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManager.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManager.java	Tue Dec 16 17:21:15 2003
@@ -1,81 +1,81 @@
-/*
-
- ============================================================================
-                   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.listener ;
-
-
-import java.io.IOException ;
-
-import org.apache.eve.event.DisconnectSubscriber ;
-
-
-/**
- * Manages a set of server listeners.
- * 
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface ListenerManager extends DisconnectSubscriber
-{
-    /**
-     * Binds and registers a server listener.
-     * 
-     * @param a_listener the listener to register and bind
-     */
-    public void bind( ServerListener a_listener ) throws IOException ;
-    
-    /**
-     * Unbinds and unregisters a server listener.
-     * 
-     * @param a_listener the listener to unregister and unbind
-     * @throws IOException if there is a problem unbinding a listener
-     */
-    public void unbind( ServerListener a_listener ) throws IOException ;
-}
+/*
+
+ ============================================================================
+                   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.listener ;
+
+
+import java.io.IOException ;
+
+import org.apache.eve.event.DisconnectSubscriber ;
+
+
+/**
+ * Manages a set of server listeners.
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface ListenerManager extends DisconnectSubscriber
+{
+    /**
+     * Binds and registers a server listener.
+     * 
+     * @param a_listener the listener to register and bind
+     */
+    public void bind( ServerListener a_listener ) throws IOException ;
+    
+    /**
+     * Unbinds and unregisters a server listener.
+     * 
+     * @param a_listener the listener to unregister and unbind
+     * @throws IOException if there is a problem unbinding a listener
+     */
+    public void unbind( ServerListener a_listener ) throws IOException ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManagerMonitor.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManagerMonitor.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManagerMonitor.java	Tue Dec 16 17:21:15 2003
@@ -1,144 +1,144 @@
-/*
-
- ============================================================================
-                   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.listener ;
-
-
-import java.io.IOException ;
-import java.nio.channels.Selector ;
-import java.nio.channels.SelectionKey ;
-
-
-/**
- * Used to monitor the activities of a ListenerManager.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author$
- * @version $Revision$
- */
-public interface ListenerManagerMonitor
-{
-    /**
-     * Monitors when the ListnenerManager starts.
-     */
-    void started() ;
-    
-    /**
-     * Monitors when the ListnenerManager stops.
-     */
-    void stopped() ;
-
-    /**
-     * Monitors bind occurences.
-     * 
-     * @param a_listener the listener just bound to a port
-     */
-    void bindOccured( ServerListener a_listener ) ;
-    
-    /**
-     * Monitors unbind occurences.
-     * 
-     * @param a_listener the listener just unbound from a port
-     */
-    void unbindOccured( ServerListener a_listener ) ;
-    
-    /**
-     * Monitors the occurrence of successful socket accept attempts
-     * 
-     * @param a_key
-     */
-    void acceptOccured( SelectionKey a_key ) ;
-    
-    /**
-     * Monitors the occurrence of successful select calls on a selector
-     * 
-     * @param a_selector
-     */
-    void selectOccured( Selector a_selector ) ;
-    
-    /**
-     * Monitors bind failures.
-     * 
-     * @param a_listener the listener whose bind attempt failed
-     * @param a_failure the exception resulting from the failure
-     */
-    void failedToBind( ServerListener a_listener, IOException a_failure ) ;
-    
-    /**
-     * Monitors unbind failures.
-     * 
-     * @param a_listener the listener whose unbind attempt failed
-     * @param a_failure the exception resulting from the failure
-     */
-    void failedToUnbind( ServerListener a_listener, IOException a_failure ) ;
-    
-    /**
-     * Monitors expiration failures on client keys.
-     * 
-     * @param a_key the client key that caused the failure
-     * @param a_failure the exception resulting from the failure
-     */
-    void failedToExpire( ClientKey a_key, IOException a_failure ) ;
-    
-    /**
-     * Monitors accept failures on socket channels.
-     * 
-     * @param a_key the selector key associated with the channel
-     * @param a_failure the exception resulting from the failure
-     */
-    void failedToAccept( SelectionKey a_key, IOException a_failure ) ;
-    
-    /**
-     * Monitors select failures on a selector.
-     * 
-     * @param a_selector the selector on which the select failed
-     * @param a_failure the exception resulting from the failure
-     */
-    void failedToSelect( Selector a_selector, IOException a_failure ) ;
-}
+/*
+
+ ============================================================================
+                   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.listener ;
+
+
+import java.io.IOException ;
+import java.nio.channels.Selector ;
+import java.nio.channels.SelectionKey ;
+
+
+/**
+ * Used to monitor the activities of a ListenerManager.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface ListenerManagerMonitor
+{
+    /**
+     * Monitors when the ListnenerManager starts.
+     */
+    void started() ;
+    
+    /**
+     * Monitors when the ListnenerManager stops.
+     */
+    void stopped() ;
+
+    /**
+     * Monitors bind occurences.
+     * 
+     * @param a_listener the listener just bound to a port
+     */
+    void bindOccured( ServerListener a_listener ) ;
+    
+    /**
+     * Monitors unbind occurences.
+     * 
+     * @param a_listener the listener just unbound from a port
+     */
+    void unbindOccured( ServerListener a_listener ) ;
+    
+    /**
+     * Monitors the occurrence of successful socket accept attempts
+     * 
+     * @param a_key
+     */
+    void acceptOccured( SelectionKey a_key ) ;
+    
+    /**
+     * Monitors the occurrence of successful select calls on a selector
+     * 
+     * @param a_selector
+     */
+    void selectOccured( Selector a_selector ) ;
+    
+    /**
+     * Monitors bind failures.
+     * 
+     * @param a_listener the listener whose bind attempt failed
+     * @param a_failure the exception resulting from the failure
+     */
+    void failedToBind( ServerListener a_listener, IOException a_failure ) ;
+    
+    /**
+     * Monitors unbind failures.
+     * 
+     * @param a_listener the listener whose unbind attempt failed
+     * @param a_failure the exception resulting from the failure
+     */
+    void failedToUnbind( ServerListener a_listener, IOException a_failure ) ;
+    
+    /**
+     * Monitors expiration failures on client keys.
+     * 
+     * @param a_key the client key that caused the failure
+     * @param a_failure the exception resulting from the failure
+     */
+    void failedToExpire( ClientKey a_key, IOException a_failure ) ;
+    
+    /**
+     * Monitors accept failures on socket channels.
+     * 
+     * @param a_key the selector key associated with the channel
+     * @param a_failure the exception resulting from the failure
+     */
+    void failedToAccept( SelectionKey a_key, IOException a_failure ) ;
+    
+    /**
+     * Monitors select failures on a selector.
+     * 
+     * @param a_selector the selector on which the select failed
+     * @param a_failure the exception resulting from the failure
+     */
+    void failedToSelect( Selector a_selector, IOException a_failure ) ;
+}

Modified: incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ServerListener.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ServerListener.java	(original)
+++ incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ServerListener.java	Tue Dec 16 17:21:15 2003
@@ -1,91 +1,91 @@
-/*
-
- ============================================================================
-                   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.listener ;
-
-
-
-/**
- * A server listener specification interface.
- */
-public interface ServerListener
-{
-    /** role of this service interface */
-    public static final String ROLE = ServerListener.class.getName() ;
-
-    /**
-     * Gets the server socket backlog for this ServerListener
-     *
-     * @return client connection backlog
-     */
-    public int getBacklog() ;
-
-    /**
-     * Gets the TCP port number this ServerListener listens on.
-     *
-     * @return the tcp port number
-     */
-    public int getPort() ;
-
-    /**
-     * Gets the ip interface address this ServerListener listens on.
-     *
-     * @return the ip address octets as a String i.e. 127.0.0.1
-     */
-    public String getAddress() ;
-
-    /**
-     * Gets the LDAP URL for this ServerListener using the specified ip address
-     * and the tcp port number listened to.  The ipaddress is resolved to a host
-     * name.
-     *
-     * @return the LDAP URL like so ldap://localhost:389
-     */
-    public String getURL() ;
-}
+/*
+
+ ============================================================================
+                   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.listener ;
+
+
+
+/**
+ * A server listener specification interface.
+ */
+public interface ServerListener
+{
+    /** role of this service interface */
+    public static final String ROLE = ServerListener.class.getName() ;
+
+    /**
+     * Gets the server socket backlog for this ServerListener
+     *
+     * @return client connection backlog
+     */
+    public int getBacklog() ;
+
+    /**
+     * Gets the TCP port number this ServerListener listens on.
+     *
+     * @return the tcp port number
+     */
+    public int getPort() ;
+
+    /**
+     * Gets the ip interface address this ServerListener listens on.
+     *
+     * @return the ip address octets as a String i.e. 127.0.0.1
+     */
+    public String getAddress() ;
+
+    /**
+     * Gets the LDAP URL for this ServerListener using the specified ip address
+     * and the tcp port number listened to.  The ipaddress is resolved to a host
+     * name.
+     *
+     * @return the LDAP URL like so ldap://localhost:389
+     */
+    public String getURL() ;
+}