hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r560528 - in /jakarta/httpcomponents/httpcore/trunk: module-main/src/main/java/org/apache/http/io/ module-nio/src/main/java/org/apache/http/impl/nio/ module-nio/src/main/java/org/apache/http/impl/nio/codecs/ module-nio/src/main/java/org/apa...
Date Sat, 28 Jul 2007 11:34:19 GMT
Author: olegk
Date: Sat Jul 28 04:34:17 2007
New Revision: 560528

URL: http://svn.apache.org/viewvc?view=rev&rev=560528
Log:
HTTPCORE-105: Ensure class name consistency in HttpCore base and NIO modules (third pass)

Added:
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java
      - copied, changed from r560341, jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBuffer.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java
      - copied, changed from r560341, jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBuffer.java
Removed:
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBuffer.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBuffer.java
Modified:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionInputBuffer.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionOutputBuffer.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpMessageParser.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpRequestParser.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpResponseParser.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionInputBuffer.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionOutputBuffer.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestHttpMessageParser.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/mockup/MockupEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/util/TestBuffers.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionInputBuffer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionInputBuffer.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionInputBuffer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionInputBuffer.java Sat Jul 28 04:34:17 2007
@@ -36,7 +36,7 @@
 import org.apache.http.util.CharArrayBuffer;
 
 /**
- * Session input buffer for blocking connection.
+ * Session input buffer for blocking connections.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionOutputBuffer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionOutputBuffer.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionOutputBuffer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionOutputBuffer.java Sat Jul 28 04:34:17 2007
@@ -36,7 +36,7 @@
 import org.apache.http.util.CharArrayBuffer;
 
 /**
- * Session output buffer for blocking connection.
+ * Session output buffer for blocking connections.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java Sat Jul 28 04:34:17 2007
@@ -60,8 +60,8 @@
 import org.apache.http.impl.nio.codecs.IdentityEncoder;
 import org.apache.http.impl.nio.codecs.LengthDelimitedDecoder;
 import org.apache.http.impl.nio.codecs.LengthDelimitedEncoder;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
-import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
+import org.apache.http.impl.nio.reactor.SessionInputBufferImpl;
+import org.apache.http.impl.nio.reactor.SessionOutputBufferImpl;
 import org.apache.http.nio.reactor.EventMask;
 import org.apache.http.nio.reactor.IOSession;
 import org.apache.http.nio.reactor.SessionBufferStatus;
@@ -82,8 +82,8 @@
     protected final ContentLengthStrategy incomingContentStrategy;
     protected final ContentLengthStrategy outgoingContentStrategy;
     
-    protected final SessionInputBuffer inbuf;
-    protected final SessionOutputBuffer outbuf;
+    protected final SessionInputBufferImpl inbuf;
+    protected final SessionOutputBufferImpl outbuf;
     protected final CharArrayBuffer lineBuffer;
     
     protected final HttpTransportMetricsImpl inTransportMetrics;
@@ -119,10 +119,8 @@
             linebuffersize = 512;
         }
         
-        this.inbuf = new SessionInputBuffer(buffersize, linebuffersize, allocator); 
-        this.inbuf.reset(params);
-        this.outbuf = new SessionOutputBuffer(buffersize, linebuffersize, allocator); 
-        this.outbuf.reset(params);
+        this.inbuf = new SessionInputBufferImpl(buffersize, linebuffersize, allocator, params); 
+        this.outbuf = new SessionOutputBufferImpl(buffersize, linebuffersize, allocator, params); 
         this.lineBuffer = new CharArrayBuffer(64); 
         
         this.incomingContentStrategy = new LaxContentLengthStrategy();

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentDecoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentDecoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentDecoder.java Sat Jul 28 04:34:17 2007
@@ -34,8 +34,8 @@
 import java.nio.channels.ReadableByteChannel;
 
 import org.apache.http.nio.ContentDecoder;
+import org.apache.http.nio.reactor.SessionInputBuffer;
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
 
 public abstract class AbstractContentDecoder implements ContentDecoder {
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentEncoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentEncoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentEncoder.java Sat Jul 28 04:34:17 2007
@@ -35,8 +35,8 @@
 import java.nio.channels.WritableByteChannel;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
 import org.apache.http.nio.ContentEncoder;
+import org.apache.http.nio.reactor.SessionOutputBuffer;
 
 public abstract class AbstractContentEncoder implements ContentEncoder {
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java Sat Jul 28 04:34:17 2007
@@ -40,8 +40,8 @@
 import org.apache.http.Header;
 import org.apache.http.MalformedChunkCodingException;
 import org.apache.http.message.BufferedHeader;
+import org.apache.http.nio.reactor.SessionInputBuffer;
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
 import org.apache.http.protocol.HTTP;
 import org.apache.http.util.CharArrayBuffer;
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkEncoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkEncoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkEncoder.java Sat Jul 28 04:34:17 2007
@@ -36,7 +36,7 @@
 import java.nio.channels.WritableByteChannel;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
+import org.apache.http.nio.reactor.SessionOutputBuffer;
 import org.apache.http.util.CharArrayBuffer;
 
 public class ChunkEncoder extends AbstractContentEncoder {

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpMessageParser.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpMessageParser.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpMessageParser.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpMessageParser.java Sat Jul 28 04:34:17 2007
@@ -40,9 +40,9 @@
 import org.apache.http.HttpMessage;
 import org.apache.http.ProtocolException;
 import org.apache.http.message.BufferedHeader;
+import org.apache.http.nio.reactor.SessionInputBuffer;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
 import org.apache.http.util.CharArrayBuffer;
 
 public abstract class HttpMessageParser {

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpRequestParser.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpRequestParser.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpRequestParser.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpRequestParser.java Sat Jul 28 04:34:17 2007
@@ -36,8 +36,8 @@
 import org.apache.http.HttpRequestFactory;
 import org.apache.http.RequestLine;
 import org.apache.http.message.BasicRequestLine;
+import org.apache.http.nio.reactor.SessionInputBuffer;
 import org.apache.http.params.HttpParams;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
 import org.apache.http.util.CharArrayBuffer;
 
 public class HttpRequestParser extends HttpMessageParser {

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpResponseParser.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpResponseParser.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpResponseParser.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/HttpResponseParser.java Sat Jul 28 04:34:17 2007
@@ -36,8 +36,8 @@
 import org.apache.http.HttpResponseFactory;
 import org.apache.http.StatusLine;
 import org.apache.http.message.BasicStatusLine;
+import org.apache.http.nio.reactor.SessionInputBuffer;
 import org.apache.http.params.HttpParams;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
 import org.apache.http.util.CharArrayBuffer;
 
 public class HttpResponseParser extends HttpMessageParser {

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java Sat Jul 28 04:34:17 2007
@@ -37,8 +37,8 @@
 import java.nio.channels.ReadableByteChannel;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
 import org.apache.http.nio.FileContentDecoder;
+import org.apache.http.nio.reactor.SessionInputBuffer;
 
 /**
  * Identity decoder implementation.

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java Sat Jul 28 04:34:17 2007
@@ -37,8 +37,8 @@
 import java.nio.channels.WritableByteChannel;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
 import org.apache.http.nio.FileContentEncoder;
+import org.apache.http.nio.reactor.SessionOutputBuffer;
 
 /**
  * Identity encoder implementation.

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java Sat Jul 28 04:34:17 2007
@@ -37,8 +37,8 @@
 import java.nio.channels.ReadableByteChannel;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
 import org.apache.http.nio.FileContentDecoder;
+import org.apache.http.nio.reactor.SessionInputBuffer;
 
 /**
  * Content-Length delimited decoder implementation.

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java Sat Jul 28 04:34:17 2007
@@ -37,8 +37,8 @@
 import java.nio.channels.WritableByteChannel;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
 import org.apache.http.nio.FileContentEncoder;
+import org.apache.http.nio.reactor.SessionOutputBuffer;
 
 /**
  * Content-Length delimited encoder implementation.

Copied: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java (from r560341, jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBuffer.java)
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java?view=diff&rev=560528&p1=jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBuffer.java&r1=560341&p2=jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBuffer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java Sat Jul 28 04:34:17 2007
@@ -40,6 +40,7 @@
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CoderResult;
 
+import org.apache.http.nio.reactor.SessionInputBuffer;
 import org.apache.http.nio.util.ByteBufferAllocator;
 import org.apache.http.nio.util.ExpandableBuffer;
 import org.apache.http.nio.util.HeapByteBufferAllocator;
@@ -48,29 +49,30 @@
 import org.apache.http.protocol.HTTP;
 import org.apache.http.util.CharArrayBuffer;
 
-public class SessionInputBuffer extends ExpandableBuffer {
+public class SessionInputBufferImpl extends ExpandableBuffer implements SessionInputBuffer {
     
     private CharBuffer charbuffer = null;
     private Charset charset = null;
     private CharsetDecoder chardecoder = null;
     
-    public SessionInputBuffer(int buffersize, int linebuffersize, final ByteBufferAllocator allocator) {
+    public SessionInputBufferImpl(
+            int buffersize, 
+            int linebuffersize, 
+            final ByteBufferAllocator allocator,
+            final HttpParams params) {
         super(buffersize, allocator);
         this.charbuffer = CharBuffer.allocate(linebuffersize);
-        this.charset = Charset.forName("US-ASCII");
+        this.charset = Charset.forName(HttpProtocolParams.getHttpElementCharset(params)); 
         this.chardecoder = this.charset.newDecoder();
     }
 
-    public SessionInputBuffer(int buffersize, int linebuffersize) {
-        this(buffersize, linebuffersize, new HeapByteBufferAllocator());
+    public SessionInputBufferImpl(
+            int buffersize, 
+            int linebuffersize, 
+            final HttpParams params) {
+        this(buffersize, linebuffersize, new HeapByteBufferAllocator(), params);
     }
     
-    public void reset(final HttpParams params) {
-        this.charset = Charset.forName(HttpProtocolParams.getHttpElementCharset(params)); 
-        this.chardecoder = this.charset.newDecoder();
-        clear();
-    }
-
     public int fill(final ReadableByteChannel channel) throws IOException {
         if (channel == null) {
             throw new IllegalArgumentException("Channel may not be null");

Copied: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java (from r560341, jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBuffer.java)
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java?view=diff&rev=560528&p1=jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBuffer.java&r1=560341&p2=jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBuffer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java Sat Jul 28 04:34:17 2007
@@ -40,6 +40,7 @@
 import java.nio.charset.CharsetEncoder;
 import java.nio.charset.CoderResult;
 
+import org.apache.http.nio.reactor.SessionOutputBuffer;
 import org.apache.http.nio.util.ByteBufferAllocator;
 import org.apache.http.nio.util.ExpandableBuffer;
 import org.apache.http.nio.util.HeapByteBufferAllocator;
@@ -48,7 +49,7 @@
 import org.apache.http.protocol.HTTP;
 import org.apache.http.util.CharArrayBuffer;
 
-public class SessionOutputBuffer extends ExpandableBuffer {
+public class SessionOutputBufferImpl extends ExpandableBuffer implements SessionOutputBuffer {
 
     private static final byte[] CRLF = new byte[] {HTTP.CR, HTTP.LF};
 
@@ -56,20 +57,25 @@
     private Charset charset = null;
     private CharsetEncoder charencoder = null;
     
-    public SessionOutputBuffer(int buffersize, int linebuffersize, final ByteBufferAllocator allocator) {
+    public SessionOutputBufferImpl(
+            int buffersize, 
+            int linebuffersize, 
+            final ByteBufferAllocator allocator,
+            final HttpParams params) {
         super(buffersize, allocator);
         this.charbuffer = CharBuffer.allocate(linebuffersize);
-        this.charset = Charset.forName("US-ASCII");
+        this.charset = Charset.forName(HttpProtocolParams.getHttpElementCharset(params)); 
         this.charencoder = this.charset.newEncoder();
     }
 
-    public SessionOutputBuffer(int buffersize, int linebuffersize) {
-        this(buffersize, linebuffersize, new HeapByteBufferAllocator());
+    public SessionOutputBufferImpl(
+            int buffersize, 
+            int linebuffersize, 
+            final HttpParams params) {
+        this(buffersize, linebuffersize, new HeapByteBufferAllocator(), params);
     }
 
     public void reset(final HttpParams params) {
-        this.charset = Charset.forName(HttpProtocolParams.getHttpElementCharset(params)); 
-        this.charencoder = this.charset.newEncoder();
         clear();
     }
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionInputBuffer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionInputBuffer.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionInputBuffer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionInputBuffer.java Sat Jul 28 04:34:17 2007
@@ -39,13 +39,17 @@
 import org.apache.http.util.CharArrayBuffer;
 
 /**
- * Session input buffer for non-blocking connection.
+ * Session input buffer for non-blocking connections.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
  * @since 4.0
  */
 public interface SessionInputBuffer {
+    
+    boolean hasData();
+    
+    int length();
     
     int fill(ReadableByteChannel channel) 
         throws IOException;

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionOutputBuffer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionOutputBuffer.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionOutputBuffer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionOutputBuffer.java Sat Jul 28 04:34:17 2007
@@ -39,7 +39,7 @@
 import org.apache.http.util.CharArrayBuffer;
 
 /**
- * Session output buffer for non-blocking connection.
+ * Session output buffer for non-blocking connections.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
@@ -47,6 +47,10 @@
  */
 public interface SessionOutputBuffer {
 
+    boolean hasData();
+    
+    int length();
+    
     int flush(WritableByteChannel channel) 
         throws IOException;
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java Sat Jul 28 04:34:17 2007
@@ -41,8 +41,11 @@
 import org.apache.http.Header;
 import org.apache.http.MalformedChunkCodingException;
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
+import org.apache.http.impl.nio.reactor.SessionInputBufferImpl;
 import org.apache.http.nio.mockup.ReadableByteChannelMockup;
+import org.apache.http.nio.reactor.SessionInputBuffer;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.HttpParams;
 
 /**
  * Simple tests for {@link ChunkDecoder}.
@@ -83,8 +86,9 @@
         String s = "5\r\n01234\r\n5\r\n56789\r\n6\r\nabcdef\r\n0\r\n\r\n";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256);
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
         
@@ -107,8 +111,9 @@
                 "5\r\n12345\r\n5\r\n12345\r\n0\r\nFooter1: abcde\r\nFooter2: fghij\r\n\r\n";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s}, "US-ASCII"); 
-    
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        HttpParams params = new BasicHttpParams();
+        
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
         
@@ -143,8 +148,9 @@
         String s2 = "9\r\n6\r\nabcdef\r\n0\r\n\r\n";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s1, s2}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
         
@@ -186,8 +192,9 @@
         };
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 chunks, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
     
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ByteBuffer dst = ByteBuffer.allocate(1024); 
         
@@ -222,8 +229,9 @@
         String s = "5\r\n01234\r\n5zz\r\n56789\r\n6\r\nabcdef\r\n0\r\n\r\n";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
         
@@ -241,8 +249,9 @@
         String s = "5\r\n01234\r\n5\r\n56789\n\r6\r\nabcdef\r\n0\r\n\r\n";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
         
@@ -261,8 +270,9 @@
                 "5\r\n12345\r\n5\r\n12345\r\n0\r\nFooter1: abcde\r\n   \r\n  fghij\r\n\r\n";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
     
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
         
@@ -283,8 +293,9 @@
                 "5\r\n12345\r\n5\r\n12345\r\n0\r\nFooter1 abcde\r\n\r\n";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
     
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
         
@@ -303,8 +314,9 @@
                 "5\r\n12345\r\n5\r\n12345";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
     
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
         
@@ -328,8 +340,9 @@
                 "5\r\n12345\r\n5\r\n12345\r\n0\r\n";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
     
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
         
@@ -351,8 +364,9 @@
     public void testInvalidConstructor() {
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {"stuff;", "more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         try {
             new ChunkDecoder(null, null, null);
             fail("IllegalArgumentException should have been thrown");
@@ -378,8 +392,9 @@
                 "5\r\n12345\r\n5\r\n12345\r\n0\r\nFooter1 abcde\r\n\r\n";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
     
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
         

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkEncoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkEncoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkEncoder.java Sat Jul 28 04:34:17 2007
@@ -40,7 +40,10 @@
 import junit.framework.TestSuite;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
+import org.apache.http.impl.nio.reactor.SessionOutputBufferImpl;
+import org.apache.http.nio.reactor.SessionOutputBuffer;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.HttpParams;
 import org.apache.http.util.EncodingUtils;
 
 /**
@@ -80,7 +83,8 @@
     public void testBasicCoding() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkEncoder encoder = new ChunkEncoder(channel, outbuf, metrics);
         
@@ -100,7 +104,8 @@
     public void testCodingEmptyBuffer() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkEncoder encoder = new ChunkEncoder(channel, outbuf, metrics);
         
@@ -126,7 +131,8 @@
     public void testCodingCompleted() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         ChunkEncoder encoder = new ChunkEncoder(channel, outbuf, metrics);
         
@@ -152,7 +158,8 @@
     public void testInvalidConstructor() {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
 
         try {
             new ChunkEncoder(null, null, null);

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestHttpMessageParser.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestHttpMessageParser.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestHttpMessageParser.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestHttpMessageParser.java Sat Jul 28 04:34:17 2007
@@ -47,7 +47,8 @@
 import org.apache.http.HttpVersion;
 import org.apache.http.impl.DefaultHttpRequestFactory;
 import org.apache.http.impl.DefaultHttpResponseFactory;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
+import org.apache.http.impl.nio.reactor.SessionInputBufferImpl;
+import org.apache.http.nio.reactor.SessionInputBuffer;
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
@@ -90,7 +91,7 @@
 
     public void testSimpleParsing() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, requestFactory, params);
         requestParser.fillBuffer(newChannel("GET /whatever HTTP/1.1\r\nSome header: stuff\r\n\r\n"));
@@ -102,7 +103,7 @@
 
     public void testParsingChunkedMessages() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, requestFactory, params);
 
@@ -123,7 +124,7 @@
 
     public void testParsingFoldedHeaders() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, requestFactory, params);
 
@@ -153,7 +154,7 @@
     
     public void testParsingBadlyFoldedFirstHeader() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, requestFactory, params);
 
@@ -180,7 +181,7 @@
     
     public void testParsingEmptyFoldedHeader() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, requestFactory, params);
 
@@ -210,7 +211,7 @@
     
     public void testParsingIncompleteRequestLine() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, requestFactory, params);
         
@@ -224,7 +225,7 @@
     
     public void testParsingIncompleteHeader() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, requestFactory, params);
         
@@ -239,7 +240,7 @@
     
     public void testParsingInvalidRequestLine() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, requestFactory, params);
         
@@ -255,7 +256,7 @@
     
     public void testParsingInvalidStatusLine() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpResponseFactory responseFactory = new DefaultHttpResponseFactory();
         HttpResponseParser responseParser = new HttpResponseParser(inbuf, responseFactory, params);
         
@@ -271,7 +272,7 @@
     
     public void testParsingInvalidHeader() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpResponseFactory responseFactory = new DefaultHttpResponseFactory();
         HttpResponseParser responseParser = new HttpResponseParser(inbuf, responseFactory, params);
         
@@ -287,7 +288,7 @@
     
     public void testResetParser() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, requestFactory, params);
         
@@ -310,7 +311,7 @@
     
     public void testInvalidConstructor() {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         try {
             new HttpRequestParser(null, null, params);
             fail("IllegalArgumentException should have been thrown");
@@ -339,7 +340,7 @@
 
     public void testLineLimitForStatus() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
 
         params.setIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, 0);
@@ -360,7 +361,7 @@
 
     public void testLineLimitForHeader() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
 
         params.setIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, 0);
@@ -384,7 +385,7 @@
 
     public void testLineLimitForFoldedHeader() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
 
         params.setIntParameter(HttpConnectionParams.MAX_HEADER_COUNT, 2);
@@ -400,7 +401,7 @@
 
     public void testMaxHeaderCount() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
 
         params.setIntParameter(HttpConnectionParams.MAX_HEADER_COUNT, 2);
@@ -419,7 +420,7 @@
 
     public void testDetectLineLimitEarly() throws Exception {
         HttpParams params = new BasicHttpParams();
-        SessionInputBuffer inbuf = new SessionInputBuffer(2, 128); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(2, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
 
         params.setIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, 2);

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityDecoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityDecoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityDecoder.java Sat Jul 28 04:34:17 2007
@@ -44,8 +44,11 @@
 import junit.framework.TestSuite;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
+import org.apache.http.impl.nio.reactor.SessionInputBufferImpl;
 import org.apache.http.nio.mockup.ReadableByteChannelMockup;
+import org.apache.http.nio.reactor.SessionInputBuffer;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.HttpParams;
 
 /**
  * Simple tests for {@link LengthDelimitedDecoder}.
@@ -96,8 +99,9 @@
     public void testBasicDecoding() throws Exception {
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {"stuff;", "more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         IdentityDecoder decoder = new IdentityDecoder(channel, inbuf, metrics); 
         
@@ -128,8 +132,9 @@
     public void testDecodingFromSessionBuffer() throws Exception {
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {"stuff;", "more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256);
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         
         inbuf.fill(channel);
@@ -165,8 +170,9 @@
     public void testBasicDecodingFile() throws Exception {
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {"stuff;", "more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         IdentityDecoder decoder = new IdentityDecoder(channel, inbuf, metrics); 
         
@@ -197,8 +203,9 @@
     public void testDecodingFromSessionBufferFile() throws Exception {
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {"stuff;", "more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256);
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         inbuf.fill(channel);
@@ -234,8 +241,9 @@
     public void testInvalidConstructor() {
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {"stuff;", "more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         try {
             new IdentityDecoder(null, null, null);
             fail("IllegalArgumentException should have been thrown");
@@ -260,8 +268,9 @@
         String s = "stuff";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
     
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         IdentityDecoder decoder = new IdentityDecoder(channel, inbuf, metrics);
         

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityEncoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityEncoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityEncoder.java Sat Jul 28 04:34:17 2007
@@ -40,7 +40,10 @@
 import junit.framework.TestSuite;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
+import org.apache.http.impl.nio.reactor.SessionOutputBufferImpl;
+import org.apache.http.nio.reactor.SessionOutputBuffer;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.HttpParams;
 import org.apache.http.util.EncodingUtils;
 
 /**
@@ -80,7 +83,8 @@
     public void testBasicCoding() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         IdentityEncoder encoder = new IdentityEncoder(channel, outbuf, metrics);
@@ -96,7 +100,8 @@
     public void testCodingEmptyBuffer() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         IdentityEncoder encoder = new IdentityEncoder(channel, outbuf, metrics);
@@ -118,7 +123,8 @@
     public void testCodingCompleted() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         IdentityEncoder encoder = new IdentityEncoder(channel, outbuf, metrics);
@@ -136,7 +142,8 @@
     public void testInvalidConstructor() {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
 
         try {
             new IdentityEncoder(null, null, null);

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedDecoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedDecoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedDecoder.java Sat Jul 28 04:34:17 2007
@@ -44,8 +44,11 @@
 import junit.framework.TestSuite;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
+import org.apache.http.impl.nio.reactor.SessionInputBufferImpl;
 import org.apache.http.nio.mockup.ReadableByteChannelMockup;
+import org.apache.http.nio.reactor.SessionInputBuffer;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.HttpParams;
 
 /**
  * Simple tests for {@link LengthDelimitedDecoder}.
@@ -96,8 +99,9 @@
     public void testBasicDecoding() throws Exception {
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {"stuff;", "more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         LengthDelimitedDecoder decoder = new LengthDelimitedDecoder(
                 channel, inbuf, metrics, 16); 
@@ -126,8 +130,9 @@
                 new String[] {
                         "stuff;", 
                         "more stuff; and a lot more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         LengthDelimitedDecoder decoder = new LengthDelimitedDecoder(
                 channel, inbuf, metrics, 16); 
@@ -154,8 +159,9 @@
     public void testBasicDecodingSmallBuffer() throws Exception {
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {"stuff;", "more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         LengthDelimitedDecoder decoder = new LengthDelimitedDecoder(
                 channel, inbuf, metrics, 16); 
@@ -200,8 +206,9 @@
     public void testDecodingFromSessionBuffer1() throws Exception {
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {"stuff;", "more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256);
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         inbuf.fill(channel);
@@ -235,8 +242,9 @@
                 new String[] {
                         "stuff;", 
                         "more stuff; and a lot more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256);
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         inbuf.fill(channel);
@@ -264,8 +272,9 @@
     public void testBasicDecodingFile() throws Exception {
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {"stuff;", "more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         LengthDelimitedDecoder decoder = new LengthDelimitedDecoder(
                 channel, inbuf, metrics, 16); 
@@ -295,8 +304,9 @@
                 new String[] {
                         "stuff;", 
                         "more stuff; and a lot more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         LengthDelimitedDecoder decoder = new LengthDelimitedDecoder(
                 channel, inbuf, metrics, 16); 
@@ -324,8 +334,9 @@
     public void testInvalidConstructor() {
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {"stuff;", "more stuff"}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         try {
             new LengthDelimitedDecoder(null, null, null, 10);
@@ -357,8 +368,9 @@
         String s = "stuff";
         ReadableByteChannel channel = new ReadableByteChannelMockup(
                 new String[] {s}, "US-ASCII"); 
+        HttpParams params = new BasicHttpParams();
     
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256); 
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params); 
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         LengthDelimitedDecoder decoder = new LengthDelimitedDecoder(
                 channel, inbuf, metrics, 3);

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java Sat Jul 28 04:34:17 2007
@@ -45,7 +45,10 @@
 import junit.framework.TestSuite;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
+import org.apache.http.impl.nio.reactor.SessionOutputBufferImpl;
+import org.apache.http.nio.reactor.SessionOutputBuffer;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.HttpParams;
 import org.apache.http.util.EncodingUtils;
 
 /**
@@ -85,7 +88,8 @@
     public void testBasicCoding() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         LengthDelimitedEncoder encoder = new LengthDelimitedEncoder(
@@ -102,7 +106,8 @@
     public void testCodingBeyondContentLimit() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         LengthDelimitedEncoder encoder = new LengthDelimitedEncoder(
@@ -119,7 +124,8 @@
     public void testCodingEmptyBuffer() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         LengthDelimitedEncoder encoder = new LengthDelimitedEncoder(
@@ -142,7 +148,8 @@
     public void testCodingCompleted() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         LengthDelimitedEncoder encoder = new LengthDelimitedEncoder(
@@ -161,7 +168,8 @@
     public void testCodingBeyondContentLimitFromFile() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         LengthDelimitedEncoder encoder = new LengthDelimitedEncoder(
@@ -193,7 +201,8 @@
     public void testCodingEmptyFile() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         LengthDelimitedEncoder encoder = new LengthDelimitedEncoder(
@@ -225,7 +234,8 @@
     public void testCodingCompletedFromFile() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         LengthDelimitedEncoder encoder = new LengthDelimitedEncoder(
@@ -255,7 +265,8 @@
     public void testCodingFromFileSmaller() throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         LengthDelimitedEncoder encoder = new LengthDelimitedEncoder(
@@ -286,7 +297,8 @@
     public void testInvalidConstructor() {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
         WritableByteChannel channel = newChannel(baos);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
 
         try {

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java Sat Jul 28 04:34:17 2007
@@ -43,9 +43,9 @@
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
+import org.apache.http.nio.reactor.SessionInputBuffer;
+import org.apache.http.nio.reactor.SessionOutputBuffer;
 import org.apache.http.params.BasicHttpParams;
-import org.apache.http.impl.nio.reactor.SessionInputBuffer;
-import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
 import org.apache.http.util.CharArrayBuffer;
@@ -96,7 +96,8 @@
 
     public void testReadLineChunks() throws Exception {
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(16, 16);
+        HttpParams params = new BasicHttpParams();
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(16, 16, params);
         
         ReadableByteChannel channel = newChannel("One\r\nTwo\r\nThree");
         
@@ -134,8 +135,9 @@
     
     public void testWriteLineChunks() throws Exception {
         
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(16, 16);
-        SessionInputBuffer inbuf = new SessionInputBuffer(16, 16);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(16, 16, params);
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(16, 16, params);
         
         ReadableByteChannel inChannel = newChannel("One\r\nTwo\r\nThree");
         
@@ -201,7 +203,9 @@
         teststrs[3] = "";
         teststrs[4] = "And goodbye";
         
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 16); 
+        HttpParams params = new BasicHttpParams();
+        
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 16, params); 
         for (int i = 0; i < teststrs.length; i++) {
             outbuf.writeLine(teststrs[i]);
         }
@@ -215,7 +219,7 @@
 
         ReadableByteChannel channel = newChannel(outstream.toByteArray());
         
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 16);
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 16, params);
         inbuf.fill(channel);
         
         for (int i = 0; i < teststrs.length; i++) {
@@ -226,7 +230,9 @@
     }
 
     public void testComplexReadWriteLine() throws Exception {
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 16); 
+        HttpParams params = new BasicHttpParams();
+        
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 16, params); 
         outbuf.write(ByteBuffer.wrap(new byte[] {'a', '\n'}));
         outbuf.write(ByteBuffer.wrap(new byte[] {'\r', '\n'}));
         outbuf.write(ByteBuffer.wrap(new byte[] {'\r', '\r', '\n'}));
@@ -264,7 +270,7 @@
 
         ReadableByteChannel channel = newChannel(outstream.toByteArray());
 
-        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 16);
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 16, params);
         inbuf.fill(channel);
         
         assertEquals("a", inbuf.readLine(true));
@@ -286,7 +292,8 @@
             out[i] = (byte)('0' + i);
         }
         ReadableByteChannel channel = newChannel(out);        
-        SessionInputBuffer inbuf = new SessionInputBuffer(16, 16);
+        HttpParams params = new BasicHttpParams();
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(16, 16, params);
         while (inbuf.fill(channel) > 0) {
         }
 
@@ -323,11 +330,10 @@
         String s2 = constructString(RUSSIAN_HELLO);
         String s3 = "Like hello and stuff";
         
-        HttpParams params = new BasicHttpParams(null);
+        HttpParams params = new BasicHttpParams();
         HttpProtocolParams.setHttpElementCharset(params, "UTF-8");
         
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 16);
-        outbuf.reset(params);
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 16, params);
         
         for (int i = 0; i < 10; i++) {
             outbuf.writeLine(s1);
@@ -342,8 +348,7 @@
         byte[] tmp = outstream.toByteArray();
         
         ReadableByteChannel channel = newChannel(tmp);        
-        SessionInputBuffer inbuf = new SessionInputBuffer(16, 16);
-        inbuf.reset(params);
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(16, 16, params);
         
         while (inbuf.fill(channel) > 0) {
         }
@@ -356,8 +361,9 @@
     }
 
     public void testMalformedCharacters() throws Exception {
+        HttpParams params = new BasicHttpParams();
         String s1 = constructString(SWISS_GERMAN_HELLO);       
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 16);
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 16, params);
         try {
             outbuf.writeLine(s1);
             fail("Expected CharacterCodingException");
@@ -366,7 +372,7 @@
         
         byte[] tmp = s1.getBytes("ISO-8859-1");        
         ReadableByteChannel channel = newChannel(tmp);        
-        SessionInputBuffer inbuf = new SessionInputBuffer(16, 16);
+        SessionInputBuffer inbuf = new SessionInputBufferImpl(16, 16, params);
         while (inbuf.fill(channel) > 0) {
         }
         
@@ -378,8 +384,9 @@
     }
 
     public void testInputMatchesBufferLength() throws Exception {
+        HttpParams params = new BasicHttpParams();
         String s1 = "abcde";        
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 5);
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 5, params);
         outbuf.writeLine(s1);
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/mockup/MockupEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/mockup/MockupEncoder.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/mockup/MockupEncoder.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/mockup/MockupEncoder.java Sat Jul 28 04:34:17 2007
@@ -37,7 +37,7 @@
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
 import org.apache.http.impl.nio.codecs.AbstractContentEncoder;
-import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
+import org.apache.http.nio.reactor.SessionOutputBuffer;
 
 public class MockupEncoder extends AbstractContentEncoder {
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/util/TestBuffers.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/util/TestBuffers.java?view=diff&rev=560528&r1=560527&r2=560528
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/util/TestBuffers.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/util/TestBuffers.java Sat Jul 28 04:34:17 2007
@@ -42,12 +42,15 @@
 import junit.framework.TestSuite;
 
 import org.apache.http.impl.io.HttpTransportMetricsImpl;
-import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
+import org.apache.http.impl.nio.reactor.SessionOutputBufferImpl;
 import org.apache.http.nio.ContentDecoder;
 import org.apache.http.nio.ContentEncoder;
 import org.apache.http.nio.mockup.MockupDecoder;
 import org.apache.http.nio.mockup.MockupEncoder;
 import org.apache.http.nio.mockup.ReadableByteChannelMockup;
+import org.apache.http.nio.reactor.SessionOutputBuffer;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.HttpParams;
 import org.apache.http.util.EncodingUtils;
 
 /**
@@ -112,7 +115,8 @@
     public void testOutputBufferOperations() throws IOException {
         ByteArrayOutputStream outstream = new ByteArrayOutputStream();
         WritableByteChannel channel = Channels.newChannel(outstream);
-        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
+        HttpParams params = new BasicHttpParams();
+        SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, params);
         HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
         
         ContentEncoder encoder = new MockupEncoder(channel, outbuf, metrics);



Mime
View raw message