You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/11/02 09:30:26 UTC

svn commit: rev 56364 - in incubator/directory/eve/trunk/protocol/src: java/org/apache/eve/protocol test

Author: akarasulu
Date: Tue Nov  2 00:30:24 2004
New Revision: 56364

Added:
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/AbandonHandler.java
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/AddHandler.java
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/BindHandler.java
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/CompareHandler.java
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/DeleteHandler.java
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/ExtendedHandler.java
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/ModifyDnHandler.java
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/ModifyHandler.java
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/SearchHandler.java
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/UnbindHandler.java
   incubator/directory/eve/trunk/protocol/src/test/
Modified:
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java
Log:
skeletal handlers yet a functional provider

Added: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/AbandonHandler.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/AbandonHandler.java	Tue Nov  2 00:30:24 2004
@@ -0,0 +1,46 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve.protocol;
+
+
+import java.util.Properties;
+
+import org.apache.seda.protocol.NoReplyHandler;
+import org.apache.seda.protocol.HandlerTypeEnum;
+
+import org.apache.ldap.common.NotImplementedException;
+
+
+/**
+ * Handler for {@link org.apache.ldap.common.message.AbandonRequest}s.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class AbandonHandler implements NoReplyHandler
+{
+    public void handle( Object request )
+    {
+        throw new NotImplementedException( "handle in org.apache.eve.protocol.AbandonHandler not implemented!" );
+    }
+
+
+    public HandlerTypeEnum getHandlerType()
+    {
+        return HandlerTypeEnum.NOREPLY;
+    }
+}

Added: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/AddHandler.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/AddHandler.java	Tue Nov  2 00:30:24 2004
@@ -0,0 +1,52 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve.protocol;
+
+
+import org.apache.seda.protocol.HandlerTypeEnum;
+import org.apache.seda.protocol.SingleReplyHandler;
+
+import org.apache.ldap.common.NotImplementedException;
+
+
+/**
+ * A single reply handler for {@link org.apache.ldap.common.message.AddRequest}s.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class AddHandler implements SingleReplyHandler
+{
+    /**
+     * @see SingleReplyHandler#handle(Object)
+     */
+    public Object handle( Object request )
+    {
+        throw new NotImplementedException( "handle in org.apache.eve.protocol.AddHandler not implemented!" );
+    }
+
+
+    /**
+     * Gets HandlerTypeEnum.SINGLEREPLY always.
+     *
+     * @return HandlerTypeEnum.SINGLEREPLY always
+     */
+    public HandlerTypeEnum getHandlerType()
+    {
+        return HandlerTypeEnum.SINGLEREPLY;
+    }
+}

Added: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/BindHandler.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/BindHandler.java	Tue Nov  2 00:30:24 2004
@@ -0,0 +1,52 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve.protocol;
+
+
+import org.apache.seda.protocol.HandlerTypeEnum;
+import org.apache.seda.protocol.SingleReplyHandler;
+
+import org.apache.ldap.common.NotImplementedException;
+
+
+/**
+ * A single reply handler for {@link org.apache.ldap.common.message.BindRequest}s.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class BindHandler implements SingleReplyHandler
+{
+    /**
+     * @see org.apache.seda.protocol.SingleReplyHandler#handle(Object)
+     */
+    public Object handle( Object request )
+    {
+        throw new NotImplementedException( "handle in org.apache.eve.protocol.BindHandler not implemented!" );
+    }
+
+
+    /**
+     * Gets HandlerTypeEnum.SINGLEREPLY always.
+     *
+     * @return HandlerTypeEnum.SINGLEREPLY always
+     */
+    public HandlerTypeEnum getHandlerType()
+    {
+        return HandlerTypeEnum.SINGLEREPLY;
+    }
+}

Added: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/CompareHandler.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/CompareHandler.java	Tue Nov  2 00:30:24 2004
@@ -0,0 +1,52 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve.protocol;
+
+
+import org.apache.seda.protocol.HandlerTypeEnum;
+import org.apache.seda.protocol.SingleReplyHandler;
+
+import org.apache.ldap.common.NotImplementedException;
+
+
+/**
+ * A single reply handler for {@link org.apache.ldap.common.message.CompareRequest}s.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class CompareHandler implements SingleReplyHandler
+{
+    /**
+     * @see org.apache.seda.protocol.SingleReplyHandler#handle(Object)
+     */
+    public Object handle( Object request )
+    {
+        throw new NotImplementedException( "handle in org.apache.eve.protocol.CompareHandler not implemented!" );
+    }
+
+
+    /**
+     * Gets HandlerTypeEnum.SINGLEREPLY always.
+     *
+     * @return HandlerTypeEnum.SINGLEREPLY always
+     */
+    public HandlerTypeEnum getHandlerType()
+    {
+        return HandlerTypeEnum.SINGLEREPLY;
+    }
+}

