directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r190254 - /directory/network/branches/dirmina-39/src/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
Date Sun, 12 Jun 2005 11:45:27 GMT
Author: trustin
Date: Sun Jun 12 04:45:26 2005
New Revision: 190254

URL: http://svn.apache.org/viewcvs?rev=190254&view=rev
Log:
Simplified ProtocolCodecFilter

Modified:
    directory/network/branches/dirmina-39/src/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java

Modified: directory/network/branches/dirmina-39/src/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/dirmina-39/src/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java?rev=190254&r1=190253&r2=190254&view=diff
==============================================================================
--- directory/network/branches/dirmina-39/src/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
(original)
+++ directory/network/branches/dirmina-39/src/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
Sun Jun 12 04:45:26 2005
@@ -83,8 +83,7 @@
         
         encoder.encode( session, writeRequest.getMessage(), encoderOut );
 
-        encoderOut.message = writeRequest.getMessage();
-        encoderOut.future = writeRequest.getFuture();
+        encoderOut.writeRequest = writeRequest;
         encoderOut.flush();
     }
     
@@ -147,8 +146,7 @@
     {
         private final IoSession session;
         private NextFilter nextFilter;
-        private Object message;
-        private WriteFuture future;
+        private WriteRequest writeRequest;
         
         public ProtocolEncoderOutputImpl( IoSession session )
         {
@@ -158,10 +156,14 @@
         protected WriteFuture doFlush( ByteBuffer buf )
         {
             WriteFuture future;
-            if( message != null )
+            if( writeRequest != null )
             {
-                future = this.future;
-                nextFilter.filterWrite( session, new WriteRequest( new MessageByteBuffer(
buf, message ), future ) );
+                future = writeRequest.getFuture();
+                nextFilter.filterWrite(
+                        session,
+                        new WriteRequest(
+                                new MessageByteBuffer(
+                                        buf, writeRequest.getMessage() ), future ) );
             }
             else
             {



Mime
View raw message