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-505] Make org.apache.http.nio.protocol.HttpAsyncService instance variables available to subclasses.
Date Sat, 06 Jan 2018 19:14:53 GMT
Repository: httpcomponents-core
Updated Branches:
  refs/heads/4.4.x f1c5d6c56 -> 88a0bf85a


[HTTPCORE-505] Make org.apache.http.nio.protocol.HttpAsyncService
instance variables available to subclasses.

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

Branch: refs/heads/4.4.x
Commit: 88a0bf85a7706435eb27015146fe135710dac8bd
Parents: f1c5d6c
Author: Gary Gregory <ggregory@apache.org>
Authored: Sat Jan 6 12:14:49 2018 -0700
Committer: Gary Gregory <ggregory@apache.org>
Committed: Sat Jan 6 12:14:49 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/88a0bf85/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index d9563be..40cd638 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -27,6 +27,9 @@ Changelog
 * HTTPCORE-504: Update DefaultHttpClientIODispatch constructor to type for subclasses of
DefaultNHttpClientConnection (like DefaultHttpServerIODispatch.)
   Contributed by Gary Gregory <ggregory at apache.org>
 
+* HTTPCORE-505: Make org.apache.http.nio.protocol.HttpAsyncService instance variables available
to subclasses.
+  Contributed by Gary Gregory <ggregory at apache.org>
+
 
 Release 4.4.8
 -------------------

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/88a0bf85/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 b79c1c6..968d760 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 connectionStrategy;
     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.connectionStrategy = connStrategy != null ? connStrategy :
                 DefaultConnectionReuseStrategy.INSTANCE;
         this.responseFactory = responseFactory != null ? responseFactory :
                 DefaultHttpResponseFactory.INSTANCE;
@@ -755,7 +755,7 @@ public class HttpAsyncService implements NHttpServerEventHandler {
         } finally {
             responseProducer.close();
         }
-        if (!this.connStrategy.keepAlive(response, context)) {
+        if (!this.connectionStrategy.keepAlive(response, context)) {
             conn.close();
         } else {
             conn.requestInput();
@@ -1090,10 +1090,61 @@ public class HttpAsyncService implements NHttpServerEventHandler {
     /**
      * Gets the HttpResponseFactory for this service.
      *
+     * @return  the HttpResponseFactory for this service.
      * @since 4.4.8
      */
     protected HttpResponseFactory getResponseFactory() {
       return responseFactory;
     }
 
+    /**
+     * Gets the HttpProcessor for this service.
+     *
+     * @return the HttpProcessor for this service.
+     * @since 4.4.9
+     */
+    protected HttpProcessor getHttpProcessor() {
+        return httpProcessor;
+    }
+
+    /**
+     * Gets the ConnectionReuseStrategy for this service.
+     *
+     * @return the ConnectionReuseStrategy for this service.
+     * @since 4.4.9
+     */
+    protected ConnectionReuseStrategy getConnectionStrategy() {
+        return connectionStrategy;
+    }
+
+    /**
+     * Gets the HttpAsyncRequestHandlerMapper for this service.
+     *
+     * @return the HttpAsyncRequestHandlerMapper for this service.
+     * @since 4.4.9
+     */
+    protected HttpAsyncRequestHandlerMapper getHandlerMapper() {
+        return handlerMapper;
+    }
+
+    /**
+     * Gets the HttpAsyncExpectationVerifier for this service.
+     *
+     * @return the HttpAsyncExpectationVerifier for this service.
+     * @since 4.4.9
+     */
+    protected HttpAsyncExpectationVerifier getExpectationVerifier() {
+        return expectationVerifier;
+    }
+
+    /**
+     * Gets the ExceptionLogger for this service.
+     *
+     * @return the ExceptionLogger for this service.
+     * @since 4.4.9
+     */
+    protected ExceptionLogger getExceptionLogger() {
+        return exceptionLogger;
+    }
+
 }


Mime
View raw message