Added: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/DeleteHandler.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/DeleteHandler.java	Tue Nov  2 00:30:24 2004
@@ -0,0 +1,52 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve.protocol;
+
+
+import org.apache.seda.protocol.HandlerTypeEnum;
+import org.apache.seda.protocol.SingleReplyHandler;
+
+import org.apache.ldap.common.NotImplementedException;
+
+
+/**
+ * A single reply handler for {@link org.apache.ldap.common.message.DeleteRequest}s.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class DeleteHandler implements SingleReplyHandler
+{
+    /**
+     * @see org.apache.seda.protocol.SingleReplyHandler#handle(Object)
+     */
+    public Object handle( Object request )
+    {
+        throw new NotImplementedException( "handle in org.apache.eve.protocol.DeleteHandler not implemented!" );
+    }
+
+
+    /**
+     * Gets HandlerTypeEnum.SINGLEREPLY always.
+     *
+     * @return HandlerTypeEnum.SINGLEREPLY always
+     */
+    public HandlerTypeEnum getHandlerType()
+    {
+        return HandlerTypeEnum.SINGLEREPLY;
+    }
+}

Added: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/ExtendedHandler.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/ExtendedHandler.java	Tue Nov  2 00:30:24 2004
@@ -0,0 +1,52 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve.protocol;
+
+
+import org.apache.seda.protocol.HandlerTypeEnum;
+import org.apache.seda.protocol.SingleReplyHandler;
+
+import org.apache.ldap.common.NotImplementedException;
+
+
+/**
+ * A single reply handler for {@link org.apache.ldap.common.message.ExtendedRequest}s.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class ExtendedHandler implements SingleReplyHandler
+{
+    /**
+     * @see org.apache.seda.protocol.SingleReplyHandler#handle(Object)
+     */
+    public Object handle( Object request )
+    {
+        throw new NotImplementedException( "handle in org.apache.eve.protocol.ExtendedHandler not implemented!" );
+    }
+
+
+    /**
+     * Gets HandlerTypeEnum.SINGLEREPLY always.
+     *
+     * @return HandlerTypeEnum.SINGLEREPLY always
+     */
+    public HandlerTypeEnum getHandlerType()
+    {
+        return HandlerTypeEnum.SINGLEREPLY;
+    }
+}

Modified: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java
==============================================================================
--- incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java	(original)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java	Tue Nov  2 00:30:24 2004
@@ -17,42 +17,313 @@
 package org.apache.eve.protocol;
 
 
+import java.util.*;
+
 import org.apache.seda.protocol.ProtocolProvider;
 import org.apache.seda.protocol.RequestHandler;
-import org.apache.ldap.common.NotImplementedException;
+
+import org.apache.ldap.common.message.*;
+import org.apache.ldap.common.exception.LdapNamingException;
+
 import org.apache.commons.codec.stateful.DecoderFactory;
 import org.apache.commons.codec.stateful.EncoderFactory;
