directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r111248 - /incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/Session.java /incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/socket/TcpSession.java
Date Wed, 08 Dec 2004 11:04:28 GMT
Author: trustin
Date: Wed Dec  8 03:04:26 2004
New Revision: 111248

URL: http://svn.apache.org/viewcvs?view=rev&rev=111248
Log:
Removed Session.get/setHandler() methods; made SessionHandler unchangable if once set.
Modified:
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/Session.java
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/socket/TcpSession.java

Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/Session.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/Session.java?view=diff&rev=111248&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/Session.java&r1=111247&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/Session.java&r2=111248
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/Session.java	(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/Session.java	Wed
Dec  8 03:04:26 2004
@@ -30,10 +30,6 @@
  * @version $Rev$, $Date$
  */
 public interface Session {
-    SessionHandler getHandler();
-
-    void setHandler(SessionHandler handler);
-
     void close();
 
     Object getAttachment();

Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/socket/TcpSession.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/socket/TcpSession.java?view=diff&rev=111248&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/socket/TcpSession.java&r1=111247&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/socket/TcpSession.java&r2=111248
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/socket/TcpSession.java
(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/socket/TcpSession.java
Wed Dec  8 03:04:26 2004
@@ -20,19 +20,17 @@
 package org.apache.mina.core.socket;
 
 import java.net.SocketAddress;
-
 import java.nio.ByteBuffer;
 import java.nio.channels.SelectionKey;
 import java.nio.channels.SocketChannel;
 
-import org.apache.commons.lang.Validate;
 import org.apache.mina.core.IdleStatus;
-import org.apache.mina.core.SessionConfig;
-import org.apache.mina.util.ByteBufferPool;
 import org.apache.mina.core.ReadBuffer;
 import org.apache.mina.core.Session;
+import org.apache.mina.core.SessionConfig;
 import org.apache.mina.core.SessionHandler;
 import org.apache.mina.core.WriteBuffer;
+import org.apache.mina.util.ByteBufferPool;
 
 
 /**
@@ -46,8 +44,8 @@
     private final TcpSessionConfig config;
     private final TcpReadBuffer readBuf;
     private final TcpWriteBuffer writeBuf;
+    private final SessionHandler handler;
     private SelectionKey key;
-    private SessionHandler handler;
     private Object attachment;
     private long readBytes;
     private long writtenBytes;
@@ -72,6 +70,10 @@
     SocketChannel getChannel() {
         return ch;
     }
+    
+    SessionHandler getHandler() {
+    	return handler;
+    }
 
     SelectionKey getSelectionKey() {
         return key;
@@ -84,15 +86,6 @@
     void dispose() {
         ByteBufferPool.close(readBuf.buf());
         ByteBufferPool.close(writeBuf.buf());
-    }
-
-    public SessionHandler getHandler() {
-        return handler;
-    }
-
-    public void setHandler(SessionHandler handler) {
-        Validate.notNull(handler);
-        this.handler = handler;
     }
 
     public void close() {

Mime
View raw message