hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r545605 - in /jakarta/httpcomponents/httpcore/trunk: ./ module-nio/src/main/java/org/apache/http/impl/nio/ module-nio/src/main/java/org/apache/http/impl/nio/reactor/ module-nio/src/main/java/org/apache/http/nio/reactor/ module-niossl/src/ma...
Date Fri, 08 Jun 2007 19:55:08 GMT
Author: olegk
Date: Fri Jun  8 12:55:07 2007
New Revision: 545605

URL: http://svn.apache.org/viewvc?view=rev&rev=545605
Log:
HTTPCORE-76: Added IOSession#shutdown() method intended to force-close I/O sessions (primarily
needed to terminate hang SSL connections).

Contributed by Sandeep Tamhankar <sandman at electric-cloud.com>
Reviewed by Oleg Kalnichevski

Modified:
    jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
    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/reactor/IOSessionImpl.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/IOSession.java
    jakarta/httpcomponents/httpcore/trunk/module-niossl/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java

Modified: jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt?view=diff&rev=545605&r1=545604&r2=545605
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt (original)
+++ jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt Fri Jun  8 12:55:07 2007
@@ -1,5 +1,9 @@
 Changes since 4.0 Alpha 4
 
+* [HTTPCORE-76]: Added IOSession#shutdown() method intended to force-close
+  I/O sessions (primarily needed to terminate hang SSL connections).
+  Contributed by Sandeep Tamhankar <sandman at electric-cloud.com>
+
 * [HTTPCORE-78]: Added ByteBufferAllocator interface that can be used to apply 
   different ByteArray allocation strategies to session and content buffers.
   Use heap bound implementation for short-lived or variable in length (requiring 

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=545605&r1=545604&r2=545605
==============================================================================
--- 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
Fri Jun  8 12:55:07 2007
@@ -270,7 +270,7 @@
 
     public void shutdown() throws IOException {
         this.closed = true;
-        this.session.close();
+        this.session.shutdown();
     }
     
 }

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java?view=diff&rev=545605&r1=545604&r2=545605
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
Fri Jun  8 12:55:07 2007
@@ -160,6 +160,12 @@
         return this.closed || !this.key.isValid();
     }
     
+    public void shutdown() {
+        // For this type of session, a close() does exactly
+        // what we need and nothing more.
+        close();
+    }
+    
     public boolean hasBufferedInput() {
         return this.bufferStatus != null && this.bufferStatus.hasBufferedInput();
     }

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/IOSession.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/IOSession.java?view=diff&rev=545605&r1=545604&r2=545605
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/IOSession.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/reactor/IOSession.java
Fri Jun  8 12:55:07 2007
@@ -54,6 +54,8 @@
 
     void close();
     
+    void shutdown();
+    
     boolean isClosed();
 
     int getSocketTimeout();

Modified: jakarta/httpcomponents/httpcore/trunk/module-niossl/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-niossl/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java?view=diff&rev=545605&r1=545604&r2=545605
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-niossl/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-niossl/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
Fri Jun  8 12:55:07 2007
@@ -342,7 +342,7 @@
     
     public void shutdown() {
         this.closed = true;
-        this.session.close();
+        this.session.shutdown();
     }
 
     public ByteChannel channel() {



Mime
View raw message