+import org.apache.commons.codec.stateful.StatefulDecoder;
+import org.apache.commons.codec.stateful.StatefulEncoder;
 
 
 /**
- * An LDAP protocol provider which transduces LDAP protocol requests into JNDI
- * operations.
+ * An LDAP protocol provider implementation which dynamically associates
+ * handlers.
  *
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
 public class LdapProtocolProvider implements ProtocolProvider
 {
+    /** the constant service name of this ldap protocol provider **/
+    public static final String SERVICE_NAME = "ldap";
+    /** a map of the default request object class name to the handler class name */
+    public static final Map DEFAULT_HANDLERS;
+
+    static
+    {
+        HashMap map = new HashMap();
+
+        /*
+         * Note:
+         *
+         * By mapping the implementation class in addition to the interface
+         * for the request type to the handler Class we're bypassing the need
+         * to iterate through Interface[] looking for handlers.  For the default
+         * cases here the name of the request object's class will look up
+         * immediately.
+         */
+
+        map.put( AbandonRequest.class.getName(), AbandonHandler.class );
+        map.put( AbandonRequestImpl.class.getName(), AbandonHandler.class );
+
+        map.put( AddRequest.class.getName(), AddHandler.class );
+        map.put( AddRequestImpl.class.getName(), AddHandler.class );
+
+        map.put( BindRequest.class.getName(), BindHandler.class );
+        map.put( BindRequestImpl.class.getName(), BindHandler.class );
+
+        map.put( CompareRequest.class.getName(), CompareHandler.class );
+        map.put( CompareRequestImpl.class.getName(), CompareHandler.class );
+
+        map.put( DeleteRequest.class.getName(), DeleteHandler.class );
+        map.put( DeleteRequestImpl.class.getName(), DeleteHandler.class );
+
+        map.put( ExtendedRequest.class.getName(), ExtendedHandler.class );
+        map.put( ExtendedRequestImpl.class.getName(), ExtendedHandler.class );
+
+        map.put( ModifyRequest.class.getName(), ModifyHandler.class );
+        map.put( ModifyRequestImpl.class.getName(), ModifyHandler.class );
+
+        map.put( ModifyDnRequest.class.getName(), ModifyDnHandler.class );
+        map.put( ModifyDnRequestImpl.class.getName(), ModifyDnHandler.class );
+
+        map.put( SearchRequest.class.getName(), SearchHandler.class );
+        map.put( SearchRequestImpl.class.getName(), SearchHandler.class );
+
+        map.put( UnbindRequest.class.getName(), UnbindHandler.class );
+        map.put( UnbindRequestImpl.class.getName(), UnbindHandler.class );
+
+        DEFAULT_HANDLERS = Collections.unmodifiableMap( map );
+    }
+
+    /** the underlying provider decoder factory */
+    public final DecoderFactory decoderFactory;
+    /** the underlying provider encoder factory */
+    public final EncoderFactory encoderFactory;
+    /** the handlers to use while processing requests */
+    public final Map handlers;
+
+
+    // ------------------------------------------------------------------------
+    // C O N S T R U C T O R S
+    // ------------------------------------------------------------------------
+
+
+    /**
+     * Creates a SEDA LDAP protocol provider.
+     *
+     * @param env environment properties used to configure the provider and
+     * underlying codec providers if any
+     */
+    public LdapProtocolProvider( Properties env ) throws LdapNamingException
+    {
+        this.handlers = new HashMap();
+
+        Iterator requestTypes = DEFAULT_HANDLERS.keySet().iterator();
+        while ( requestTypes.hasNext() )
+        {
+            RequestHandler handler = null;
+            String type = ( String ) requestTypes.next();
+            Class clazz = null;
+
+            if ( env.containsKey( type ) )
+            {
+                try
+                {
+                    clazz = Class.forName( env.getProperty( type ) );
+                }
+                catch ( ClassNotFoundException e )
+                {
+                    LdapNamingException lne;
+                    String msg = "failed to load class " + clazz;
+                    msg += " for processing " + type + " objects.";
+                    lne = new LdapNamingException( msg, ResultCodeEnum.OTHER );
+                    lne.setRootCause( e );
+                    throw lne;
+                }
+            }
+            else
+            {
+                clazz = ( Class ) DEFAULT_HANDLERS.get( type );
+            }
+
+            try
+            {
+                handler = ( RequestHandler ) clazz.newInstance();
+            }
+            catch ( Exception e )
+            {
+                LdapNamingException lne;
+                String msg = "failed to create handler instance of " + clazz;
+                msg += " for processing " + type + " objects.";
+                lne = new LdapNamingException( msg, ResultCodeEnum.OTHER );
+                lne.setRootCause( e );
+                throw lne;
+            }
+
+            this.handlers.put( type, handler );
+        }
+
+        this.decoderFactory = new DecoderFactoryImpl( env );
+        this.encoderFactory = new EncoderFactoryImpl( env );
+    }
+
+
+    /**
+     * Creates a SEDA LDAP protocol provider.
+     */
+    public LdapProtocolProvider() throws LdapNamingException
+    {
+        this.handlers = new HashMap();
+
+        Iterator requestTypes = DEFAULT_HANDLERS.keySet().iterator();
+        while ( requestTypes.hasNext() )
+        {
+            RequestHandler handler = null;
+            String type = ( String ) requestTypes.next();
+            Class clazz = null;
+
+            clazz = ( Class ) DEFAULT_HANDLERS.get( type );
+
+            try
+            {
+                handler = ( RequestHandler ) clazz.newInstance();
+            }
+            catch ( Exception e )
+            {
+                LdapNamingException lne;
+                String msg = "failed to create handler instance of " + clazz;
+                msg += " for processing " + type + " objects.";
+                lne = new LdapNamingException( msg, ResultCodeEnum.OTHER );
+                lne.setRootCause( e );
+                throw lne;
+            }
+
+            this.handlers.put( type, handler );
+        }
+
+        this.decoderFactory = new DecoderFactoryImpl();
+        this.encoderFactory = new EncoderFactoryImpl();
+    }
+
+
+    // ------------------------------------------------------------------------
+    // ProtocolProvider Methods
+    // ------------------------------------------------------------------------
+
+
+    /**
+     * @see ProtocolProvider#getName()
+     * @return ldap every time
+     */
     public String getName()
     {
-        throw new NotImplementedException( "getName in org.apache.eve.protocol.LdapProtocolProvider not implemented!" );
+        return SERVICE_NAME;
     }
 
 
