You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2018/01/06 18:34:46 UTC
httpcomponents-core git commit: [HTTPCORE-502] Add APIs to
DefaultHttpServerIODispatch to get its connection factory and handler.
Repository: httpcomponents-core
Updated Branches:
refs/heads/4.4.x 11175dfc8 -> 599975537
[HTTPCORE-502] Add APIs to DefaultHttpServerIODispatch to get its
connection factory and handler.
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/59997553
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/59997553
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/59997553
Branch: refs/heads/4.4.x
Commit: 5999755378d3332712f576e41764247b8640044e
Parents: 11175df
Author: Gary Gregory <gg...@apache.org>
Authored: Sat Jan 6 11:34:43 2018 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Sat Jan 6 11:34:43 2018 -0700
----------------------------------------------------------------------
RELEASE_NOTES.txt | 9 ++++---
.../impl/nio/DefaultHttpServerIODispatch.java | 26 +++++++++++++++++---
2 files changed, 29 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/59997553/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 19faae3..2153563 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,7 +1,7 @@
Release 4.4.9
-------------------
-This is a maintenance release that fixes a number of issues discovered since 4.4.8.
+This is a maintenance release that fixes a number of issues discovered since 4.4.8 ands a few low-level methods.
Changelog
-------------------
@@ -15,7 +15,10 @@ Changelog
* HTTPCORE-497: Add API org.apache.http.nio.protocol.UriHttpAsyncRequestHandlerMapper.getUriPatternMatcher().
Contributed by Gary Gregory <ggregory at apache.org>
-* HTTPCORE-499: Make interface Header extend NameValuePair
+* HTTPCORE-499: Make interface Header extend NameValuePair.
+ Contributed by Gary Gregory <ggregory at apache.org>
+
+* HTTPCORE-502: Add APIs to DefaultHttpServerIODispatch to get its connection factory and handler.
Contributed by Gary Gregory <ggregory at apache.org>
@@ -33,7 +36,7 @@ Changelog
* HTTPCORE-493: Make org.apache.http.nio.protocol.HttpAsyncService.responseFactory available to subclasses.
Contributed by Gary Gregory <ggregory at apache.org>
-* HTTPCORE-491 Make BasicAsyncRequest|ResponseConsumer more paranoid
+* HTTPCORE-491: Make BasicAsyncRequest|ResponseConsumer more paranoid
Contributed by Michael Heemskerk <mh...@atlassian.com>
* HTTPCORE-490: session requests do not get cancelled correctly if the associated HTTP response futures get cancelled
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/59997553/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultHttpServerIODispatch.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultHttpServerIODispatch.java b/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultHttpServerIODispatch.java
index 3a1621b..d746922 100644
--- a/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultHttpServerIODispatch.java
+++ b/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultHttpServerIODispatch.java
@@ -91,14 +91,14 @@ public class DefaultHttpServerIODispatch
}
private final NHttpServerEventHandler handler;
- private final NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connFactory;
+ private final NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory;
public DefaultHttpServerIODispatch(
final NHttpServerEventHandler handler,
final NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connFactory) {
super();
this.handler = Args.notNull(handler, "HTTP client handler");
- this.connFactory = Args.notNull(connFactory, "HTTP server connection factory");
+ this.connectionFactory = Args.notNull(connFactory, "HTTP server connection factory");
}
/**
@@ -167,7 +167,27 @@ public class DefaultHttpServerIODispatch
@Override
protected DefaultNHttpServerConnection createConnection(final IOSession session) {
- return this.connFactory.createConnection(session);
+ return this.connectionFactory.createConnection(session);
+ }
+
+ /**
+ * Gets the connection factory used to construct this dispatch.
+ *
+ * @return the connection factory used to construct this dispatch.
+ * @since 4.4.9
+ */
+ public NHttpConnectionFactory<? extends DefaultNHttpServerConnection> getConnectionFactory() {
+ return connectionFactory;
+ }
+
+ /**
+ * Gets the handler used to construct this dispatch.
+ *
+ * @return the handler used to construct this dispatch.
+ * @since 4.4.9
+ */
+ public NHttpServerEventHandler getHandler() {
+ return handler;
}
@Override