hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject httpcomponents-core git commit: [HTTPCORE-467]
Date Tue, 16 May 2017 01:32:21 GMT
Repository: httpcomponents-core
Updated Branches:
  refs/heads/dev/4.4.x/HTTPCORE-467 [created] d669ccab1


[HTTPCORE-467]

Add getter methods to HttpAsyncService for subclasses to access instance
variables.

Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/d669ccab
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/d669ccab
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/d669ccab

Branch: refs/heads/dev/4.4.x/HTTPCORE-467
Commit: d669ccab18d5e05950ebe1a82bb411cbb9b1bafe
Parents: ccbccce
Author: Gary Gregory <ggregory@apache.org>
Authored: Mon May 15 18:32:09 2017 -0700
Committer: Gary Gregory <ggregory@apache.org>
Committed: Mon May 15 18:32:09 2017 -0700

----------------------------------------------------------------------
 RELEASE_NOTES.txt                               |  3 ++
 .../http/nio/protocol/HttpAsyncService.java     | 30 ++++++++++++++++++--
 2 files changed, 30 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/d669ccab/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 95d3ac0..e538d95 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -24,6 +24,9 @@ Changelog
 * HTTPCORE-465: Update example NHttpReverseProxy to support SSL to origin servers which use
self-signed certificates.
   Contributed by Gary Gregory <ggregory at apache.org>
 
+* HTTPCORE-467: Add getter methods to HttpAsyncService for subclasses to access instance
variables.
+  Contributed by Gary Gregory <ggregory at apache.org>
+
 
 Release 4.4.6
 -------------------

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/d669ccab/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
index f941399..363755e 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
@@ -105,7 +105,7 @@ public class HttpAsyncService implements NHttpServerEventHandler {
     static final String HTTP_EXCHANGE_STATE = "http.nio.http-exchange-state";
 
     private final HttpProcessor httpProcessor;
-    private final ConnectionReuseStrategy connStrategy;
+    private final ConnectionReuseStrategy connectionReuseStrategy;
     private final HttpResponseFactory responseFactory;
     private final HttpAsyncRequestHandlerMapper handlerMapper;
     private final HttpAsyncExpectationVerifier expectationVerifier;
@@ -213,7 +213,7 @@ public class HttpAsyncService implements NHttpServerEventHandler {
             final ExceptionLogger exceptionLogger) {
         super();
         this.httpProcessor = Args.notNull(httpProcessor, "HTTP processor");
-        this.connStrategy = connStrategy != null ? connStrategy :
+        this.connectionReuseStrategy = connStrategy != null ? connStrategy :
                 DefaultConnectionReuseStrategy.INSTANCE;
         this.responseFactory = responseFactory != null ? responseFactory :
                 DefaultHttpResponseFactory.INSTANCE;
@@ -743,7 +743,7 @@ public class HttpAsyncService implements NHttpServerEventHandler {
         } finally {
             responseProducer.close();
         }
-        if (!this.connStrategy.keepAlive(response, context)) {
+        if (!this.connectionReuseStrategy.keepAlive(response, context)) {
             conn.close();
         } else {
             conn.requestInput();
@@ -1075,4 +1075,28 @@ public class HttpAsyncService implements NHttpServerEventHandler {
 
     }
 
+    protected HttpResponseFactory getResponseFactory() {
+        return responseFactory;
+    }
+
+    protected HttpProcessor getHttpProcessor() {
+        return httpProcessor;
+    }
+
+    protected ConnectionReuseStrategy getConnectionReuseStrategy() {
+        return connectionReuseStrategy;
+    }
+
+    protected HttpAsyncRequestHandlerMapper getHandlerMapper() {
+        return handlerMapper;
+    }
+
+    protected HttpAsyncExpectationVerifier getExpectationVerifier() {
+        return expectationVerifier;
+    }
+
+    protected ExceptionLogger getExceptionLogger() {
+        return exceptionLogger;
+    }
+
 }


Mime
View raw message