directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r126569 - in incubator/directory/network/trunk/mina/src/java/org/apache/mina: io io/datagram io/filter io/socket protocol protocol/filter protocol/io protocol/vmpipe util
Date Thu, 27 Jan 2005 01:51:25 GMT
Author: trustin
Date: Wed Jan 26 17:51:24 2005
New Revision: 126569

URL: http://svn.apache.org/viewcvs?view=rev&rev=126569
Log:
Fixed:  IoHandlerFilter.filterWrite() and ProtocolHandlerFilter.filterWrite() didn't pass
the session object.


Modified:
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilter.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilterAdapter.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/datagram/DatagramSession.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilter.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilterAdapter.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/filter/ProtocolThreadPoolFilter.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/io/IoAdapter.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilter.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilter.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilter.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilter.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilter.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilter.java
Wed Jan 26 17:51:24 2005
@@ -38,8 +38,8 @@
  * <strong>Please NEVER implement your filters to wrap
  * {@link IoSession}s.</strong> Users can cache the reference to the session,
  * which might malfunction if any filters are added or removed later.
- * Please implement {@link #filterWrite(ByteBuffer)} method to override
- * {@link IoSession#write(ByteBuffer, Object)} method.
+ * Please implement {@link #filterWrite(IoSession,ByteBuffer)} method to
+ * override {@link IoSession#write(ByteBuffer, Object)} method.
  * 
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$
@@ -83,5 +83,5 @@
     /**
      * Filters {@link IoSession#write(ByteBuffer, Object)} method invocation.
      */
-    ByteBuffer filterWrite( ByteBuffer buf );
+    ByteBuffer filterWrite( IoSession session, ByteBuffer buf );
 }

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilterAdapter.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilterAdapter.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilterAdapter.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilterAdapter.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilterAdapter.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilterAdapter.java
Wed Jan 26 17:51:24 2005
@@ -69,7 +69,7 @@
         nextHandler.dataWritten( session, marker );
     }
 
-    public ByteBuffer filterWrite( ByteBuffer buf )
+    public ByteBuffer filterWrite( IoSession session, ByteBuffer buf )
     {
         return buf;
     }

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/datagram/DatagramSession.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/datagram/DatagramSession.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/datagram/DatagramSession.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/datagram/DatagramSession.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/datagram/DatagramSession.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/datagram/DatagramSession.java
Wed Jan 26 17:51:24 2005
@@ -147,7 +147,7 @@
 
     public void write( ByteBuffer buf, Object marker )
     {
-        filterManager.write( writeCommand, buf, marker );
+        filterManager.write( this, writeCommand, buf, marker );
     }
 
     public TransportType getTransportType()

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java
Wed Jan 26 17:51:24 2005
@@ -544,7 +544,7 @@
         }
     }
 
-    public ByteBuffer filterWrite( ByteBuffer buf )
+    public ByteBuffer filterWrite( IoSession session, ByteBuffer buf )
     {
         return buf;
     }

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java
Wed Jan 26 17:51:24 2005
@@ -158,7 +158,7 @@
 
     public void write( ByteBuffer buf, Object marker )
     {
-        filterManager.write( writeCommand, buf, marker );
+        filterManager.write( this, writeCommand, buf, marker );
     }
 
     public TransportType getTransportType()

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilter.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilter.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilter.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilter.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilter.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilter.java
Wed Jan 26 17:51:24 2005
@@ -35,8 +35,8 @@
  * <strong>Please NEVER implement your filters to wrap
  * {@link ProtocolSession}s.</strong> Users can cache the reference to the
  * session, which might malfunction if any filters are added or removed later.
- * Please implement {@link #filterWrite(Object)} method to override
- * {@link ProtocolSession#write(Object)} method.
+ * Please implement {@link #filterWrite(ProtocolSession,Object)} method to
+ * override {@link ProtocolSession#write(Object)} method.
  * 
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$
@@ -86,5 +86,5 @@
     /**
      * Filters {@link ProtocolSession#write(Object)} method invocation.
      */
-    Object filterWrite( Object message );
+    Object filterWrite( ProtocolSession session, Object message );
 }

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilterAdapter.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilterAdapter.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilterAdapter.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilterAdapter.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilterAdapter.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilterAdapter.java
Wed Jan 26 17:51:24 2005
@@ -66,7 +66,7 @@
         nextHandler.messageSent( session, message );
     }
 
-    public Object filterWrite( Object message )
+    public Object filterWrite( ProtocolSession session, Object message )
     {
         return message;
     }

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/filter/ProtocolThreadPoolFilter.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/filter/ProtocolThreadPoolFilter.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/filter/ProtocolThreadPoolFilter.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/filter/ProtocolThreadPoolFilter.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/filter/ProtocolThreadPoolFilter.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/filter/ProtocolThreadPoolFilter.java
Wed Jan 26 17:51:24 2005
@@ -517,7 +517,7 @@
         }
     }
 
-    public Object filterWrite( Object message )
+    public Object filterWrite( ProtocolSession session, Object message )
     {
         return message;
     }

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/io/IoAdapter.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/io/IoAdapter.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/io/IoAdapter.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/io/IoAdapter.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/io/IoAdapter.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/io/IoAdapter.java
Wed Jan 26 17:51:24 2005
@@ -323,7 +323,7 @@
 
         public void write( Object message )
         {
-            filterManager.write( writeCommand, message );
+            filterManager.write( this, writeCommand, message );
         }
 
         public TransportType getTransportType()

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java
Wed Jan 26 17:51:24 2005
@@ -133,7 +133,7 @@
 
     public void write( Object message )
     {
-        localFilterManager.write( writeCommand, message );
+        localFilterManager.write( this, writeCommand, message );
     }
 
     public TransportType getTransportType()

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java
Wed Jan 26 17:51:24 2005
@@ -79,7 +79,7 @@
             session.getHandler().dataWritten( session, marker );
         }
 
-        public ByteBuffer filterWrite( ByteBuffer buf )
+        public ByteBuffer filterWrite( IoSession session, ByteBuffer buf )
         {
             return buf;
         }
@@ -234,12 +234,13 @@
         }
     }
 
-    public void write( WriteCommand cmd, ByteBuffer buf, Object marker )
+    public void write( IoSession session, WriteCommand cmd, ByteBuffer buf,
+                      Object marker )
     {
         Entry e = tail;
         do
         {
-            buf = e.filter.filterWrite( buf );
+            buf = e.filter.filterWrite( session, buf );
             e = e.prevEntry;
         }
         while( e != null );

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java?view=diff&rev=126569&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java&r1=126568&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java&r2=126569
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java
Wed Jan 26 17:51:24 2005
@@ -73,7 +73,7 @@
             session.getHandler().messageSent( session, message );
         }
 
-        public Object filterWrite( Object message )
+        public Object filterWrite( ProtocolSession session, Object message )
         {
             return message;
         }
@@ -229,12 +229,12 @@
         }
     }
 
-    public void write( WriteCommand cmd, Object message )
+    public void write( ProtocolSession session, WriteCommand cmd, Object message )
     {
         Entry e = tail;
         do
         {
-            message = e.filter.filterWrite( message );
+            message = e.filter.filterWrite( session, message );
             e = e.prevEntry;
         }
         while( e != null );

Mime
View raw message