directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r713766 - /directory/apacheds/branches/apacheds-mina2/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
Date Thu, 13 Nov 2008 18:14:55 GMT
Author: elecharny
Date: Thu Nov 13 10:14:55 2008
New Revision: 713766

URL: http://svn.apache.org/viewvc?rev=713766&view=rev
Log:
Fixed the DummySession to make it inherit from MINA AbstractIoSession

Modified:
    directory/apacheds/branches/apacheds-mina2/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java

Modified: directory/apacheds/branches/apacheds-mina2/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java?rev=713766&r1=713765&r2=713766&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
Thu Nov 13 10:14:55 2008
@@ -58,14 +58,8 @@
 import org.apache.directory.server.kerberos.shared.messages.value.types.PrincipalNameType;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 import org.apache.directory.server.kerberos.shared.store.TicketFactory;
-import org.apache.mina.core.filterchain.IoFilterChain;
-import org.apache.mina.core.service.IoHandler;
-import org.apache.mina.core.service.IoProcessor;
-import org.apache.mina.core.service.IoService;
-import org.apache.mina.core.service.TransportMetadata;
-import org.apache.mina.core.session.AbstractIoSession;
-import org.apache.mina.core.session.IoSession;
-import org.apache.mina.core.session.IoSessionConfig;
+import org.apache.mina.core.future.WriteFuture;
+import org.apache.mina.core.session.DummySession;
 
 
 /**
@@ -86,7 +80,7 @@
     private ChangePasswordServer config;
     private PrincipalStore store;
     private ChangePasswordProtocolHandler handler;
-    private DummySession session;
+    private ChPwdDummySession session;
 
     private CipherTextHandler cipherTextHandler = new CipherTextHandler();
 
@@ -99,7 +93,7 @@
         config = new ChangePasswordServer();
         store = new MapPrincipalStoreImpl();
         handler = new ChangePasswordProtocolHandler( config, store );
-        session = new DummySession();
+        session = new ChPwdDummySession();
     }
 
 
@@ -328,78 +322,32 @@
         return principalName;
     }
 
-    private static class DummySession extends AbstractIoSession
+    private static class ChPwdDummySession extends DummySession
     {
         Object message;
 
         
-        public IoProcessor<IoSession> getProcessor()
-        {
-            return null;
-        }
-
         private Object getMessage()
         {
             return message;
         }
 
 
-        protected void updateTrafficMask()
-        {
-            // Do nothing.
-        }
-
-
-        public IoService getService()
-        {
-            return null;
-        }
-
-
-        public IoHandler getHandler()
-        {
-            return null;
-        }
-
-
-        public IoFilterChain getFilterChain()
-        {
-            return null;
-        }
-
-
-        public TransportMetadata getTransportMetadata()
-        {
-            return null;
-        }
-
-
         public SocketAddress getRemoteAddress()
         {
             return new InetSocketAddress( 10464 );
         }
-
-
-        public SocketAddress getLocalAddress()
-        {
-            return null;
-        }
-
-
-        public IoSessionConfig getConfig()
-        {
-            return null;
-        }
-
-
+        
+        
         public int getScheduledWriteRequests()
         {
             return 0;
         }
-
-
-        public SocketAddress getServiceAddress()
+        
+        
+        public WriteFuture write(Object message) 
         {
+            this.message = message;
             return null;
         }
     }



Mime
View raw message