hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r560343 - in /jakarta/httpcomponents/httpcore/trunk: module-main/src/main/java/org/apache/http/impl/ module-main/src/main/java/org/apache/http/impl/entity/ module-main/src/main/java/org/apache/http/impl/io/ module-main/src/main/java/org/apa...
Date Fri, 27 Jul 2007 18:18:21 GMT
Author: olegk
Date: Fri Jul 27 11:18:19 2007
New Revision: 560343

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

Added:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionInputBuffer.java
      - copied, changed from r558338, jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/HttpDataReceiver.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionOutputBuffer.java
      - copied, changed from r558338, jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/HttpDataTransmitter.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionInputBuffer.java   (with props)
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionOutputBuffer.java   (with props)
Removed:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/HttpDataReceiver.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/HttpDataTransmitter.java
Modified:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/EntityDeserializer.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/EntitySerializer.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractHttpDataReceiver.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractHttpDataTransmitter.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/HttpDataInputStream.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/HttpDataOutputStream.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/util/HeaderUtils.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/io/TestChunkCoding.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/io/TestHttpDataInputStream.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/HttpDataTransmitterMockup.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/util/TestHeaderUtils.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java Fri Jul 27 11:18:19 2007
@@ -50,8 +50,8 @@
 import org.apache.http.impl.entity.EntitySerializer;
 import org.apache.http.impl.entity.LaxContentLengthStrategy;
 import org.apache.http.impl.entity.StrictContentLengthStrategy;
-import org.apache.http.io.HttpDataReceiver;
-import org.apache.http.io.HttpDataTransmitter;
+import org.apache.http.io.SessionInputBuffer;
+import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.message.BasicHeader;
 import org.apache.http.message.BasicRequestLine;
 import org.apache.http.message.BasicStatusLine;