+    /**
+     * @see ProtocolProvider#getDecoderFactory()
+     */
     public DecoderFactory getDecoderFactory()
     {
-        throw new NotImplementedException( "getDecoderFactory in org.apache.eve.protocol.LdapProtocolProvider not implemented!" );
+        return this.decoderFactory;
     }
 
 
+    /**
+     * @see ProtocolProvider#getEncoderFactory()
+     */
     public EncoderFactory getEncoderFactory()
     {
-        throw new NotImplementedException( "getEncoderFactory in org.apache.eve.protocol.LdapProtocolProvider not implemented!" );
+        return this.encoderFactory;
     }
 
 
+    /**
+     * @see ProtocolProvider#getHandler(Object)
+     */
     public RequestHandler getHandler( Object request )
     {
-        throw new NotImplementedException( "getHandler in org.apache.eve.protocol.LdapProtocolProvider not implemented!" );
+        if ( this.handlers.containsKey( request.getClass().getName() ) )
+        {
+            return ( RequestHandler ) this.handlers.get( request.getClass().getName() );
+        }
+
+        Class[] interfaces = request.getClass().getInterfaces();
+        for ( int ii = 0; ii < interfaces.length; ii++ )
+        {
+            if ( this.handlers.containsKey( interfaces[ii].getName() ) )
+            {
+                return ( RequestHandler ) this.handlers.get( interfaces[ii].getName() );
+            }
+        }
+
+        String msg = "cannot find a handler for request: " + request;
+        throw new IllegalArgumentException( msg );
+    }
+
+
+    /**
+     * A snickers based BER Decoder factory.
+     */
+    private static final class DecoderFactoryImpl implements DecoderFactory
+    {
+        final Properties env;
+
+
+        public DecoderFactoryImpl()
+        {
+            this.env = null;
+        }
+
+
+        DecoderFactoryImpl( Properties env )
+        {
+            this.env = env;
+        }
+
+
+        public StatefulDecoder createDecoder()
+        {
+            if ( env == null )
+            {
+                return new MessageDecoder();
+            }
+            else
+            {
+                return new MessageDecoder( env );
+            }
+        }
+    }
+
+
+    /**
+     * A snickers based BER Encoder factory.
+     */
+    private static final class EncoderFactoryImpl implements EncoderFactory
+    {
+        final Properties env;
+
+
+        public EncoderFactoryImpl()
+        {
+            this.env = null;
+        }
+
+
+        public EncoderFactoryImpl( Properties env )
+        {
+            this.env = env;
+        }
+
+
+        public StatefulEncoder createEncoder()
+        {
+            if ( env == null )
+            {
+                return new MessageEncoder();
+            }
+            else
+            {
+                return new MessageEncoder( env );
+            }
+        }
     }
 }

