hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sber...@apache.org
Subject svn commit: r667974 - /httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
Date Sun, 15 Jun 2008 17:05:19 GMT
Author: sberlin
Date: Sun Jun 15 10:05:19 2008
New Revision: 667974

URL: http://svn.apache.org/viewvc?rev=667974&view=rev
Log:
allow IdentityDecoder's completed status to be set programatically

Modified:
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java?rev=667974&r1=667973&r2=667974&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
Sun Jun 15 10:05:19 2008
@@ -59,6 +59,17 @@
             final HttpTransportMetricsImpl metrics) {
         super(channel, buffer, metrics);
     }
+    
+    /**
+     * Sets the completed status of this decoder. Normally this is not necessary
+     * (the decoder will automatically complete when the underlying channel
+     * returns EOF). It is useful to mark the decoder as completed if you have
+     * some other means to know all the necessary data has been read and want to
+     * reuse the underlying connection for more messages.
+     */
+    public void setCompleted(boolean completed) {
+        this.completed = completed;
+    }
 
     public int read(final ByteBuffer dst) throws IOException {
         if (dst == null) {



Mime
View raw message