@@ -64,7 +64,7 @@
 
 /**
  * Abstract client-side HTTP connection capable of transmitting and receiving data
- * using arbitrary {@link HttpDataReceiver} and {@link HttpDataTransmitter}
+ * using arbitrary {@link SessionInputBuffer} and {@link SessionOutputBuffer}
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
@@ -79,8 +79,8 @@
     private final EntityDeserializer entitydeserializer;
     private final HttpResponseFactory responsefactory;
     
-    private HttpDataReceiver datareceiver = null;
-    private HttpDataTransmitter datatransmitter = null;
+    private SessionInputBuffer inbuffer = null;
+    private SessionOutputBuffer outbuffer = null;
 
     private int maxHeaderCount = -1;
     private int maxLineLen = -1;
@@ -111,17 +111,17 @@
     }
 
     protected void init(
-            final HttpDataReceiver datareceiver,
-            final HttpDataTransmitter datatransmitter,
+            final SessionInputBuffer inbuffer,
+            final SessionOutputBuffer outbuffer,
             final HttpParams params) {
-        if (datareceiver == null) {
-            throw new IllegalArgumentException("HTTP data receiver may not be null");
+        if (inbuffer == null) {
+            throw new IllegalArgumentException("Input session buffer may not be null");
         }
-        if (datatransmitter == null) {
-            throw new IllegalArgumentException("HTTP data transmitter may not be null");
+        if (outbuffer == null) {
+            throw new IllegalArgumentException("Output session buffer may not be null");
         }
-        this.datareceiver = datareceiver;
-        this.datatransmitter = datatransmitter;
+        this.inbuffer = inbuffer;
+        this.outbuffer = outbuffer;
         this.maxHeaderCount = params.getIntParameter(
                 HttpConnectionParams.MAX_HEADER_COUNT, -1);
         this.maxLineLen = params.getIntParameter(
@@ -129,13 +129,13 @@
         this.maxGarbageLines = params.getIntParameter(
                 HttpConnectionParams.MAX_STATUS_LINE_GARBAGE, Integer.MAX_VALUE);
         this.metrics = new HttpConnectionMetricsImpl(
-                datareceiver.getMetrics(),
-                datatransmitter.getMetrics());
+                inbuffer.getMetrics(),
+                outbuffer.getMetrics());
     }
     
     public boolean isResponseAvailable(int timeout) throws IOException {
         assertOpen();
-        return this.datareceiver.isDataAvailable(timeout);
+        return this.inbuffer.isDataAvailable(timeout);
     }
 
     public void sendRequestHeader(final HttpRequest request) 
@@ -159,13 +159,13 @@
             return;
         }
         this.entityserializer.serialize(
-                this.datatransmitter,
+                this.outbuffer,
                 request,
                 request.getEntity());
     }
 
     protected void doFlush() throws IOException {
-        this.datatransmitter.flush();
+        this.outbuffer.flush();
     }
     
     public void flush() throws IOException {
@@ -177,7 +177,7 @@
             throws HttpException, IOException {
         this.buffer.clear();
         BasicRequestLine.format(this.buffer, request.getRequestLine());
-        this.datatransmitter.writeLine(this.buffer);
+        this.outbuffer.writeLine(this.buffer);
     }
 
     protected void sendRequestHeaders(final HttpRequest request) 
@@ -186,15 +186,15 @@
             Header header = (Header) it.next();
             if (header instanceof BufferedHeader) {
                 // If the header is backed by a buffer, re-use the buffer
-                this.datatransmitter.writeLine(((BufferedHeader)header).getBuffer());
+                this.outbuffer.writeLine(((BufferedHeader)header).getBuffer());
             } else {
                 this.buffer.clear();
                 BasicHeader.format(this.buffer, header);
-                this.datatransmitter.writeLine(this.buffer);
+                this.outbuffer.writeLine(this.buffer);
             }
         }
         this.buffer.clear();
-        this.datatransmitter.writeLine(this.buffer);
+        this.outbuffer.writeLine(this.buffer);
     }
 
     public HttpResponse receiveResponseHeader() 
@@ -214,7 +214,7 @@
             throw new IllegalArgumentException("HTTP response may not be null");
         }
         assertOpen();
-        HttpEntity entity = this.entitydeserializer.deserialize(this.datareceiver, response);
+        HttpEntity entity = this.entitydeserializer.deserialize(this.inbuffer, response);
         response.setEntity(entity);
     }
     
@@ -246,7 +246,7 @@
         //read out the HTTP status string
         int count = 0;
         do {
-            int i = this.datareceiver.readLine(this.buffer);
+            int i = this.inbuffer.readLine(this.buffer);
             if (i == -1 && count == 0) {
                 // The server just dropped connection on us
                 throw new NoHttpResponseException("The target server failed to respond");
@@ -269,7 +269,7 @@
     protected void readResponseHeaders(final HttpResponse response) 
             throws HttpException, IOException {
         Header[] headers = HeaderUtils.parseHeaders(
-                this.datareceiver, 
+                this.inbuffer, 
                 this.maxHeaderCount,
                 this.maxLineLen);
         response.setHeaders(headers);
@@ -278,7 +278,7 @@
     public boolean isStale() {
         assertOpen();
         try {
-            this.datareceiver.isDataAvailable(1);
+            this.inbuffer.isDataAvailable(1);
             return false;
         } catch (IOException ex) {
             return true;

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java Fri Jul 27 11:18:19 2007
@@ -49,8 +49,8 @@
 import org.apache.http.impl.entity.EntitySerializer;
 import org.apache.http.impl.entity.LaxContentLengthStrategy;
 import org.apache.http.impl.entity.StrictContentLengthStrategy;
-import org.apache.http.io.HttpDataReceiver;
-import org.apache.http.io.HttpDataTransmitter;
+import org.apache.http.io.SessionInputBuffer;
+import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.message.BasicHeader;
 import org.apache.http.message.BasicRequestLine;
 import org.apache.http.message.BasicStatusLine;
@@ -62,7 +62,7 @@
 
 /**
  * Abstract server-side HTTP connection capable of transmitting and receiving data
- * using arbitrary {@link HttpDataReceiver} and {@link HttpDataTransmitter}
+ * using arbitrary {@link SessionInputBuffer} and {@link SessionOutputBuffer}
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
@@ -77,8 +77,8 @@
     private final EntityDeserializer entitydeserializer;
     private final HttpRequestFactory requestfactory; 
     
-    private HttpDataReceiver datareceiver = null;
-    private HttpDataTransmitter datatransmitter = null;
+    private SessionInputBuffer inbuffer = null;
+    private SessionOutputBuffer outbuffer = null;
 
     private int maxHeaderCount = -1;
     private int maxLineLen = -1;
@@ -108,24 +108,24 @@
     }
 
     protected void init(
-            final HttpDataReceiver datareceiver,
-            final HttpDataTransmitter datatransmitter,
+            final SessionInputBuffer inbuffer,
+            final SessionOutputBuffer outbuffer,
             final HttpParams params) {
-        if (datareceiver == null) {
-            throw new IllegalArgumentException("HTTP data receiver may not be null");
+        if (inbuffer == null) {
+            throw new IllegalArgumentException("Input session buffer may not be null");
         }
-        if (datatransmitter == null) {
-            throw new IllegalArgumentException("HTTP data transmitter may not be null");
+        if (outbuffer == null) {
+            throw new IllegalArgumentException("Output session buffer may not be null");
         }
-        this.datareceiver = datareceiver;
-        this.datatransmitter = datatransmitter;
+        this.inbuffer = inbuffer;
+        this.outbuffer = outbuffer;
         this.maxHeaderCount = params.getIntParameter(
                 HttpConnectionParams.MAX_HEADER_COUNT, -1);
         this.maxLineLen = params.getIntParameter(
                 HttpConnectionParams.MAX_LINE_LENGTH, -1);
         this.metrics = new HttpConnectionMetricsImpl(
-                datareceiver.getMetrics(),
-                datatransmitter.getMetrics());
+                inbuffer.getMetrics(),
+                outbuffer.getMetrics());
     }
     
     public HttpRequest receiveRequestHeader() 
@@ -143,14 +143,14 @@
             throw new IllegalArgumentException("HTTP request may not be null");
         }
         assertOpen();
-        HttpEntity entity = this.entitydeserializer.deserialize(this.datareceiver, request);
+        HttpEntity entity = this.entitydeserializer.deserialize(this.inbuffer, request);
         request.setEntity(entity);
     }
 
     protected HttpRequest receiveRequestLine()
             throws HttpException, IOException {
         this.buffer.clear();
-        int i = this.datareceiver.readLine(this.buffer);
+        int i = this.inbuffer.readLine(this.buffer);
         if (i == -1) {
             throw new ConnectionClosedException("Client closed connection"); 
         }
@@ -161,14 +161,14 @@
     protected void receiveRequestHeaders(final HttpRequest request) 
             throws HttpException, IOException {
         Header[] headers = HeaderUtils.parseHeaders(
-                this.datareceiver, 
+                this.inbuffer, 
                 this.maxHeaderCount,
                 this.maxLineLen);
         request.setHeaders(headers);
     }
 
     protected void doFlush() throws IOException  {
-        this.datatransmitter.flush();
+        this.outbuffer.flush();
     }
     
     public void flush() throws IOException {
@@ -195,7 +195,7 @@
             return;
         }
         this.entityserializer.serialize(
-                this.datatransmitter,
+                this.outbuffer,
                 response,
                 response.getEntity());
     }
@@ -204,7 +204,7 @@
             throws HttpException, IOException {
         this.buffer.clear();
         BasicStatusLine.format(this.buffer, response.getStatusLine());
-        this.datatransmitter.writeLine(this.buffer);
+        this.outbuffer.writeLine(this.buffer);
     }
 
     protected void sendResponseHeaders(final HttpResponse response) 
@@ -213,21 +213,21 @@
             Header header = (Header) it.next();
             if (header instanceof BufferedHeader) {
                 // If the header is backed by a buffer, re-use the buffer
-                this.datatransmitter.writeLine(((BufferedHeader)header).getBuffer());
+                this.outbuffer.writeLine(((BufferedHeader)header).getBuffer());
             } else {
                 this.buffer.clear();
                 BasicHeader.format(this.buffer, header);
-                this.datatransmitter.writeLine(this.buffer);
+                this.outbuffer.writeLine(this.buffer);
             }
         }
         this.buffer.clear();
-        this.datatransmitter.writeLine(this.buffer);
+        this.outbuffer.writeLine(this.buffer);
     }
         
     public boolean isStale() {
         assertOpen();
         try {
-            this.datareceiver.isDataAvailable(1);
+            this.inbuffer.isDataAvailable(1);
             return false;
         } catch (IOException ex) {
             return true;

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java Fri Jul 27 11:18:19 2007
@@ -39,8 +39,8 @@
 import org.apache.http.HttpInetConnection;
 import org.apache.http.impl.io.SocketHttpDataReceiver;
 import org.apache.http.impl.io.SocketHttpDataTransmitter;
-import org.apache.http.io.HttpDataReceiver;
-import org.apache.http.io.HttpDataTransmitter;
+import org.apache.http.io.SessionInputBuffer;
+import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
 
@@ -76,14 +76,14 @@
         }
     }
 
-    protected HttpDataReceiver createHttpDataReceiver(
+    protected SessionInputBuffer createSessionInputBuffer(
             final Socket socket, 
             int buffersize,
             final HttpParams params) throws IOException {
         return new SocketHttpDataReceiver(socket, buffersize, params);
     }
     
-    protected HttpDataTransmitter createHttpDataTransmitter(
+    protected SessionOutputBuffer createSessionOutputBuffer(
             final Socket socket, 
             int buffersize,
             final HttpParams params) throws IOException {
@@ -112,8 +112,8 @@
         int buffersize = HttpConnectionParams.getSocketBufferSize(params);
 
         init(
-                createHttpDataReceiver(socket, buffersize, params), 
-                createHttpDataTransmitter(socket, buffersize, params),
+                createSessionInputBuffer(socket, buffersize, params), 
+                createSessionOutputBuffer(socket, buffersize, params),
                 params);
         
         this.open = true;

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java Fri Jul 27 11:18:19 2007
@@ -39,8 +39,8 @@
 import org.apache.http.HttpInetConnection;
 import org.apache.http.impl.io.SocketHttpDataReceiver;
 import org.apache.http.impl.io.SocketHttpDataTransmitter;
-import org.apache.http.io.HttpDataReceiver;
-import org.apache.http.io.HttpDataTransmitter;
+import org.apache.http.io.SessionInputBuffer;
+import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
 
@@ -76,14 +76,14 @@
         }
     }
     
-    protected HttpDataReceiver createHttpDataReceiver(
+    protected SessionInputBuffer createHttpDataReceiver(
             final Socket socket, 
             int buffersize,
             final HttpParams params) throws IOException {
         return new SocketHttpDataReceiver(socket, buffersize, params);
     }
     
-    protected HttpDataTransmitter createHttpDataTransmitter(
+    protected SessionOutputBuffer createHttpDataTransmitter(
             final Socket socket, 
             int buffersize,
             final HttpParams params) throws IOException {

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/EntityDeserializer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/EntityDeserializer.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/EntityDeserializer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/EntityDeserializer.java Fri Jul 27 11:18:19 2007
@@ -42,7 +42,7 @@
 import org.apache.http.impl.io.ChunkedInputStream;
 import org.apache.http.impl.io.ContentLengthInputStream;
 import org.apache.http.impl.io.HttpDataInputStream;
-import org.apache.http.io.HttpDataReceiver;
+import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.protocol.HTTP;
 
 /**
@@ -70,30 +70,23 @@
     }
 
     protected BasicHttpEntity doDeserialize(
-            final HttpDataReceiver datareceiver,
+            final SessionInputBuffer inbuffer,
             final HttpMessage message) throws HttpException, IOException {
-        if (datareceiver == null) {
-            throw new IllegalArgumentException("HTTP data receiver may not be null");
-        }
-        if (message == null) {
-            throw new IllegalArgumentException("HTTP message may not be null");
-        }
-
         BasicHttpEntity entity = new BasicHttpEntity();
         
         long len = this.lenStrategy.determineLength(message);
         if (len == ContentLengthStrategy.CHUNKED) {
             entity.setChunked(true);
             entity.setContentLength(-1);
-            entity.setContent(new ChunkedInputStream(datareceiver));
+            entity.setContent(new ChunkedInputStream(inbuffer));
         } else if (len == ContentLengthStrategy.IDENTITY) {
             entity.setChunked(false);
             entity.setContentLength(-1);
-            entity.setContent(new HttpDataInputStream(datareceiver));                            
+            entity.setContent(new HttpDataInputStream(inbuffer));                            
         } else {
             entity.setChunked(false);
             entity.setContentLength(len);
-            entity.setContent(new ContentLengthInputStream(datareceiver, len));
+            entity.setContent(new ContentLengthInputStream(inbuffer, len));
         }
         
         Header contentTypeHeader = message.getFirstHeader(HTTP.CONTENT_TYPE);
@@ -108,9 +101,15 @@
     }
         
     public HttpEntity deserialize(
-            final HttpDataReceiver datareceiver,
+            final SessionInputBuffer inbuffer,
             final HttpMessage message) throws HttpException, IOException {
-        return doDeserialize(datareceiver, message);
+        if (inbuffer == null) {
+            throw new IllegalArgumentException("Session input buffer may not be null");
+        }
+        if (message == null) {
+            throw new IllegalArgumentException("HTTP message may not be null");
+        }
+        return doDeserialize(inbuffer, message);
     }
     
 }

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/EntitySerializer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/EntitySerializer.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/EntitySerializer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/EntitySerializer.java Fri Jul 27 11:18:19 2007
@@ -41,7 +41,7 @@
 import org.apache.http.impl.io.ChunkedOutputStream;
 import org.apache.http.impl.io.ContentLengthOutputStream;
 import org.apache.http.impl.io.IdentityOutputStream;
-import org.apache.http.io.HttpDataTransmitter;
+import org.apache.http.io.SessionOutputBuffer;
 
 /**
  * Default implementation of an entity serializer.
@@ -68,24 +68,24 @@
     }
 
     protected OutputStream doSerialize(
-            final HttpDataTransmitter datatransmitter,
+            final SessionOutputBuffer outbuffer,
             final HttpMessage message) throws HttpException, IOException {
         long len = this.lenStrategy.determineLength(message);
         if (len == ContentLengthStrategy.CHUNKED) {
-            return new ChunkedOutputStream(datatransmitter);
+            return new ChunkedOutputStream(outbuffer);
         } else if (len == ContentLengthStrategy.IDENTITY) {
-            return new IdentityOutputStream(datatransmitter);
+            return new IdentityOutputStream(outbuffer);
         } else {
-            return new ContentLengthOutputStream(datatransmitter, len);
+            return new ContentLengthOutputStream(outbuffer, len);
         }
     }
 
     public void serialize(
-            final HttpDataTransmitter datatransmitter,
+            final SessionOutputBuffer outbuffer,
             final HttpMessage message,
             final HttpEntity entity) throws HttpException, IOException {
-        if (datatransmitter == null) {
-            throw new IllegalArgumentException("HTTP data transmitter may not be null");
+        if (outbuffer == null) {
+            throw new IllegalArgumentException("Session output buffer may not be null");
         }
         if (message == null) {
             throw new IllegalArgumentException("HTTP message may not be null");
@@ -93,7 +93,7 @@
         if (entity == null) {
             throw new IllegalArgumentException("HTTP entity may not be null");
         }
-        OutputStream outstream = doSerialize(datatransmitter, message);
+        OutputStream outstream = doSerialize(outbuffer, message);
         entity.writeTo(outstream);
         outstream.close();
     }

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractHttpDataReceiver.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractHttpDataReceiver.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractHttpDataReceiver.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractHttpDataReceiver.java Fri Jul 27 11:18:19 2007
@@ -34,7 +34,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.http.io.HttpDataReceiver;
+import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.io.HttpTransportMetrics;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
@@ -49,7 +49,7 @@
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
  */
