hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r638123 - in /httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio: SSLClientIOEventDispatch.java SSLServerIOEventDispatch.java
Date Mon, 17 Mar 2008 22:54:17 GMT
Author: olegk
Date: Mon Mar 17 15:54:13 2008
New Revision: 638123

URL: http://svn.apache.org/viewvc?rev=638123&view=rev
Log:
Added protected factory method for SSLIOSession

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

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java?rev=638123&r1=638122&r2=638123&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java
Mon Mar 17 15:54:13 2008
@@ -54,7 +54,6 @@
     private static final String NHTTP_CONN = "NHTTP_CONN";
     private static final String SSL_SESSION = "SSL_SESSION";
     
-    protected final ByteBufferAllocator allocator;
     protected final NHttpClientHandler handler;
     protected final SSLContext sslcontext;
     protected final SSLIOSessionHandler sslHandler;
@@ -75,7 +74,6 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        this.allocator = createByteBufferAllocator();
         this.handler = handler;
         this.params = params;
         this.sslcontext = sslcontext;
@@ -101,13 +99,20 @@
         return new DefaultNHttpClientConnection(
                 session, 
                 createHttpResponseFactory(),
-                this.allocator,
+                createByteBufferAllocator(),
                 this.params); 
     }
         
+    protected SSLIOSession createSSLIOSession(
+            final IOSession session,
+            final SSLContext sslcontext,
+            final SSLIOSessionHandler sslHandler) {
+        return new SSLIOSession(session, sslcontext, sslHandler); 
+    }
+    
     public void connected(final IOSession session) {
 
-        SSLIOSession sslSession = new SSLIOSession(
+        SSLIOSession sslSession = createSSLIOSession(
                 session, 
                 this.sslcontext,
                 this.sslHandler); 

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java?rev=638123&r1=638122&r2=638123&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java
Mon Mar 17 15:54:13 2008
@@ -54,7 +54,6 @@
     private static final String NHTTP_CONN = "NHTTP_CONN";
     private static final String SSL_SESSION = "SSL_SESSION";
    
-    protected final ByteBufferAllocator allocator;
     protected final NHttpServiceHandler handler;
     protected final SSLContext sslcontext;
     protected final SSLIOSessionHandler sslHandler;
@@ -75,7 +74,6 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        this.allocator = createByteBufferAllocator();
         this.handler = handler;
         this.params = params;
         this.sslcontext = sslcontext;
@@ -101,13 +99,20 @@
         return new DefaultNHttpServerConnection(
                 session, 
                 createHttpRequestFactory(),
-                this.allocator,
+                createByteBufferAllocator(),
                 this.params); 
     }
         
+    protected SSLIOSession createSSLIOSession(
+            final IOSession session,
+            final SSLContext sslcontext,
+            final SSLIOSessionHandler sslHandler) {
+        return new SSLIOSession(session, sslcontext, sslHandler); 
+    }
+    
     public void connected(final IOSession session) {
 
-        SSLIOSession sslSession = new SSLIOSession(
+        SSLIOSession sslSession = createSSLIOSession(
                 session, 
                 this.sslcontext,
                 this.sslHandler); 



Mime
View raw message