Added: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/ModifyDnHandler.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/ModifyDnHandler.java	Tue Nov  2 00:30:24 2004
@@ -0,0 +1,52 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve.protocol;
+
+
+import org.apache.seda.protocol.HandlerTypeEnum;
+import org.apache.seda.protocol.SingleReplyHandler;
+
+import org.apache.ldap.common.NotImplementedException;
+
+
+/**
+ * A single reply handler for {@link org.apache.ldap.common.message.ModifyDnRequest}s.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class ModifyDnHandler implements SingleReplyHandler
+{
+    /**
+     * @see org.apache.seda.protocol.SingleReplyHandler#handle(Object)
+     */
+    public Object handle( Object request )
+    {
+        throw new NotImplementedException( "handle in org.apache.eve.protocol.ModifyDnHandler not implemented!" );
+    }
+
+
+    /**
+     * Gets HandlerTypeEnum.SINGLEREPLY always.
+     *
+     * @return HandlerTypeEnum.SINGLEREPLY always
+     */
+    public HandlerTypeEnum getHandlerType()
+    {
+        return HandlerTypeEnum.SINGLEREPLY;
+    }
+}

Added: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/ModifyHandler.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/ModifyHandler.java	Tue Nov  2 00:30:24 2004
@@ -0,0 +1,52 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve.protocol;
+
+
+import org.apache.seda.protocol.HandlerTypeEnum;
+import org.apache.seda.protocol.SingleReplyHandler;
+
+import org.apache.ldap.common.NotImplementedException;
+
+
+/**
+ * A single reply handler for {@link org.apache.ldap.common.message.ModifyRequest}s.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class ModifyHandler implements SingleReplyHandler
+{
+    /**
+     * @see org.apache.seda.protocol.SingleReplyHandler#handle(Object)
+     */
+    public Object handle( Object request )
+    {
+        throw new NotImplementedException( "handle in org.apache.eve.protocol.ModifyHandler not implemented!" );
+    }
+
+
+    /**
+     * Gets HandlerTypeEnum.SINGLEREPLY always.
+     *
+     * @return HandlerTypeEnum.SINGLEREPLY always
+     */
+    public HandlerTypeEnum getHandlerType()
+    {
+        return HandlerTypeEnum.SINGLEREPLY;
+    }
+}

Added: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/SearchHandler.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/SearchHandler.java	Tue Nov  2 00:30:24 2004
@@ -0,0 +1,63 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve.protocol;
+
+
+import java.util.Iterator;
+
+import org.apache.seda.protocol.ManyReplyHandler;
+import org.apache.seda.protocol.HandlerTypeEnum;
+
+import org.apache.ldap.common.NotImplementedException;
+
+
+/**
+ * A handler for processing search requests.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class SearchHandler implements ManyReplyHandler
+{
+    /**
+     * @see ManyReplyHandler#handle(Object)
+     */
+    public Iterator handle( Object request )
+    {
+        throw new NotImplementedException();
+    }
+
+
+    /**
+     * @see ManyReplyHandler#isSequential()
+     */
+    public boolean isSequential()
+    {
+        return true;
+    }
+
+
+    /**
+     * Gets HandlerTypeEnum.MANYREPLY always.
+     *
+     * @return HandlerTypeEnum.MANYREPLY always
+     */
+    public HandlerTypeEnum getHandlerType()
+    {
+        return HandlerTypeEnum.MANYREPLY;
+    }
+}

Added: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/UnbindHandler.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/UnbindHandler.java	Tue Nov  2 00:30:24 2004
@@ -0,0 +1,52 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve.protocol;
+
+
+import org.apache.seda.protocol.NoReplyHandler;
+import org.apache.seda.protocol.HandlerTypeEnum;
+import org.apache.ldap.common.NotImplementedException;
+
+
+/**
+ * A no reply protocol handler implementation for LDAP {@link
+ * org.apache.ldap.common.message.UnbindRequest}s.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class UnbindHandler implements NoReplyHandler
+{
+    /**
+     * @see NoReplyHandler#handle(Object)
+     */
+    public void handle( Object request )
+    {
+        throw new NotImplementedException( "handle in org.apache.eve.protocol.UnbindHandler not implemented!" );
+    }
+
+
+    /**
+     * Gets HandlerTypeEnum.NOREPLY always.
+     *
+     * @return HandlerTypeEnum.NOREPLY always
+     */
+    public HandlerTypeEnum getHandlerType()
+    {
+        return HandlerTypeEnum.NOREPLY;
+    }
+}