-public abstract class AbstractHttpDataReceiver implements HttpDataReceiver {
+public abstract class AbstractHttpDataReceiver implements SessionInputBuffer {
 
     private InputStream instream;
     private byte[] buffer;

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractHttpDataTransmitter.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractHttpDataTransmitter.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractHttpDataTransmitter.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractHttpDataTransmitter.java Fri Jul 27 11:18:19 2007
@@ -34,7 +34,7 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.http.io.HttpDataTransmitter;
+import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.io.HttpTransportMetrics;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
@@ -48,7 +48,7 @@
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
  */
-public abstract class AbstractHttpDataTransmitter implements HttpDataTransmitter {
+public abstract class AbstractHttpDataTransmitter implements SessionOutputBuffer {
 
     private static final byte[] CRLF = new byte[] {HTTP.CR, HTTP.LF};
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java Fri Jul 27 11:18:19 2007
@@ -37,7 +37,7 @@
 import org.apache.http.Header;
 import org.apache.http.HttpException;
 import org.apache.http.MalformedChunkCodingException;
-import org.apache.http.io.HttpDataReceiver;
+import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.protocol.HTTP;
 import org.apache.http.util.CharArrayBuffer;
 import org.apache.http.util.ExceptionUtils;
@@ -71,8 +71,8 @@
  */
 public class ChunkedInputStream extends InputStream {
 
-    /** The data receiver that we're wrapping */
-    private HttpDataReceiver in;
+    /** The session input buffer */
+    private SessionInputBuffer in;
 
     private final CharArrayBuffer buffer;
     
@@ -93,10 +93,10 @@
     
     private Header[] footers = new Header[] {};
 
-    public ChunkedInputStream(final HttpDataReceiver in) {
+    public ChunkedInputStream(final SessionInputBuffer in) {
         super();
         if (in == null) {
-            throw new IllegalArgumentException("InputStream parameter may not be null");
+            throw new IllegalArgumentException("Session input buffer may not be null");
         }
         this.in = in;
         this.pos = 0;

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ChunkedOutputStream.java Fri Jul 27 11:18:19 2007
@@ -34,7 +34,7 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.http.io.HttpDataTransmitter;
+import org.apache.http.io.SessionOutputBuffer;
 
 /**
  * Implements chunked transfer coding.
@@ -52,7 +52,7 @@
 public class ChunkedOutputStream extends OutputStream {
 
     // ----------------------------------------------------- Instance Variables
-    private final HttpDataTransmitter out;
+    private final SessionOutputBuffer out;
 
     private byte[] cache;
 
@@ -65,12 +65,12 @@
     
     // ----------------------------------------------------------- Constructors
     /**
-     * Wraps a stream and chunks the output.
-     * @param out the transmitter to wrap
+     * Wraps a session output buffer and chunks the output.
+     * @param out the session output buffer to wrap
      * @param bufferSize minimum chunk size (excluding last chunk)
      * @throws IOException
      */
-    public ChunkedOutputStream(final HttpDataTransmitter out, int bufferSize)
+    public ChunkedOutputStream(final SessionOutputBuffer out, int bufferSize)
             throws IOException {
         super();
         this.cache = new byte[bufferSize];
@@ -78,14 +78,14 @@
     }
 
     /**
-     * Wraps a data transmitter and chunks the output. The default buffer size of 2048 was 
-     * chosen because the chunk overhead is less than 0.5%
+     * Wraps a session output buffer and chunks the output. The default buffer 
+     * size of 2048 was chosen because the chunk overhead is less than 0.5%
      * @param datatransmitter the transmitter to wrap
      * @throws IOException
      */
-    public ChunkedOutputStream(final HttpDataTransmitter datatransmitter) 
+    public ChunkedOutputStream(final SessionOutputBuffer out) 
             throws IOException {
-        this(datatransmitter, 2048);
+        this(out, 2048);
     }
 
     // ----------------------------------------------------------- Internal methods

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java Fri Jul 27 11:18:19 2007
@@ -34,7 +34,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.http.io.HttpDataReceiver;
+import org.apache.http.io.SessionInputBuffer;
 
 /**
  * Stream that cuts off after a specified number of bytes.
@@ -86,16 +86,16 @@
     /**
      * Wrapped input stream that all calls are delegated to.
      */
-    private HttpDataReceiver in = null;
+    private SessionInputBuffer in = null;
 
     /**
      * Creates a new length limited stream
      *
-     * @param in The stream to wrap
+     * @param in The session input buffer to wrap
      * @param contentLength The maximum number of bytes that can be read from
      * the stream. Subsequent read operations will return -1.
      */
-    public ContentLengthInputStream(final HttpDataReceiver in, long contentLength) {
+    public ContentLengthInputStream(final SessionInputBuffer in, long contentLength) {
         super();
         if (in == null) {
             throw new IllegalArgumentException("Input stream may not be null");

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ContentLengthOutputStream.java Fri Jul 27 11:18:19 2007
@@ -34,7 +34,7 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.http.io.HttpDataTransmitter;
+import org.apache.http.io.SessionOutputBuffer;
 
 /**
  * A stream wrapper that closes itself after a defined number of bytes.
@@ -48,9 +48,9 @@
 public class ContentLengthOutputStream extends OutputStream {
     
     /**
-     * Wrapped data transmitter that all calls are delegated to.
+     * Wrapped session outbut buffer.
      */
-    private final HttpDataTransmitter out;
+    private final SessionOutputBuffer out;
 
     /**
      * The maximum number of bytes that can be written the stream. Subsequent
@@ -73,10 +73,10 @@
      * 
      * @since 4.0
      */
-    public ContentLengthOutputStream(final HttpDataTransmitter out, long contentLength) {
+    public ContentLengthOutputStream(final SessionOutputBuffer out, long contentLength) {
         super();
         if (out == null) {
-            throw new IllegalArgumentException("HTTP data transmitter may not be null");
+            throw new IllegalArgumentException("Session output buffer may not be null");
         }
         if (contentLength < 0) {
             throw new IllegalArgumentException("Content length may not be negative");

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/HttpDataInputStream.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/HttpDataInputStream.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/HttpDataInputStream.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/HttpDataInputStream.java Fri Jul 27 11:18:19 2007
@@ -34,10 +34,10 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.http.io.HttpDataReceiver;
+import org.apache.http.io.SessionInputBuffer;
 
 /**
- * A stream for reading from a {@link HttpDataReceiver HttpDataReceiver}.
+ * A stream for reading from a {@link SessionInputBuffer session input buffer}.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
@@ -47,20 +47,20 @@
  */
 public class HttpDataInputStream extends InputStream {
     
-    private final HttpDataReceiver datareceiver;
+    private final SessionInputBuffer in;
     
     private boolean closed = false;
     
-    public HttpDataInputStream(final HttpDataReceiver datareceiver) {
+    public HttpDataInputStream(final SessionInputBuffer in) {
         super();
-        if (datareceiver == null) {
-            throw new IllegalArgumentException("HTTP data receiver may not be null");
+        if (in == null) {
+            throw new IllegalArgumentException("Session input buffer may not be null");
         }
-        this.datareceiver = datareceiver;
+        this.in = in;
     }
     
     public int available() throws IOException {
-        if (!this.closed && this.datareceiver.isDataAvailable(10)) {
+        if (!this.closed && this.in.isDataAvailable(10)) {
             return 1;
         } else {
             return 0;
@@ -75,7 +75,7 @@
         if (this.closed) {
             return -1;
         } else {
-            return this.datareceiver.read();
+            return this.in.read();
         }
     }
     
@@ -83,7 +83,7 @@
         if (this.closed) {
             return -1;
         } else {
-            return this.datareceiver.read(b, off, len);
+            return this.in.read(b, off, len);
         }
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/HttpDataOutputStream.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/HttpDataOutputStream.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/HttpDataOutputStream.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/HttpDataOutputStream.java Fri Jul 27 11:18:19 2007
@@ -34,10 +34,10 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.http.io.HttpDataTransmitter;
+import org.apache.http.io.SessionOutputBuffer;
 
 /**
- * A stream for writing to a {@link HttpDataTransmitter HttpDataTransmitter}.
+ * A stream for writing to a {@link SessionOutputBuffer session output buffer}.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
@@ -47,22 +47,22 @@
  */
 public class HttpDataOutputStream extends OutputStream {
     
-    private final HttpDataTransmitter datatransmitter;
+    private final SessionOutputBuffer out;
     
     private boolean closed = false;
     
-    public HttpDataOutputStream(final HttpDataTransmitter datatransmitter) {
+    public HttpDataOutputStream(final SessionOutputBuffer out) {
         super();
-        if (datatransmitter == null) {
-            throw new IllegalArgumentException("HTTP data transmitter may not be null");
+        if (out == null) {
+            throw new IllegalArgumentException("Session output buffer may not be null");
         }
-        this.datatransmitter = datatransmitter;
+        this.out = out;
     }
     
     public void close() throws IOException {
         if (!this.closed) {
             this.closed = true;
-            this.datatransmitter.flush();
+            this.out.flush();
         }
     }
 
@@ -74,16 +74,16 @@
     
     public void flush() throws IOException {
         assertNotClosed();
-        this.datatransmitter.flush();
+        this.out.flush();
     }
     
     public void write(final byte[] b, int off, int len) throws IOException {
         assertNotClosed();
-        this.datatransmitter.write(b, off, len);
+        this.out.write(b, off, len);
     }
     
     public void write(int b) throws IOException {
         assertNotClosed();
-        this.datatransmitter.write(b);
+        this.out.write(b);
     }
 }

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/IdentityOutputStream.java Fri Jul 27 11:18:19 2007
@@ -34,7 +34,7 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.http.io.HttpDataTransmitter;
+import org.apache.http.io.SessionOutputBuffer;
 
 /**
  * A stream for writing with an "identity" transport encoding.
@@ -48,17 +48,17 @@
 public class IdentityOutputStream extends OutputStream {
     
     /**
-     * Wrapped data transmitter that all calls are delegated to.
+     * Wrapped session output buffer.
      */
-    private final HttpDataTransmitter out;
+    private final SessionOutputBuffer out;
 
     /** True if the stream is closed. */
     private boolean closed = false;
 
-    public IdentityOutputStream(final HttpDataTransmitter out) {
+    public IdentityOutputStream(final SessionOutputBuffer out) {
         super();
         if (out == null) {
-            throw new IllegalArgumentException("HTTP data transmitter may not be null");
+            throw new IllegalArgumentException("Session output buffer may not be null");
         }
         this.out = out;
     }

Copied: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionInputBuffer.java (from r558338, jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/HttpDataReceiver.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=560343&p1=jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/HttpDataReceiver.java&r1=558338&p2=jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionInputBuffer.java&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/HttpDataReceiver.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionInputBuffer.java Fri Jul 27 11:18:19 2007
@@ -36,9 +36,7 @@
 import org.apache.http.util.CharArrayBuffer;
 
 /**
- * Interface for receiving data.
- * Unlike {@link java.io.InputStream}, this interface is tailored
- * to the needs of the HTTP components.
+ * Session input buffer for blocking connection.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
@@ -46,7 +44,7 @@
  * 
  * @since 4.0
  */
-public interface HttpDataReceiver {
+public interface SessionInputBuffer {
     
     int read(byte[] b, int off, int len) throws IOException; 
     

Copied: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionOutputBuffer.java (from r558338, jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/HttpDataTransmitter.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=560343&p1=jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/HttpDataTransmitter.java&r1=558338&p2=jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionOutputBuffer.java&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/HttpDataTransmitter.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/SessionOutputBuffer.java Fri Jul 27 11:18:19 2007
@@ -36,9 +36,7 @@
 import org.apache.http.util.CharArrayBuffer;
 
 /**
- * Interface for sending data.
- * Unlike {@link java.io.OutputStream}, this interface is tailored
- * to the needs of the HTTP components.
+ * Session output buffer for blocking connection.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
@@ -46,7 +44,7 @@
  * 
  * @since 4.0
  */
-public interface HttpDataTransmitter {
+public interface SessionOutputBuffer {
 
     void write(byte[] b, int off, int len) throws IOException;
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/util/HeaderUtils.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/util/HeaderUtils.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/util/HeaderUtils.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/util/HeaderUtils.java Fri Jul 27 11:18:19 2007
@@ -37,7 +37,7 @@
 import org.apache.http.Header;
 import org.apache.http.HttpException;
 import org.apache.http.ProtocolException;
-import org.apache.http.io.HttpDataReceiver;
+import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.message.BufferedHeader;
 
 /**
@@ -56,7 +56,7 @@
      * Parses HTTP headers from the data receiver stream according to the generic 
      * format as given in Section 3.1 of RFC 822, RFC-2616 Section 4 and 19.3.
      *  
-     * @param datareceiver HTTP data receiver
+     * @param inbuffer Session input buffer
      * @param maxHeaderCount maximum number of headers allowed. If the number
      *  of headers received from the data stream exceeds maxCount value, an
      *  IOException will be thrown. Setting this parameter to a negative value
@@ -69,11 +69,11 @@
      * @throws IOException
      */
     public static Header[] parseHeaders(
-            final HttpDataReceiver datareceiver,
+            final SessionInputBuffer inbuffer,
             int maxHeaderCount,
             int maxLineLen) throws HttpException, IOException {
-        if (datareceiver == null) {
-            throw new IllegalArgumentException("HTTP data receiver may not be null");
+        if (inbuffer == null) {
+            throw new IllegalArgumentException("Session input buffer may not be null");
         }
         ArrayList headerLines = new ArrayList();
 
@@ -85,7 +85,7 @@
             } else {
                 current.clear();
             }
-            int l = datareceiver.readLine(current);
+            int l = inbuffer.readLine(current);
             if (l == -1 || current.length() < 1) {
                 break;
             }
@@ -131,7 +131,7 @@
         return headers;
     }
 
-    public static Header[] parseHeaders(final HttpDataReceiver datareceiver) 
+    public static Header[] parseHeaders(final SessionInputBuffer datareceiver) 
         throws HttpException, IOException {
         return parseHeaders(datareceiver, -1, -1);
     }

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java Fri Jul 27 11:18:19 2007
@@ -42,7 +42,7 @@
 import org.apache.http.impl.io.ChunkedInputStream;
 import org.apache.http.impl.io.ContentLengthInputStream;
 import org.apache.http.impl.io.HttpDataInputStream;
-import org.apache.http.io.HttpDataReceiver;
+import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.mockup.HttpDataReceiverMockup;
 import org.apache.http.mockup.HttpMessageMockup;
 import org.apache.http.params.HttpProtocolParams;
@@ -83,7 +83,7 @@
     }
 
     public void testEntityWithTransferEncoding() throws Exception {
-        HttpDataReceiver datareceiver = new HttpDataReceiverMockup("0\r\n", "US-ASCII");
+        SessionInputBuffer datareceiver = new HttpDataReceiverMockup("0\r\n", "US-ASCII");
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
@@ -109,7 +109,7 @@
     }
 
     public void testEntityWithIdentityTransferEncoding() throws Exception {
-        HttpDataReceiver datareceiver = 
+        SessionInputBuffer datareceiver = 
         	new HttpDataReceiverMockup(new byte[] {});
         HttpMessage message = new HttpMessageMockup();
         
@@ -127,7 +127,7 @@
     }
 
     public void testEntityWithUnsupportedTransferEncoding() throws Exception {
-        HttpDataReceiver datareceiver = new HttpDataReceiverMockup("0\r\n", "US-ASCII");
+        SessionInputBuffer datareceiver = new HttpDataReceiverMockup("0\r\n", "US-ASCII");
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
@@ -154,7 +154,7 @@
     }
 
     public void testChunkedTransferEncodingMustBeLast() throws Exception {
-        HttpDataReceiver datareceiver = new HttpDataReceiverMockup("0\r\n", "US-ASCII");
+        SessionInputBuffer datareceiver = new HttpDataReceiverMockup("0\r\n", "US-ASCII");
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
@@ -181,7 +181,7 @@
     }
 
     public void testEntityWithContentLength() throws Exception {
-        HttpDataReceiver datareceiver = new HttpDataReceiverMockup(new byte[] {});
+        SessionInputBuffer datareceiver = new HttpDataReceiverMockup(new byte[] {});
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
@@ -198,7 +198,7 @@
     }
 
     public void testEntityWithMultipleContentLength() throws Exception {
-        HttpDataReceiver datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
+        SessionInputBuffer datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
@@ -228,7 +228,7 @@
     }
     
     public void testEntityWithMultipleContentLengthSomeWrong() throws Exception {
-        HttpDataReceiver datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
+        SessionInputBuffer datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
@@ -258,7 +258,7 @@
     }
     
     public void testEntityWithMultipleContentLengthAllWrong() throws Exception {
-        HttpDataReceiver datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
+        SessionInputBuffer datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
@@ -288,7 +288,7 @@
     }
 
     public void testEntityWithInvalidContentLength() throws Exception {
-        HttpDataReceiver datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
+        SessionInputBuffer datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
@@ -317,7 +317,7 @@
     }
 
     public void testEntityNeitherContentLengthNorTransferEncoding() throws Exception {
-        HttpDataReceiver datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
+        SessionInputBuffer datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
@@ -336,7 +336,7 @@
     }
 
     public void testEntityContentType() throws Exception {
-        HttpDataReceiver datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
+        SessionInputBuffer datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
         HttpMessage message = new HttpMessageMockup();
 
         message.addHeader("Content-Type", "stuff");
@@ -349,7 +349,7 @@
     }
 
     public void testEntityContentEncoding() throws Exception {
-        HttpDataReceiver datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
+        SessionInputBuffer datareceiver = new HttpDataReceiverMockup(new byte[] {'0'});
         HttpMessage message = new HttpMessageMockup();
 
         message.addHeader("Content-Encoding", "what not");

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java Fri Jul 27 11:18:19 2007
@@ -43,7 +43,7 @@
 import org.apache.http.impl.io.ChunkedOutputStream;
 import org.apache.http.impl.io.ContentLengthOutputStream;
 import org.apache.http.impl.io.IdentityOutputStream;
-import org.apache.http.io.HttpDataTransmitter;
+import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.mockup.HttpDataTransmitterMockup;
 import org.apache.http.mockup.HttpMessageMockup;
 import org.apache.http.params.HttpProtocolParams;
@@ -90,7 +90,7 @@
     }
 
     public void testEntityWithChunkTransferEncoding() throws Exception {
-        HttpDataTransmitter datatransmitter = new HttpDataTransmitterMockup();
+        SessionOutputBuffer datatransmitter = new HttpDataTransmitterMockup();
         HttpMessage message = new HttpMessageMockup();
         message.addHeader("Transfer-Encoding", "Chunked");
 
@@ -102,7 +102,7 @@
     }
 
     public void testEntityWithIdentityTransferEncoding() throws Exception {
-        HttpDataTransmitter datatransmitter = new HttpDataTransmitterMockup();
+        SessionOutputBuffer datatransmitter = new HttpDataTransmitterMockup();
         HttpMessage message = new HttpMessageMockup();
         message.addHeader("Transfer-Encoding", "Identity");
 
@@ -114,7 +114,7 @@
     }
     
     public void testEntityWithInvalidTransferEncoding() throws Exception {
-        HttpDataTransmitter datatransmitter = new HttpDataTransmitterMockup();
+        SessionOutputBuffer datatransmitter = new HttpDataTransmitterMockup();
         HttpMessage message = new HttpMessageMockup();
         message.addHeader("Transfer-Encoding", "whatever");
 
@@ -129,7 +129,7 @@
     }
     
     public void testEntityWithInvalidChunkEncodingAndHTTP10() throws Exception {
-        HttpDataTransmitter datatransmitter = new HttpDataTransmitterMockup();
+        SessionOutputBuffer datatransmitter = new HttpDataTransmitterMockup();
         HttpMessage message = new HttpMessageMockup();
         message.getParams().setParameter(HttpProtocolParams.PROTOCOL_VERSION, 
                 HttpVersion.HTTP_1_0);
@@ -146,7 +146,7 @@
     }
     
     public void testEntityWithContentLength() throws Exception {
-        HttpDataTransmitter datatransmitter = new HttpDataTransmitterMockup();
+        SessionOutputBuffer datatransmitter = new HttpDataTransmitterMockup();
         HttpMessage message = new HttpMessageMockup();
         message.addHeader("Content-Length", "100");
         EntitySerializer entitywriter = new EntitySerializer(
@@ -157,7 +157,7 @@
     }
     
     public void testEntityWithInvalidContentLength() throws Exception {
-        HttpDataTransmitter datatransmitter = new HttpDataTransmitterMockup();
+        SessionOutputBuffer datatransmitter = new HttpDataTransmitterMockup();
         HttpMessage message = new HttpMessageMockup();
         message.addHeader("Content-Length", "whatever");
 
@@ -172,7 +172,7 @@
     }
 
     public void testEntityNoContentDelimiter() throws Exception {
-        HttpDataTransmitter datatransmitter = new HttpDataTransmitterMockup();
+        SessionOutputBuffer datatransmitter = new HttpDataTransmitterMockup();
         HttpMessage message = new HttpMessageMockup();
         EntitySerializer entitywriter = new EntitySerializer(
                 new StrictContentLengthStrategy());

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/io/TestChunkCoding.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/io/TestChunkCoding.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/io/TestChunkCoding.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/io/TestChunkCoding.java Fri Jul 27 11:18:19 2007
@@ -39,7 +39,7 @@
 import org.apache.http.MalformedChunkCodingException;
 import org.apache.http.impl.io.ChunkedInputStream;
 import org.apache.http.impl.io.ChunkedOutputStream;
-import org.apache.http.io.HttpDataReceiver;
+import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.mockup.HttpDataReceiverMockup;
 import org.apache.http.mockup.HttpDataTransmitterMockup;
 import org.apache.http.util.EncodingUtils;
@@ -70,7 +70,7 @@
 
     public void testConstructors() throws Exception {
         try {
-            new ChunkedInputStream((HttpDataReceiver)null);
+            new ChunkedInputStream((SessionInputBuffer)null);
             fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             // expected

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/io/TestHttpDataInputStream.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/io/TestHttpDataInputStream.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/io/TestHttpDataInputStream.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/io/TestHttpDataInputStream.java Fri Jul 27 11:18:19 2007
@@ -31,7 +31,7 @@
 package org.apache.http.impl.io;
 
 import org.apache.http.impl.io.HttpDataInputStream;
-import org.apache.http.io.HttpDataReceiver;
+import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.mockup.HttpDataReceiverMockup;
 
 import junit.framework.Test;
@@ -63,7 +63,7 @@
     }
 
     public void testConstructor() throws Exception {
-        HttpDataReceiver receiver = new HttpDataReceiverMockup(new byte[] {});
+        SessionInputBuffer receiver = new HttpDataReceiverMockup(new byte[] {});
         new HttpDataInputStream(receiver);
         try {
             new HttpDataInputStream(null);

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/HttpDataTransmitterMockup.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/HttpDataTransmitterMockup.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/HttpDataTransmitterMockup.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/HttpDataTransmitterMockup.java Fri Jul 27 11:18:19 2007
@@ -39,7 +39,7 @@
 import org.apache.http.params.HttpParams;
 
 /**
- * {@link HttpDataTransmitter} mockup implementation.
+ * {@link SessionOutputBuffer} mockup implementation.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  */

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/util/TestHeaderUtils.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/util/TestHeaderUtils.java?view=diff&rev=560343&r1=560342&r2=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/util/TestHeaderUtils.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/util/TestHeaderUtils.java Fri Jul 27 11:18:19 2007
@@ -37,7 +37,7 @@
 import org.apache.http.HeaderElement;
 import org.apache.http.NameValuePair;
 import org.apache.http.ProtocolException;
-import org.apache.http.io.HttpDataReceiver;
+import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.message.BufferedHeader;
 import org.apache.http.mockup.HttpDataReceiverMockup;
 
@@ -89,7 +89,7 @@
             "\t and even more stuff\r\n" +  
             "     \r\n" +  
             "\r\n"; 
-        HttpDataReceiver receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
+        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
         Header[] headers = HeaderUtils.parseHeaders(receiver);
         assertNotNull(headers);
         assertEquals(3, headers.length);
@@ -112,7 +112,7 @@
         String s = 
             "header1  : stuff; param1 = value1; param2 = \"value 2\" \r\n" + 
             "\r\n"; 
-        HttpDataReceiver receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
+        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
         Header[] headers = HeaderUtils.parseHeaders(receiver);
         assertNotNull(headers);
         assertEquals(1, headers.length);
@@ -135,7 +135,7 @@
         String s = "    stuff\r\n" + 
             "header1: stuff\r\n" + 
             "\r\n"; 
-        HttpDataReceiver receiver = new HttpDataReceiverMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII");
         try {
             HeaderUtils.parseHeaders(receiver);
             fail("ProtocolException should have been thrown");
@@ -158,7 +158,7 @@
         String s = 
             "    header1: stuff\r\n" + 
             "header2  : stuff \r\n"; 
-        HttpDataReceiver receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
+        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
         Header[] headers = HeaderUtils.parseHeaders(receiver);
         assertNotNull(headers);
         assertEquals(2, headers.length);
@@ -170,7 +170,7 @@
     
     public void testEmptyDataStream() throws Exception {
         String s = ""; 
-        HttpDataReceiver receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
+        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
         Header[] headers = HeaderUtils.parseHeaders(receiver);
         assertNotNull(headers);
         assertEquals(0, headers.length);
@@ -182,7 +182,7 @@
             "header2: stuff \r\n" + 
             "header3: stuff\r\n" + 
             "\r\n"; 
-        HttpDataReceiver receiver = new HttpDataReceiverMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII");
         try {
             HeaderUtils.parseHeaders(receiver, 2, -1);
             fail("IOException should have been thrown");
@@ -197,7 +197,7 @@
             " stuff \r\n" + 
             " stuff\r\n" + 
             "\r\n"; 
-        HttpDataReceiver receiver = new HttpDataReceiverMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII");
         try {
             HeaderUtils.parseHeaders(receiver, 2, 15);
             fail("IOException should have been thrown");

Added: 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=auto&rev=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionInputBuffer.java (added)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionInputBuffer.java Fri Jul 27 11:18:19 2007
@@ -0,0 +1,65 @@
+/*
+ * $HeadURL$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.nio.reactor;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.channels.ReadableByteChannel;
+import java.nio.charset.CharacterCodingException;
+
+import org.apache.http.util.CharArrayBuffer;
+
+/**
+ * Session input buffer for non-blocking connection.
+ *
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ *
+ * @since 4.0
+ */
+public interface SessionInputBuffer {
+    
+    int fill(ReadableByteChannel channel) 
+        throws IOException;
+    
+    int read();
+    
+    int read(ByteBuffer dst, int maxLen);
+    
+    int read(ByteBuffer dst);
+    
+    boolean readLine(CharArrayBuffer linebuffer, boolean endOfStream) 
+        throws CharacterCodingException;
+    
+    String readLine(boolean endOfStream) 
+        throws CharacterCodingException;
+    
+}

Propchange: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionInputBuffer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionInputBuffer.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionInputBuffer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=auto&rev=560343
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionOutputBuffer.java (added)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionOutputBuffer.java Fri Jul 27 11:18:19 2007
@@ -0,0 +1,60 @@
+/*
+ * $HeadURL$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.nio.reactor;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.channels.WritableByteChannel;
+import java.nio.charset.CharacterCodingException;
+
+import org.apache.http.util.CharArrayBuffer;
+
+/**
+ * Session output buffer for non-blocking connection.
+ *
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ *
+ * @since 4.0
+ */
+public interface SessionOutputBuffer {
+
+    int flush(WritableByteChannel channel) 
+        throws IOException;
+
+    void write(final ByteBuffer src);
+
+    void writeLine(CharArrayBuffer linebuffer) 
+        throws CharacterCodingException;
+    
+    void writeLine(String s) throws IOException;
+    
+}

Propchange: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionOutputBuffer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionOutputBuffer.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/SessionOutputBuffer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message