You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2019/07/09 12:56:13 UTC
[httpcomponents-core] 02/02: Renamed Http2 to H2 (no functional
changes)
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch renaming
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit cdeb7ede9e578c6a762018da99f48b5fc06045b3
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Tue Jul 9 14:51:44 2019 +0200
Renamed Http2 to H2 (no functional changes)
---
.../{Http2Processors.java => H2Processors.java} | 4 +-
...tHandler.java => AbstractH2IOEventHandler.java} | 6 +-
...lexer.java => AbstractH2StreamMultiplexer.java} | 142 ++++++++++-----------
...entHandler.java => ClientH2IOEventHandler.java} | 4 +-
...reamHandler.java => ClientH2StreamHandler.java} | 8 +-
...iplexer.java => ClientH2StreamMultiplexer.java} | 22 ++--
....java => ClientH2StreamMultiplexerFactory.java} | 22 ++--
.../impl/nio/ClientHttpProtocolNegotiator.java | 8 +-
.../nio/ClientHttpProtocolNegotiatorFactory.java | 4 +-
...Handler.java => ClientPushH2StreamHandler.java} | 8 +-
...or.java => H2OnlyClientProtocolNegotiator.java} | 12 +-
...ttp2StreamChannel.java => H2StreamChannel.java} | 2 +-
...ttp2StreamHandler.java => H2StreamHandler.java} | 2 +-
...p2StreamListener.java => H2StreamListener.java} | 2 +-
...entHandler.java => ServerH2IOEventHandler.java} | 4 +-
...reamHandler.java => ServerH2StreamHandler.java} | 8 +-
...iplexer.java => ServerH2StreamMultiplexer.java} | 18 +--
....java => ServerH2StreamMultiplexerFactory.java} | 14 +-
.../impl/nio/ServerHttpProtocolNegotiator.java | 8 +-
.../nio/ServerHttpProtocolNegotiatorFactory.java | 4 +-
...Handler.java => ServerPushH2StreamHandler.java} | 8 +-
...p2AsyncRequester.java => H2AsyncRequester.java} | 4 +-
...Requester.java => H2MultiplexingRequester.java} | 6 +-
....java => H2MultiplexingRequesterBootstrap.java} | 58 ++++-----
.../impl/nio/bootstrap/H2RequesterBootstrap.java | 22 ++--
.../impl/nio/bootstrap/H2ServerBootstrap.java | 20 +--
...ava => H2ConscriptRequestExecutionExample.java} | 6 +-
...ServerExample.java => H2FileServerExample.java} | 6 +-
...Example.java => H2FullDuplexClientExample.java} | 6 +-
...Example.java => H2FullDuplexServerExample.java} | 6 +-
...p2GreetingServer.java => H2GreetingServer.java} | 2 +-
...ple.java => H2MultiStreamExecutionExample.java} | 6 +-
...Example.java => H2RequestExecutionExample.java} | 6 +-
....java => H2TlsAlpnRequestExecutionExample.java} | 6 +-
.../apache/hc/core5/benchmark/HttpBenchmark.java | 4 +-
.../{Http2TestClient.java => H2TestClient.java} | 16 +--
.../{Http2TestServer.java => H2TestServer.java} | 14 +-
...va => InternalClientH2EventHandlerFactory.java} | 14 +-
...va => InternalServerH2EventHandlerFactory.java} | 14 +-
...mListener.java => LoggingH2StreamListener.java} | 8 +-
...atibilityTest.java => H2CompatibilityTest.java} | 12 +-
.../nio/{Http2AlpnTest.java => H2AlpnTest.java} | 18 +--
...IntegrationTest.java => H2IntegrationTest.java} | 8 +-
...ionTest.java => H2ProtocolNegotiationTest.java} | 10 +-
...a => H2ServerAndMultiplexingRequesterTest.java} | 16 +--
...sterTest.java => H2ServerAndRequesterTest.java} | 8 +-
...nTest.java => H2SocksProxyIntegrationTest.java} | 4 +-
...TestBase.java => InternalH2ServerTestBase.java} | 10 +-
.../core5/testing/reactive/ReactiveClientTest.java | 6 +-
49 files changed, 313 insertions(+), 313 deletions(-)
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/Http2Processors.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/H2Processors.java
similarity index 97%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/Http2Processors.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/H2Processors.java
index 3468a7b..a48ccdb 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/Http2Processors.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/H2Processors.java
@@ -45,7 +45,7 @@ import org.apache.hc.core5.util.VersionInfo;
/**
* @since 5.0
*/
-public final class Http2Processors {
+public final class H2Processors {
private final static String SOFTWARE = "Apache-HttpCore";
@@ -54,7 +54,7 @@ public final class Http2Processors {
.addAll(
new ResponseDate(),
new ResponseServer(!TextUtils.isBlank(serverInfo) ? serverInfo :
- VersionInfo.getSoftwareInfo(SOFTWARE, "org.apache.hc.core5", Http2Processors.class)),
+ VersionInfo.getSoftwareInfo(SOFTWARE, "org.apache.hc.core5", H2Processors.class)),
new H2ResponseContent(),
new H2ResponseConnControl())
.addAll(
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2IOEventHandler.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2IOEventHandler.java
similarity index 95%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2IOEventHandler.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2IOEventHandler.java
index c66da29..0195bb0 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2IOEventHandler.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2IOEventHandler.java
@@ -41,11 +41,11 @@ import org.apache.hc.core5.reactor.IOSession;
import org.apache.hc.core5.util.Args;
import org.apache.hc.core5.util.Timeout;
-class AbstractHttp2IOEventHandler implements HttpConnectionEventHandler {
+class AbstractH2IOEventHandler implements HttpConnectionEventHandler {
- final AbstractHttp2StreamMultiplexer streamMultiplexer;
+ final AbstractH2StreamMultiplexer streamMultiplexer;
- AbstractHttp2IOEventHandler(final AbstractHttp2StreamMultiplexer streamMultiplexer) {
+ AbstractH2IOEventHandler(final AbstractH2StreamMultiplexer streamMultiplexer) {
this.streamMultiplexer = Args.notNull(streamMultiplexer, "Stream multiplexer");
}
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
similarity index 92%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
index 91f5ced..e9b0690 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
@@ -91,7 +91,7 @@ import org.apache.hc.core5.util.ByteArrayBuffer;
import org.apache.hc.core5.util.Identifiable;
import org.apache.hc.core5.util.Timeout;
-abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConnection {
+abstract class AbstractH2StreamMultiplexer implements Identifiable, HttpConnection {
private static final long LINGER_TIME = 1000; // 1 second
@@ -111,13 +111,13 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
private final Deque<RawFrame> outputQueue;
private final HPackEncoder hPackEncoder;
private final HPackDecoder hPackDecoder;
- private final Map<Integer, Http2Stream> streamMap;
+ private final Map<Integer, H2Stream> streamMap;
private final Queue<AsyncPingHandler> pingHandlers;
private final AtomicInteger connInputWindow;
private final AtomicInteger connOutputWindow;
private final AtomicInteger outputRequests;
private final AtomicInteger lastStreamId;
- private final Http2StreamListener streamListener;
+ private final H2StreamListener streamListener;
private ConnectionHandshake connState = ConnectionHandshake.READY;
private SettingsHandshake localSettingState = SettingsHandshake.READY;
@@ -130,14 +130,14 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
private int processedRemoteStreamId;
private EndpointDetails endpointDetails;
- AbstractHttp2StreamMultiplexer(
+ AbstractH2StreamMultiplexer(
final ProtocolIOSession ioSession,
final FrameFactory frameFactory,
final StreamIdGenerator idGenerator,
final HttpProcessor httpProcessor,
final CharCodingConfig charCodingConfig,
final H2Config h2Config,
- final Http2StreamListener streamListener) {
+ final H2StreamListener streamListener) {
this.ioSession = Args.notNull(ioSession, "IO session");
this.frameFactory = Args.notNull(frameFactory, "Frame factory");
this.idGenerator = Args.notNull(idGenerator, "Stream id generator");
@@ -177,15 +177,15 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
abstract void acceptPushFrame() throws H2ConnectionException;
- abstract Http2StreamHandler createRemotelyInitiatedStream(
- Http2StreamChannel channel,
+ abstract H2StreamHandler createRemotelyInitiatedStream(
+ H2StreamChannel channel,
HttpProcessor httpProcessor,
BasicHttpConnectionMetrics connMetrics,
HandlerFactory<AsyncPushConsumer> pushHandlerFactory) throws IOException;
- abstract Http2StreamHandler createLocallyInitiatedStream(
+ abstract H2StreamHandler createLocallyInitiatedStream(
ExecutableCommand command,
- Http2StreamChannel channel,
+ H2StreamChannel channel,
HttpProcessor httpProcessor,
BasicHttpConnectionMetrics connMetrics) throws IOException;
@@ -468,9 +468,9 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
final int pendingOutputRequests = outputRequests.get();
boolean outputPending = false;
if (!streamMap.isEmpty() && connOutputWindow.get() > 0) {
- for (final Iterator<Map.Entry<Integer, Http2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
- final Map.Entry<Integer, Http2Stream> entry = it.next();
- final Http2Stream stream = entry.getValue();
+ for (final Iterator<Map.Entry<Integer, H2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
+ final Map.Entry<Integer, H2Stream> entry = it.next();
+ final H2Stream stream = entry.getValue();
if (!stream.isLocalClosed()
&& stream.getOutputWindow().get() > 0
&& stream.isOutputReady()) {
@@ -496,9 +496,9 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
processPendingCommands();
}
if (connState.compareTo(ConnectionHandshake.GRACEFUL_SHUTDOWN) == 0) {
- for (final Iterator<Map.Entry<Integer, Http2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
- final Map.Entry<Integer, Http2Stream> entry = it.next();
- final Http2Stream stream = entry.getValue();
+ for (final Iterator<Map.Entry<Integer, H2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
+ final Map.Entry<Integer, H2Stream> entry = it.next();
+ final H2Stream stream = entry.getValue();
if (stream.isLocalClosed() && stream.isRemoteClosed()) {
stream.releaseResources();
it.remove();
@@ -532,9 +532,9 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
"Timeout due to inactivity (" + timeout + ")");
}
commitFrame(goAway);
- for (final Iterator<Map.Entry<Integer, Http2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
- final Map.Entry<Integer, Http2Stream> entry = it.next();
- final Http2Stream stream = entry.getValue();
+ for (final Iterator<Map.Entry<Integer, H2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
+ final Map.Entry<Integer, H2Stream> entry = it.next();
+ final H2Stream stream = entry.getValue();
stream.reset(new H2StreamResetException(H2Error.NO_ERROR, "Timeout due to inactivity (" + timeout + ")"));
}
streamMap.clear();
@@ -549,9 +549,9 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
break;
}
}
- for (final Iterator<Map.Entry<Integer, Http2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
- final Map.Entry<Integer, Http2Stream> entry = it.next();
- final Http2Stream stream = entry.getValue();
+ for (final Iterator<Map.Entry<Integer, H2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
+ final Map.Entry<Integer, H2Stream> entry = it.next();
+ final H2Stream stream = entry.getValue();
stream.cancel();
}
for (;;) {
@@ -577,9 +577,9 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
if (command instanceof ShutdownCommand) {
final ShutdownCommand shutdownCommand = (ShutdownCommand) command;
if (shutdownCommand.getType() == CloseMode.IMMEDIATE) {
- for (final Iterator<Map.Entry<Integer, Http2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
- final Map.Entry<Integer, Http2Stream> entry = it.next();
- final Http2Stream stream = entry.getValue();
+ for (final Iterator<Map.Entry<Integer, H2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
+ final Map.Entry<Integer, H2Stream> entry = it.next();
+ final H2Stream stream = entry.getValue();
stream.cancel();
}
streamMap.clear();
@@ -600,17 +600,17 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
commitFrame(ping);
} else if (command instanceof ExecutableCommand) {
final int streamId = generateStreamId();
- final Http2StreamChannelImpl channel = new Http2StreamChannelImpl(
+ final H2StreamChannelImpl channel = new H2StreamChannelImpl(
streamId,
true,
localConfig.getInitialWindowSize(),
remoteConfig.getInitialWindowSize());
final ExecutableCommand executableCommand = (ExecutableCommand) command;
- final Http2StreamHandler streamHandler = createLocallyInitiatedStream(
+ final H2StreamHandler streamHandler = createLocallyInitiatedStream(
executableCommand, channel, httpProcessor, connMetrics);
- final Http2Stream stream = new Http2Stream(channel, streamHandler, false);
+ final H2Stream stream = new H2Stream(channel, streamHandler, false);
streamMap.put(streamId, stream);
if (stream.isOutputReady()) {
@@ -656,9 +656,9 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
break;
}
}
- for (final Iterator<Map.Entry<Integer, Http2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
- final Map.Entry<Integer, Http2Stream> entry = it.next();
- final Http2Stream stream = entry.getValue();
+ for (final Iterator<Map.Entry<Integer, H2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
+ final Map.Entry<Integer, H2Stream> entry = it.next();
+ final H2Stream stream = entry.getValue();
if (stream.isLocalClosed() && (stream.isRemoteClosed() || stream.isLocalReset())) {
stream.reset(cause);
}
@@ -686,11 +686,11 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
}
}
- private Http2Stream getValidStream(final int streamId) throws H2ConnectionException {
+ private H2Stream getValidStream(final int streamId) throws H2ConnectionException {
if (streamId == 0) {
throw new H2ConnectionException(H2Error.PROTOCOL_ERROR, "Illegal stream id: " + streamId);
}
- final Http2Stream stream = streamMap.get(streamId);
+ final H2Stream stream = streamMap.get(streamId);
if (stream == null) {
if (streamId <= lastStreamId.get()) {
throw new H2ConnectionException(H2Error.STREAM_CLOSED, "Stream closed");
@@ -715,7 +715,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
}
switch (frameType) {
case DATA: {
- final Http2Stream stream = getValidStream(streamId);
+ final H2Stream stream = getValidStream(streamId);
try {
consumeDataFrame(frame, stream);
} catch (final H2StreamResetException ex) {
@@ -734,20 +734,20 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
if (streamId == 0) {
throw new H2ConnectionException(H2Error.PROTOCOL_ERROR, "Illegal stream id: " + streamId);
}
- Http2Stream stream = streamMap.get(streamId);
+ H2Stream stream = streamMap.get(streamId);
if (stream == null) {
acceptHeaderFrame();
updateLastStreamId(streamId);
- final Http2StreamChannelImpl channel = new Http2StreamChannelImpl(
+ final H2StreamChannelImpl channel = new H2StreamChannelImpl(
streamId,
false,
localConfig.getInitialWindowSize(),
remoteConfig.getInitialWindowSize());
- final Http2StreamHandler streamHandler = createRemotelyInitiatedStream(
+ final H2StreamHandler streamHandler = createRemotelyInitiatedStream(
channel, httpProcessor, connMetrics, null);
- stream = new Http2Stream(channel, streamHandler, true);
+ stream = new H2Stream(channel, streamHandler, true);
if (stream.isOutputReady()) {
stream.produceOutput();
}
@@ -780,7 +780,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
throw new H2ConnectionException(H2Error.PROTOCOL_ERROR, "Unexpected CONTINUATION stream id: " + streamId);
}
- final Http2Stream stream = getValidStream(streamId);
+ final H2Stream stream = getValidStream(streamId);
try {
consumeContinuationFrame(frame, stream);
@@ -812,7 +812,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
throw new H2ConnectionException(H2Error.FLOW_CONTROL_ERROR, ex.getMessage());
}
} else {
- final Http2Stream stream = streamMap.get(streamId);
+ final H2Stream stream = streamMap.get(streamId);
if (stream != null) {
try {
updateOutputWindow(streamId, stream.getOutputWindow(), delta);
@@ -828,7 +828,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
if (streamId == 0) {
throw new H2ConnectionException(H2Error.PROTOCOL_ERROR, "Illegal stream id: " + streamId);
}
- final Http2Stream stream = streamMap.get(streamId);
+ final H2Stream stream = streamMap.get(streamId);
if (stream == null) {
if (streamId > lastStreamId.get()) {
throw new H2ConnectionException(H2Error.PROTOCOL_ERROR, "Unexpected stream id: " + streamId);
@@ -902,7 +902,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
throw new H2ConnectionException(H2Error.PROTOCOL_ERROR, "Push is disabled");
}
- final Http2Stream stream = getValidStream(streamId);
+ final H2Stream stream = getValidStream(streamId);
if (stream.isRemoteClosed()) {
stream.localReset(new H2StreamResetException(H2Error.STREAM_CLOSED, "Stream closed"));
break;
@@ -922,14 +922,14 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
updateLastStreamId(promisedStreamId);
- final Http2StreamChannelImpl channel = new Http2StreamChannelImpl(
+ final H2StreamChannelImpl channel = new H2StreamChannelImpl(
promisedStreamId,
false,
localConfig.getInitialWindowSize(),
remoteConfig.getInitialWindowSize());
- final Http2StreamHandler streamHandler = createRemotelyInitiatedStream(
+ final H2StreamHandler streamHandler = createRemotelyInitiatedStream(
channel, httpProcessor, connMetrics, stream.getPushHandlerFactory());
- final Http2Stream promisedStream = new Http2Stream(channel, streamHandler, true);
+ final H2Stream promisedStream = new H2Stream(channel, streamHandler, true);
streamMap.put(promisedStreamId, promisedStream);
try {
@@ -953,11 +953,11 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
final int errorCode = payload.getInt();
if (errorCode == H2Error.NO_ERROR.getCode()) {
if (connState.compareTo(ConnectionHandshake.ACTIVE) <= 0) {
- for (final Iterator<Map.Entry<Integer, Http2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
- final Map.Entry<Integer, Http2Stream> entry = it.next();
+ for (final Iterator<Map.Entry<Integer, H2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
+ final Map.Entry<Integer, H2Stream> entry = it.next();
final int activeStreamId = entry.getKey();
if (!idGenerator.isSameSide(activeStreamId) && activeStreamId > processedLocalStreamId) {
- final Http2Stream stream = entry.getValue();
+ final H2Stream stream = entry.getValue();
stream.cancel();
it.remove();
}
@@ -965,9 +965,9 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
}
connState = streamMap.isEmpty() ? ConnectionHandshake.SHUTDOWN : ConnectionHandshake.GRACEFUL_SHUTDOWN;
} else {
- for (final Iterator<Map.Entry<Integer, Http2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
- final Map.Entry<Integer, Http2Stream> entry = it.next();
- final Http2Stream stream = entry.getValue();
+ for (final Iterator<Map.Entry<Integer, H2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
+ final Map.Entry<Integer, H2Stream> entry = it.next();
+ final H2Stream stream = entry.getValue();
stream.reset(new H2StreamResetException(errorCode, "Connection terminated by the peer (" + errorCode + ")"));
}
streamMap.clear();
@@ -979,7 +979,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
}
}
- private void consumeDataFrame(final RawFrame frame, final Http2Stream stream) throws HttpException, IOException {
+ private void consumeDataFrame(final RawFrame frame, final H2Stream stream) throws HttpException, IOException {
final int streamId = stream.getId();
final ByteBuffer payload = frame.getPayloadContent();
if (payload != null) {
@@ -1010,7 +1010,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
stream.consumeData(payload);
}
- private void consumePushPromiseFrame(final RawFrame frame, final ByteBuffer payload, final Http2Stream promisedStream) throws HttpException, IOException {
+ private void consumePushPromiseFrame(final RawFrame frame, final ByteBuffer payload, final H2Stream promisedStream) throws HttpException, IOException {
final int promisedStreamId = promisedStream.getId();
if (!frame.isFlagSet(FrameFlag.END_HEADERS)) {
continuation = new Continuation(promisedStreamId, frame.getType(), true);
@@ -1032,7 +1032,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
}
}
- private void consumeHeaderFrame(final RawFrame frame, final Http2Stream stream) throws HttpException, IOException {
+ private void consumeHeaderFrame(final RawFrame frame, final H2Stream stream) throws HttpException, IOException {
final int streamId = stream.getId();
if (!frame.isFlagSet(FrameFlag.END_HEADERS)) {
continuation = new Continuation(streamId, frame.getType(), frame.isFlagSet(FrameFlag.END_STREAM));
@@ -1069,7 +1069,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
}
}
- private void consumeContinuationFrame(final RawFrame frame, final Http2Stream stream) throws HttpException, IOException {
+ private void consumeContinuationFrame(final RawFrame frame, final H2Stream stream) throws HttpException, IOException {
final int streamId = frame.getStreamId();
final ByteBuffer payload = frame.getPayload();
continuation.copyPayload(payload);
@@ -1134,9 +1134,9 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
if (delta != 0) {
updateOutputWindow(0, connOutputWindow, delta);
if (!streamMap.isEmpty()) {
- for (final Iterator<Map.Entry<Integer, Http2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
- final Map.Entry<Integer, Http2Stream> entry = it.next();
- final Http2Stream stream = entry.getValue();
+ for (final Iterator<Map.Entry<Integer, H2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
+ final Map.Entry<Integer, H2Stream> entry = it.next();
+ final H2Stream stream = entry.getValue();
try {
updateOutputWindow(stream.getId(), stream.getOutputWindow(), delta);
} catch (final ArithmeticException ex) {
@@ -1168,9 +1168,9 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
}
private void produceOutput() throws HttpException, IOException {
- for (final Iterator<Map.Entry<Integer, Http2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
- final Map.Entry<Integer, Http2Stream> entry = it.next();
- final Http2Stream stream = entry.getValue();
+ for (final Iterator<Map.Entry<Integer, H2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
+ final Map.Entry<Integer, H2Stream> entry = it.next();
+ final H2Stream stream = entry.getValue();
if (!stream.isLocalClosed() && stream.getOutputWindow().get() > 0) {
stream.produceOutput();
}
@@ -1279,7 +1279,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
}
- private class Http2StreamChannelImpl implements Http2StreamChannel {
+ private class H2StreamChannelImpl implements H2StreamChannel {
private final int id;
private final AtomicInteger inputWindow;
@@ -1291,7 +1291,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
private volatile long deadline;
- Http2StreamChannelImpl(final int id, final boolean idle, final int initialInputWindowSize, final int initialOutputWindowSize) {
+ H2StreamChannelImpl(final int id, final boolean idle, final int initialInputWindowSize, final int initialOutputWindowSize) {
this.id = id;
this.idle = idle;
this.inputWindow = new AtomicInteger(initialInputWindowSize);
@@ -1334,7 +1334,7 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
public void push(final List<Header> headers, final AsyncPushProducer pushProducer) throws HttpException, IOException {
acceptPushRequest();
final int promisedStreamId = generateStreamId();
- final Http2StreamChannelImpl channel = new Http2StreamChannelImpl(
+ final H2StreamChannelImpl channel = new H2StreamChannelImpl(
promisedStreamId,
true,
localConfig.getInitialWindowSize(),
@@ -1342,9 +1342,9 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
final HttpCoreContext context = HttpCoreContext.create();
context.setAttribute(HttpCoreContext.SSL_SESSION, getSSLSession());
context.setAttribute(HttpCoreContext.CONNECTION_ENDPOINT, getEndpointDetails());
- final Http2StreamHandler streamHandler = new ServerPushHttp2StreamHandler(
+ final H2StreamHandler streamHandler = new ServerPushH2StreamHandler(
channel, httpProcessor, connMetrics, pushProducer, context);
- final Http2Stream stream = new Http2Stream(channel, streamHandler, false);
+ final H2Stream stream = new H2Stream(channel, streamHandler, false);
streamMap.put(promisedStreamId, stream);
ioSession.getLock().lock();
@@ -1487,15 +1487,15 @@ abstract class AbstractHttp2StreamMultiplexer implements Identifiable, HttpConne
}
- private static class Http2Stream {
+ private static class H2Stream {
- private final Http2StreamChannelImpl channel;
- private final Http2StreamHandler handler;
+ private final H2StreamChannelImpl channel;
+ private final H2StreamHandler handler;
private final boolean remoteInitiated;
- private Http2Stream(
- final Http2StreamChannelImpl channel,
- final Http2StreamHandler handler,
+ private H2Stream(
+ final H2StreamChannelImpl channel,
+ final H2StreamHandler handler,
final boolean remoteInitiated) {
this.channel = channel;
this.handler = handler;
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2IOEventHandler.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2IOEventHandler.java
similarity index 91%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2IOEventHandler.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2IOEventHandler.java
index 1ca31c7..58f9af5 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2IOEventHandler.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2IOEventHandler.java
@@ -36,9 +36,9 @@ import org.apache.hc.core5.net.InetAddressUtils;
*
* @since 5.0
*/
-public class ClientHttp2IOEventHandler extends AbstractHttp2IOEventHandler {
+public class ClientH2IOEventHandler extends AbstractH2IOEventHandler {
- public ClientHttp2IOEventHandler(final ClientHttp2StreamMultiplexer streamMultiplexer) {
+ public ClientH2IOEventHandler(final ClientH2StreamMultiplexer streamMultiplexer) {
super(streamMultiplexer);
}
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2StreamHandler.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2StreamHandler.java
similarity index 98%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2StreamHandler.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2StreamHandler.java
index 25bc149..17bf977 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2StreamHandler.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2StreamHandler.java
@@ -58,9 +58,9 @@ import org.apache.hc.core5.http2.H2Error;
import org.apache.hc.core5.http2.impl.DefaultH2RequestConverter;
import org.apache.hc.core5.http2.impl.DefaultH2ResponseConverter;
-class ClientHttp2StreamHandler implements Http2StreamHandler {
+class ClientH2StreamHandler implements H2StreamHandler {
- private final Http2StreamChannel outputChannel;
+ private final H2StreamChannel outputChannel;
private final DataStreamChannel dataChannel;
private final HttpProcessor httpProcessor;
private final BasicHttpConnectionMetrics connMetrics;
@@ -74,8 +74,8 @@ class ClientHttp2StreamHandler implements Http2StreamHandler {
private volatile MessageState requestState;
private volatile MessageState responseState;
- ClientHttp2StreamHandler(
- final Http2StreamChannel outputChannel,
+ ClientH2StreamHandler(
+ final H2StreamChannel outputChannel,
final HttpProcessor httpProcessor,
final BasicHttpConnectionMetrics connMetrics,
final AsyncClientExchangeHandler exchangeHandler,
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2StreamMultiplexer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2StreamMultiplexer.java
similarity index 90%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2StreamMultiplexer.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2StreamMultiplexer.java
index e2261a0..c53adb0 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2StreamMultiplexer.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2StreamMultiplexer.java
@@ -54,23 +54,23 @@ import org.apache.hc.core5.reactor.ProtocolIOSession;
* @since 5.0
*/
@Internal
-public class ClientHttp2StreamMultiplexer extends AbstractHttp2StreamMultiplexer {
+public class ClientH2StreamMultiplexer extends AbstractH2StreamMultiplexer {
private final HandlerFactory<AsyncPushConsumer> pushHandlerFactory;
- public ClientHttp2StreamMultiplexer(
+ public ClientH2StreamMultiplexer(
final ProtocolIOSession ioSession,
final FrameFactory frameFactory,
final HttpProcessor httpProcessor,
final HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
final H2Config h2Config,
final CharCodingConfig charCodingConfig,
- final Http2StreamListener streamListener) {
+ final H2StreamListener streamListener) {
super(ioSession, frameFactory, StreamIdGenerator.ODD, httpProcessor, charCodingConfig, h2Config, streamListener);
this.pushHandlerFactory = pushHandlerFactory;
}
- public ClientHttp2StreamMultiplexer(
+ public ClientH2StreamMultiplexer(
final ProtocolIOSession ioSession,
final HttpProcessor httpProcessor,
final HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
@@ -79,7 +79,7 @@ public class ClientHttp2StreamMultiplexer extends AbstractHttp2StreamMultiplexer
this(ioSession, DefaultFrameFactory.INSTANCE, httpProcessor, pushHandlerFactory, h2Config, charCodingConfig, null);
}
- public ClientHttp2StreamMultiplexer(
+ public ClientH2StreamMultiplexer(
final ProtocolIOSession ioSession,
final HttpProcessor httpProcessor,
final H2Config h2Config,
@@ -102,9 +102,9 @@ public class ClientHttp2StreamMultiplexer extends AbstractHttp2StreamMultiplexer
}
@Override
- Http2StreamHandler createLocallyInitiatedStream(
+ H2StreamHandler createLocallyInitiatedStream(
final ExecutableCommand command,
- final Http2StreamChannel channel,
+ final H2StreamChannel channel,
final HttpProcessor httpProcessor,
final BasicHttpConnectionMetrics connMetrics) throws IOException {
if (command instanceof RequestExecutionCommand) {
@@ -114,7 +114,7 @@ public class ClientHttp2StreamMultiplexer extends AbstractHttp2StreamMultiplexer
final HttpCoreContext context = HttpCoreContext.adapt(executionCommand.getContext());
context.setAttribute(HttpCoreContext.SSL_SESSION, getSSLSession());
context.setAttribute(HttpCoreContext.CONNECTION_ENDPOINT, getEndpointDetails());
- return new ClientHttp2StreamHandler(channel, httpProcessor, connMetrics, exchangeHandler,
+ return new ClientH2StreamHandler(channel, httpProcessor, connMetrics, exchangeHandler,
pushHandlerFactory != null ? pushHandlerFactory : this.pushHandlerFactory,
context);
}
@@ -122,15 +122,15 @@ public class ClientHttp2StreamMultiplexer extends AbstractHttp2StreamMultiplexer
}
@Override
- Http2StreamHandler createRemotelyInitiatedStream(
- final Http2StreamChannel channel,
+ H2StreamHandler createRemotelyInitiatedStream(
+ final H2StreamChannel channel,
final HttpProcessor httpProcessor,
final BasicHttpConnectionMetrics connMetrics,
final HandlerFactory<AsyncPushConsumer> pushHandlerFactory) throws IOException {
final HttpCoreContext context = HttpCoreContext.create();
context.setAttribute(HttpCoreContext.SSL_SESSION, getSSLSession());
context.setAttribute(HttpCoreContext.CONNECTION_ENDPOINT, getEndpointDetails());
- return new ClientPushHttp2StreamHandler(channel, httpProcessor, connMetrics,
+ return new ClientPushH2StreamHandler(channel, httpProcessor, connMetrics,
pushHandlerFactory != null ? pushHandlerFactory : this.pushHandlerFactory,
context);
}
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2StreamMultiplexerFactory.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2StreamMultiplexerFactory.java
similarity index 82%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2StreamMultiplexerFactory.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2StreamMultiplexerFactory.java
index 868ab76..574834a 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttp2StreamMultiplexerFactory.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientH2StreamMultiplexerFactory.java
@@ -40,26 +40,26 @@ import org.apache.hc.core5.reactor.ProtocolIOSession;
import org.apache.hc.core5.util.Args;
/**
- * {@link ClientHttp2StreamMultiplexer} factory.
+ * {@link ClientH2StreamMultiplexer} factory.
*
* @since 5.0
*/
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
@Internal
-public final class ClientHttp2StreamMultiplexerFactory {
+public final class ClientH2StreamMultiplexerFactory {
private final HttpProcessor httpProcessor;
private final HandlerFactory<AsyncPushConsumer> pushHandlerFactory;
private final H2Config h2Config;
private final CharCodingConfig charCodingConfig;
- private final Http2StreamListener streamListener;
+ private final H2StreamListener streamListener;
- public ClientHttp2StreamMultiplexerFactory(
+ public ClientH2StreamMultiplexerFactory(
final HttpProcessor httpProcessor,
final HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
final H2Config h2Config,
final CharCodingConfig charCodingConfig,
- final Http2StreamListener streamListener) {
+ final H2StreamListener streamListener) {
this.httpProcessor = Args.notNull(httpProcessor, "HTTP processor");
this.pushHandlerFactory = pushHandlerFactory;
this.h2Config = h2Config != null ? h2Config : H2Config.DEFAULT;
@@ -67,21 +67,21 @@ public final class ClientHttp2StreamMultiplexerFactory {
this.streamListener = streamListener;
}
- public ClientHttp2StreamMultiplexerFactory(
+ public ClientH2StreamMultiplexerFactory(
final HttpProcessor httpProcessor,
final HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
- final Http2StreamListener streamListener) {
+ final H2StreamListener streamListener) {
this(httpProcessor, pushHandlerFactory, null, null, streamListener);
}
- public ClientHttp2StreamMultiplexerFactory(
+ public ClientH2StreamMultiplexerFactory(
final HttpProcessor httpProcessor,
- final Http2StreamListener streamListener) {
+ final H2StreamListener streamListener) {
this(httpProcessor, null, streamListener);
}
- public ClientHttp2StreamMultiplexer create(final ProtocolIOSession ioSession) {
- return new ClientHttp2StreamMultiplexer(ioSession, DefaultFrameFactory.INSTANCE, httpProcessor,
+ public ClientH2StreamMultiplexer create(final ProtocolIOSession ioSession) {
+ return new ClientH2StreamMultiplexer(ioSession, DefaultFrameFactory.INSTANCE, httpProcessor,
pushHandlerFactory, h2Config, charCodingConfig, streamListener);
}
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttpProtocolNegotiator.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttpProtocolNegotiator.java
index 3dc0fc1..c7c9ae3 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttpProtocolNegotiator.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttpProtocolNegotiator.java
@@ -71,7 +71,7 @@ public class ClientHttpProtocolNegotiator implements HttpConnectionEventHandler
private final ProtocolIOSession ioSession;
private final ClientHttp1StreamDuplexerFactory http1StreamHandlerFactory;
- private final ClientHttp2StreamMultiplexerFactory http2StreamHandlerFactory;
+ private final ClientH2StreamMultiplexerFactory http2StreamHandlerFactory;
private final HttpVersionPolicy versionPolicy;
private final AtomicReference<HttpConnectionEventHandler> protocolHandlerRef;
@@ -80,7 +80,7 @@ public class ClientHttpProtocolNegotiator implements HttpConnectionEventHandler
public ClientHttpProtocolNegotiator(
final ProtocolIOSession ioSession,
final ClientHttp1StreamDuplexerFactory http1StreamHandlerFactory,
- final ClientHttp2StreamMultiplexerFactory http2StreamHandlerFactory,
+ final ClientH2StreamMultiplexerFactory http2StreamHandlerFactory,
final HttpVersionPolicy versionPolicy) {
this.ioSession = Args.notNull(ioSession, "I/O session");
this.http1StreamHandlerFactory = Args.notNull(http1StreamHandlerFactory, "HTTP/1.1 stream handler factory");
@@ -103,8 +103,8 @@ public class ClientHttpProtocolNegotiator implements HttpConnectionEventHandler
}
private void startHttp2(final IOSession session) {
- final ClientHttp2StreamMultiplexer streamMultiplexer = http2StreamHandlerFactory.create(ioSession);
- final HttpConnectionEventHandler protocolHandler = new ClientHttp2IOEventHandler(streamMultiplexer);
+ final ClientH2StreamMultiplexer streamMultiplexer = http2StreamHandlerFactory.create(ioSession);
+ final HttpConnectionEventHandler protocolHandler = new ClientH2IOEventHandler(streamMultiplexer);
try {
ioSession.upgrade(protocolHandler);
protocolHandlerRef.set(protocolHandler);
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttpProtocolNegotiatorFactory.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttpProtocolNegotiatorFactory.java
index 5a86e45..18381df 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttpProtocolNegotiatorFactory.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientHttpProtocolNegotiatorFactory.java
@@ -50,14 +50,14 @@ import org.apache.hc.core5.util.Timeout;
public class ClientHttpProtocolNegotiatorFactory implements IOEventHandlerFactory {
private final ClientHttp1StreamDuplexerFactory http1StreamHandlerFactory;
- private final ClientHttp2StreamMultiplexerFactory http2StreamHandlerFactory;
+ private final ClientH2StreamMultiplexerFactory http2StreamHandlerFactory;
private final HttpVersionPolicy versionPolicy;
private final TlsStrategy tlsStrategy;
private final Timeout handshakeTimeout;
public ClientHttpProtocolNegotiatorFactory(
final ClientHttp1StreamDuplexerFactory http1StreamHandlerFactory,
- final ClientHttp2StreamMultiplexerFactory http2StreamHandlerFactory,
+ final ClientH2StreamMultiplexerFactory http2StreamHandlerFactory,
final HttpVersionPolicy versionPolicy,
final TlsStrategy tlsStrategy,
final Timeout handshakeTimeout) {
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientPushHttp2StreamHandler.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientPushH2StreamHandler.java
similarity index 97%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientPushHttp2StreamHandler.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientPushH2StreamHandler.java
index 4cdb523..1e7dd5b 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientPushHttp2StreamHandler.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ClientPushH2StreamHandler.java
@@ -52,9 +52,9 @@ import org.apache.hc.core5.http2.impl.DefaultH2RequestConverter;
import org.apache.hc.core5.http2.impl.DefaultH2ResponseConverter;
import org.apache.hc.core5.util.Asserts;
-class ClientPushHttp2StreamHandler implements Http2StreamHandler {
+class ClientPushH2StreamHandler implements H2StreamHandler {
- private final Http2StreamChannel internalOutputChannel;
+ private final H2StreamChannel internalOutputChannel;
private final HttpProcessor httpProcessor;
private final BasicHttpConnectionMetrics connMetrics;
private final HandlerFactory<AsyncPushConsumer> pushHandlerFactory;
@@ -67,8 +67,8 @@ class ClientPushHttp2StreamHandler implements Http2StreamHandler {
private volatile MessageState requestState;
private volatile MessageState responseState;
- ClientPushHttp2StreamHandler(
- final Http2StreamChannel outputChannel,
+ ClientPushH2StreamHandler(
+ final H2StreamChannel outputChannel,
final HttpProcessor httpProcessor,
final BasicHttpConnectionMetrics connMetrics,
final HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2OnlyClientProtocolNegotiator.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2OnlyClientProtocolNegotiator.java
similarity index 94%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2OnlyClientProtocolNegotiator.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2OnlyClientProtocolNegotiator.java
index 2c09259..68fcd98 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2OnlyClientProtocolNegotiator.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2OnlyClientProtocolNegotiator.java
@@ -62,17 +62,17 @@ import org.apache.hc.core5.util.Timeout;
* @since 5.0
*/
@Internal
-public class Http2OnlyClientProtocolNegotiator implements HttpConnectionEventHandler {
+public class H2OnlyClientProtocolNegotiator implements HttpConnectionEventHandler {
private final ProtocolIOSession ioSession;
- private final ClientHttp2StreamMultiplexerFactory http2StreamHandlerFactory;
+ private final ClientH2StreamMultiplexerFactory http2StreamHandlerFactory;
private final boolean strictALPNHandshake;
private final ByteBuffer preface;
- public Http2OnlyClientProtocolNegotiator(
+ public H2OnlyClientProtocolNegotiator(
final ProtocolIOSession ioSession,
- final ClientHttp2StreamMultiplexerFactory http2StreamHandlerFactory,
+ final ClientH2StreamMultiplexerFactory http2StreamHandlerFactory,
final boolean strictALPNHandshake) {
this.ioSession = Args.notNull(ioSession, "I/O session");
this.http2StreamHandlerFactory = Args.notNull(http2StreamHandlerFactory, "HTTP/2 stream handler factory");
@@ -109,8 +109,8 @@ public class Http2OnlyClientProtocolNegotiator implements HttpConnectionEventHan
channel.write(preface);
}
if (!preface.hasRemaining()) {
- final ClientHttp2StreamMultiplexer streamMultiplexer = http2StreamHandlerFactory.create(ioSession);
- final IOEventHandler newHandler = new ClientHttp2IOEventHandler(streamMultiplexer);
+ final ClientH2StreamMultiplexer streamMultiplexer = http2StreamHandlerFactory.create(ioSession);
+ final IOEventHandler newHandler = new ClientH2IOEventHandler(streamMultiplexer);
newHandler.connected(session);
ioSession.upgrade(newHandler);
}
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2StreamChannel.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2StreamChannel.java
similarity index 95%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2StreamChannel.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2StreamChannel.java
index b352dc9..d200745 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2StreamChannel.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2StreamChannel.java
@@ -37,7 +37,7 @@ import org.apache.hc.core5.http.nio.AsyncPushProducer;
import org.apache.hc.core5.http.nio.CapacityChannel;
import org.apache.hc.core5.http.nio.DataStreamChannel;
-interface Http2StreamChannel extends DataStreamChannel, CapacityChannel, Cancellable {
+interface H2StreamChannel extends DataStreamChannel, CapacityChannel, Cancellable {
void submit(List<Header> headers, boolean endStream) throws HttpException, IOException;
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2StreamHandler.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2StreamHandler.java
similarity index 97%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2StreamHandler.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2StreamHandler.java
index b8e3e1f..11c0703 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2StreamHandler.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2StreamHandler.java
@@ -36,7 +36,7 @@ import org.apache.hc.core5.http.nio.AsyncPushConsumer;
import org.apache.hc.core5.http.nio.HandlerFactory;
import org.apache.hc.core5.http.nio.ResourceHolder;
-interface Http2StreamHandler extends ResourceHolder {
+interface H2StreamHandler extends ResourceHolder {
boolean isOutputReady();
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2StreamListener.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2StreamListener.java
similarity index 98%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2StreamListener.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2StreamListener.java
index 5ca0f52..98cc6f0 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/Http2StreamListener.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2StreamListener.java
@@ -42,7 +42,7 @@ import org.apache.hc.core5.http2.frame.RawFrame;
*/
@Contract(threading = ThreadingBehavior.STATELESS)
@Internal
-public interface Http2StreamListener {
+public interface H2StreamListener {
void onHeaderInput(HttpConnection connection, int streamId, List<? extends Header> headers);
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2IOEventHandler.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2IOEventHandler.java
similarity index 91%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2IOEventHandler.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2IOEventHandler.java
index 4afb73c..3e340ca 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2IOEventHandler.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2IOEventHandler.java
@@ -36,9 +36,9 @@ import org.apache.hc.core5.net.InetAddressUtils;
*
* @since 5.0
*/
-public class ServerHttp2IOEventHandler extends AbstractHttp2IOEventHandler{
+public class ServerH2IOEventHandler extends AbstractH2IOEventHandler {
- public ServerHttp2IOEventHandler(final ServerHttp2StreamMultiplexer streamMultiplexer) {
+ public ServerH2IOEventHandler(final ServerH2StreamMultiplexer streamMultiplexer) {
super(streamMultiplexer);
}
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2StreamHandler.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamHandler.java
similarity index 98%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2StreamHandler.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamHandler.java
index 70f02fb..e0520df 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2StreamHandler.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamHandler.java
@@ -62,9 +62,9 @@ import org.apache.hc.core5.http2.impl.DefaultH2RequestConverter;
import org.apache.hc.core5.http2.impl.DefaultH2ResponseConverter;
import org.apache.hc.core5.util.Asserts;
-public class ServerHttp2StreamHandler implements Http2StreamHandler {
+public class ServerH2StreamHandler implements H2StreamHandler {
- private final Http2StreamChannel outputChannel;
+ private final H2StreamChannel outputChannel;
private final DataStreamChannel dataChannel;
private final HttpProcessor httpProcessor;
private final BasicHttpConnectionMetrics connMetrics;
@@ -79,8 +79,8 @@ public class ServerHttp2StreamHandler implements Http2StreamHandler {
private volatile MessageState requestState;
private volatile MessageState responseState;
- ServerHttp2StreamHandler(
- final Http2StreamChannel outputChannel,
+ ServerH2StreamHandler(
+ final H2StreamChannel outputChannel,
final HttpProcessor httpProcessor,
final BasicHttpConnectionMetrics connMetrics,
final HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory,
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2StreamMultiplexer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamMultiplexer.java
similarity index 89%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2StreamMultiplexer.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamMultiplexer.java
index 69b3279..a1783a1 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2StreamMultiplexer.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamMultiplexer.java
@@ -54,23 +54,23 @@ import org.apache.hc.core5.util.Args;
* @since 5.0
*/
@Internal
-public class ServerHttp2StreamMultiplexer extends AbstractHttp2StreamMultiplexer {
+public class ServerH2StreamMultiplexer extends AbstractH2StreamMultiplexer {
private final HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory;
- public ServerHttp2StreamMultiplexer(
+ public ServerH2StreamMultiplexer(
final ProtocolIOSession ioSession,
final FrameFactory frameFactory,
final HttpProcessor httpProcessor,
final HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory,
final CharCodingConfig charCodingConfig,
final H2Config h2Config,
- final Http2StreamListener streamListener) {
+ final H2StreamListener streamListener) {
super(ioSession, frameFactory, StreamIdGenerator.EVEN, httpProcessor, charCodingConfig, h2Config, streamListener);
this.exchangeHandlerFactory = Args.notNull(exchangeHandlerFactory, "Handler factory");
}
- public ServerHttp2StreamMultiplexer(
+ public ServerH2StreamMultiplexer(
final ProtocolIOSession ioSession,
final HttpProcessor httpProcessor,
final HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory,
@@ -93,21 +93,21 @@ public class ServerHttp2StreamMultiplexer extends AbstractHttp2StreamMultiplexer
}
@Override
- Http2StreamHandler createRemotelyInitiatedStream(
- final Http2StreamChannel channel,
+ H2StreamHandler createRemotelyInitiatedStream(
+ final H2StreamChannel channel,
final HttpProcessor httpProcessor,
final BasicHttpConnectionMetrics connMetrics,
final HandlerFactory<AsyncPushConsumer> pushHandlerFactory) throws IOException {
final HttpCoreContext context = HttpCoreContext.create();
context.setAttribute(HttpCoreContext.SSL_SESSION, getSSLSession());
context.setAttribute(HttpCoreContext.CONNECTION_ENDPOINT, getEndpointDetails());
- return new ServerHttp2StreamHandler(channel, httpProcessor, connMetrics, exchangeHandlerFactory, context);
+ return new ServerH2StreamHandler(channel, httpProcessor, connMetrics, exchangeHandlerFactory, context);
}
@Override
- Http2StreamHandler createLocallyInitiatedStream(
+ H2StreamHandler createLocallyInitiatedStream(
final ExecutableCommand command,
- final Http2StreamChannel channel,
+ final H2StreamChannel channel,
final HttpProcessor httpProcessor,
final BasicHttpConnectionMetrics connMetrics) throws IOException {
throw new H2ConnectionException(H2Error.INTERNAL_ERROR, "Illegal attempt to execute a request");
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2StreamMultiplexerFactory.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamMultiplexerFactory.java
similarity index 88%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2StreamMultiplexerFactory.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamMultiplexerFactory.java
index a2871d5..38f0c08 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttp2StreamMultiplexerFactory.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamMultiplexerFactory.java
@@ -40,26 +40,26 @@ import org.apache.hc.core5.reactor.ProtocolIOSession;
import org.apache.hc.core5.util.Args;
/**
- * {@link ServerHttp2StreamMultiplexer} factory.
+ * {@link ServerH2StreamMultiplexer} factory.
*
* @since 5.0
*/
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
@Internal
-public final class ServerHttp2StreamMultiplexerFactory {
+public final class ServerH2StreamMultiplexerFactory {
private final HttpProcessor httpProcessor;
private final HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory;
private final H2Config h2Config;
private final CharCodingConfig charCodingConfig;
- private final Http2StreamListener streamListener;
+ private final H2StreamListener streamListener;
- public ServerHttp2StreamMultiplexerFactory(
+ public ServerH2StreamMultiplexerFactory(
final HttpProcessor httpProcessor,
final HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory,
final H2Config h2Config,
final CharCodingConfig charCodingConfig,
- final Http2StreamListener streamListener) {
+ final H2StreamListener streamListener) {
this.httpProcessor = Args.notNull(httpProcessor, "HTTP processor");
this.exchangeHandlerFactory = Args.notNull(exchangeHandlerFactory, "Exchange handler factory");
this.h2Config = h2Config != null ? h2Config : H2Config.DEFAULT;
@@ -67,8 +67,8 @@ public final class ServerHttp2StreamMultiplexerFactory {
this.streamListener = streamListener;
}
- public ServerHttp2StreamMultiplexer create(final ProtocolIOSession ioSession) {
- return new ServerHttp2StreamMultiplexer(
+ public ServerH2StreamMultiplexer create(final ProtocolIOSession ioSession) {
+ return new ServerH2StreamMultiplexer(
ioSession,
DefaultFrameFactory.INSTANCE,
httpProcessor,
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttpProtocolNegotiator.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttpProtocolNegotiator.java
index 84d6714..157a2a1 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttpProtocolNegotiator.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttpProtocolNegotiator.java
@@ -68,7 +68,7 @@ public class ServerHttpProtocolNegotiator implements HttpConnectionEventHandler
private final ProtocolIOSession ioSession;
private final ServerHttp1StreamDuplexerFactory http1StreamHandlerFactory;
- private final ServerHttp2StreamMultiplexerFactory http2StreamHandlerFactory;
+ private final ServerH2StreamMultiplexerFactory http2StreamHandlerFactory;
private final HttpVersionPolicy versionPolicy;
private final ByteBuffer bytebuf;
private final AtomicReference<HttpConnectionEventHandler> protocolHandlerRef;
@@ -78,7 +78,7 @@ public class ServerHttpProtocolNegotiator implements HttpConnectionEventHandler
public ServerHttpProtocolNegotiator(
final ProtocolIOSession ioSession,
final ServerHttp1StreamDuplexerFactory http1StreamHandlerFactory,
- final ServerHttp2StreamMultiplexerFactory http2StreamHandlerFactory,
+ final ServerH2StreamMultiplexerFactory http2StreamHandlerFactory,
final HttpVersionPolicy versionPolicy) {
this.ioSession = Args.notNull(ioSession, "I/O session");
this.http1StreamHandlerFactory = Args.notNull(http1StreamHandlerFactory, "HTTP/1.1 stream handler factory");
@@ -143,8 +143,8 @@ public class ServerHttpProtocolNegotiator implements HttpConnectionEventHandler
}
}
if (validH2Preface) {
- final ServerHttp2StreamMultiplexer http2StreamHandler = http2StreamHandlerFactory.create(ioSession);
- final HttpConnectionEventHandler protocolHandler = new ServerHttp2IOEventHandler(http2StreamHandler);
+ final ServerH2StreamMultiplexer http2StreamHandler = http2StreamHandlerFactory.create(ioSession);
+ final HttpConnectionEventHandler protocolHandler = new ServerH2IOEventHandler(http2StreamHandler);
ioSession.upgrade(protocolHandler);
protocolHandlerRef.set(protocolHandler);
http2StreamHandler.onConnect(bytebuf.hasRemaining() ? bytebuf : null);
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttpProtocolNegotiatorFactory.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttpProtocolNegotiatorFactory.java
index 0a57aec..074aad9 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttpProtocolNegotiatorFactory.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerHttpProtocolNegotiatorFactory.java
@@ -48,14 +48,14 @@ import org.apache.hc.core5.util.Timeout;
public class ServerHttpProtocolNegotiatorFactory implements IOEventHandlerFactory {
private final ServerHttp1StreamDuplexerFactory http1StreamDuplexerFactory;
- private final ServerHttp2StreamMultiplexerFactory http2StreamMultiplexerFactory;
+ private final ServerH2StreamMultiplexerFactory http2StreamMultiplexerFactory;
private final HttpVersionPolicy versionPolicy;
private final TlsStrategy tlsStrategy;
private final Timeout handshakeTimeout;
public ServerHttpProtocolNegotiatorFactory(
final ServerHttp1StreamDuplexerFactory http1StreamDuplexerFactory,
- final ServerHttp2StreamMultiplexerFactory http2StreamMultiplexerFactory,
+ final ServerH2StreamMultiplexerFactory http2StreamMultiplexerFactory,
final HttpVersionPolicy versionPolicy,
final TlsStrategy tlsStrategy,
final Timeout handshakeTimeout) {
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerPushHttp2StreamHandler.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerPushH2StreamHandler.java
similarity index 97%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerPushHttp2StreamHandler.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerPushH2StreamHandler.java
index 374441e..bc6b1d2 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerPushHttp2StreamHandler.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerPushH2StreamHandler.java
@@ -54,9 +54,9 @@ import org.apache.hc.core5.http2.H2Error;
import org.apache.hc.core5.http2.impl.DefaultH2RequestConverter;
import org.apache.hc.core5.http2.impl.DefaultH2ResponseConverter;
-class ServerPushHttp2StreamHandler implements Http2StreamHandler {
+class ServerPushH2StreamHandler implements H2StreamHandler {
- private final Http2StreamChannel outputChannel;
+ private final H2StreamChannel outputChannel;
private final DataStreamChannel dataChannel;
private final HttpProcessor httpProcessor;
private final BasicHttpConnectionMetrics connMetrics;
@@ -69,8 +69,8 @@ class ServerPushHttp2StreamHandler implements Http2StreamHandler {
private volatile MessageState requestState;
private volatile MessageState responseState;
- ServerPushHttp2StreamHandler(
- final Http2StreamChannel outputChannel,
+ ServerPushH2StreamHandler(
+ final H2StreamChannel outputChannel,
final HttpProcessor httpProcessor,
final BasicHttpConnectionMetrics connMetrics,
final AsyncPushProducer pushProducer,
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/Http2AsyncRequester.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2AsyncRequester.java
similarity index 97%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/Http2AsyncRequester.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2AsyncRequester.java
index 58af7ee..bd51bc5 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/Http2AsyncRequester.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2AsyncRequester.java
@@ -51,7 +51,7 @@ import org.apache.hc.core5.util.Timeout;
*
* @since 5.0
*/
-public class Http2AsyncRequester extends HttpAsyncRequester {
+public class H2AsyncRequester extends HttpAsyncRequester {
private final HttpVersionPolicy versionPolicy;
@@ -59,7 +59,7 @@ public class Http2AsyncRequester extends HttpAsyncRequester {
* Use {@link H2RequesterBootstrap} to create instances of this class.
*/
@Internal
- public Http2AsyncRequester(
+ public H2AsyncRequester(
final HttpVersionPolicy versionPolicy,
final IOReactorConfig ioReactorConfig,
final IOEventHandlerFactory eventHandlerFactory,
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/Http2MultiplexingRequester.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequester.java
similarity index 98%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/Http2MultiplexingRequester.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequester.java
index 3ba70ff..f7a269d 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/Http2MultiplexingRequester.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequester.java
@@ -82,15 +82,15 @@ import org.apache.hc.core5.util.Timeout;
*
* @since 5.0
*/
-public class Http2MultiplexingRequester extends AsyncRequester{
+public class H2MultiplexingRequester extends AsyncRequester{
private final H2ConnPool connPool;
/**
- * Use {@link Http2MultiplexingRequesterBootstrap} to create instances of this class.
+ * Use {@link H2MultiplexingRequesterBootstrap} to create instances of this class.
*/
@Internal
- public Http2MultiplexingRequester(
+ public H2MultiplexingRequester(
final IOReactorConfig ioReactorConfig,
final IOEventHandlerFactory eventHandlerFactory,
final Decorator<ProtocolIOSession> ioSessionDecorator,
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/Http2MultiplexingRequesterBootstrap.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequesterBootstrap.java
similarity index 71%
rename from httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/Http2MultiplexingRequesterBootstrap.java
rename to httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequesterBootstrap.java
index 9ab396a..244ab2f 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/Http2MultiplexingRequesterBootstrap.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2MultiplexingRequesterBootstrap.java
@@ -40,10 +40,10 @@ import org.apache.hc.core5.http.protocol.HttpProcessor;
import org.apache.hc.core5.http.protocol.RequestHandlerRegistry;
import org.apache.hc.core5.http.protocol.UriPatternType;
import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.http2.impl.Http2Processors;
-import org.apache.hc.core5.http2.impl.nio.ClientHttp2StreamMultiplexerFactory;
-import org.apache.hc.core5.http2.impl.nio.Http2OnlyClientProtocolNegotiator;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
+import org.apache.hc.core5.http2.impl.H2Processors;
+import org.apache.hc.core5.http2.impl.nio.ClientH2StreamMultiplexerFactory;
+import org.apache.hc.core5.http2.impl.nio.H2OnlyClientProtocolNegotiator;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
import org.apache.hc.core5.http2.nio.support.DefaultAsyncPushConsumerFactory;
import org.apache.hc.core5.http2.ssl.H2ClientTlsStrategy;
import org.apache.hc.core5.reactor.IOEventHandler;
@@ -54,11 +54,11 @@ import org.apache.hc.core5.reactor.ProtocolIOSession;
import org.apache.hc.core5.util.Args;
/**
- * {@link Http2MultiplexingRequester} bootstrap.
+ * {@link H2MultiplexingRequester} bootstrap.
*
* @since 5.0
*/
-public class Http2MultiplexingRequesterBootstrap {
+public class H2MultiplexingRequesterBootstrap {
private final List<HandlerEntry<Supplier<AsyncPushConsumer>>> pushConsumerList;
private UriPatternType uriPatternType;
@@ -71,20 +71,20 @@ public class Http2MultiplexingRequesterBootstrap {
private Decorator<ProtocolIOSession> ioSessionDecorator;
private Callback<Exception> exceptionCallback;
private IOSessionListener sessionListener;
- private Http2StreamListener streamListener;
+ private H2StreamListener streamListener;
- private Http2MultiplexingRequesterBootstrap() {
+ private H2MultiplexingRequesterBootstrap() {
this.pushConsumerList = new ArrayList<>();
}
- public static Http2MultiplexingRequesterBootstrap bootstrap() {
- return new Http2MultiplexingRequesterBootstrap();
+ public static H2MultiplexingRequesterBootstrap bootstrap() {
+ return new H2MultiplexingRequesterBootstrap();
}
/**
* Sets I/O reactor configuration.
*/
- public final Http2MultiplexingRequesterBootstrap setIOReactorConfig(final IOReactorConfig ioReactorConfig) {
+ public final H2MultiplexingRequesterBootstrap setIOReactorConfig(final IOReactorConfig ioReactorConfig) {
this.ioReactorConfig = ioReactorConfig;
return this;
}
@@ -92,7 +92,7 @@ public class Http2MultiplexingRequesterBootstrap {
/**
* Assigns {@link HttpProcessor} instance.
*/
- public final Http2MultiplexingRequesterBootstrap setHttpProcessor(final HttpProcessor httpProcessor) {
+ public final H2MultiplexingRequesterBootstrap setHttpProcessor(final HttpProcessor httpProcessor) {
this.httpProcessor = httpProcessor;
return this;
}
@@ -100,7 +100,7 @@ public class Http2MultiplexingRequesterBootstrap {
/**
* Sets HTTP/2 protocol parameters
*/
- public final Http2MultiplexingRequesterBootstrap setH2Config(final H2Config h2Config) {
+ public final H2MultiplexingRequesterBootstrap setH2Config(final H2Config h2Config) {
this.h2Config = h2Config;
return this;
}
@@ -108,7 +108,7 @@ public class Http2MultiplexingRequesterBootstrap {
/**
* Sets message char coding.
*/
- public final Http2MultiplexingRequesterBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) {
+ public final H2MultiplexingRequesterBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) {
this.charCodingConfig = charCodingConfig;
return this;
}
@@ -116,12 +116,12 @@ public class Http2MultiplexingRequesterBootstrap {
/**
* Assigns {@link TlsStrategy} instance.
*/
- public final Http2MultiplexingRequesterBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) {
+ public final H2MultiplexingRequesterBootstrap setTlsStrategy(final TlsStrategy tlsStrategy) {
this.tlsStrategy = tlsStrategy;
return this;
}
- public final Http2MultiplexingRequesterBootstrap setStrictALPNHandshake(final boolean strictALPNHandshake) {
+ public final H2MultiplexingRequesterBootstrap setStrictALPNHandshake(final boolean strictALPNHandshake) {
this.strictALPNHandshake = strictALPNHandshake;
return this;
}
@@ -129,7 +129,7 @@ public class Http2MultiplexingRequesterBootstrap {
/**
* Assigns {@link ProtocolIOSession} {@link Decorator} instance.
*/
- public final Http2MultiplexingRequesterBootstrap setIOSessionDecorator(final Decorator<ProtocolIOSession> ioSessionDecorator) {
+ public final H2MultiplexingRequesterBootstrap setIOSessionDecorator(final Decorator<ProtocolIOSession> ioSessionDecorator) {
this.ioSessionDecorator = ioSessionDecorator;
return this;
}
@@ -137,7 +137,7 @@ public class Http2MultiplexingRequesterBootstrap {
/**
* Assigns {@link Exception} {@link Callback} instance.
*/
- public final Http2MultiplexingRequesterBootstrap setExceptionCallback(final Callback<Exception> exceptionCallback) {
+ public final H2MultiplexingRequesterBootstrap setExceptionCallback(final Callback<Exception> exceptionCallback) {
this.exceptionCallback = exceptionCallback;
return this;
}
@@ -145,15 +145,15 @@ public class Http2MultiplexingRequesterBootstrap {
/**
* Assigns {@link IOSessionListener} instance.
*/
- public final Http2MultiplexingRequesterBootstrap setIOSessionListener(final IOSessionListener sessionListener) {
+ public final H2MultiplexingRequesterBootstrap setIOSessionListener(final IOSessionListener sessionListener) {
this.sessionListener = sessionListener;
return this;
}
/**
- * Assigns {@link Http2StreamListener} instance.
+ * Assigns {@link H2StreamListener} instance.
*/
- public final Http2MultiplexingRequesterBootstrap setStreamListener(final Http2StreamListener streamListener) {
+ public final H2MultiplexingRequesterBootstrap setStreamListener(final H2StreamListener streamListener) {
this.streamListener = streamListener;
return this;
}
@@ -161,7 +161,7 @@ public class Http2MultiplexingRequesterBootstrap {
/**
* Assigns {@link UriPatternType} for handler registration.
*/
- public final Http2MultiplexingRequesterBootstrap setUriPatternType(final UriPatternType uriPatternType) {
+ public final H2MultiplexingRequesterBootstrap setUriPatternType(final UriPatternType uriPatternType) {
this.uriPatternType = uriPatternType;
return this;
}
@@ -173,7 +173,7 @@ public class Http2MultiplexingRequesterBootstrap {
* @param uriPattern the pattern to register the handler for.
* @param supplier the handler supplier.
*/
- public final Http2MultiplexingRequesterBootstrap register(final String uriPattern, final Supplier<AsyncPushConsumer> supplier) {
+ public final H2MultiplexingRequesterBootstrap register(final String uriPattern, final Supplier<AsyncPushConsumer> supplier) {
Args.notBlank(uriPattern, "URI pattern");
Args.notNull(supplier, "Supplier");
pushConsumerList.add(new HandlerEntry<>(null, uriPattern, supplier));
@@ -188,7 +188,7 @@ public class Http2MultiplexingRequesterBootstrap {
* @param uriPattern the pattern to register the handler for.
* @param supplier the handler supplier.
*/
- public final Http2MultiplexingRequesterBootstrap registerVirtual(final String hostname, final String uriPattern, final Supplier<AsyncPushConsumer> supplier) {
+ public final H2MultiplexingRequesterBootstrap registerVirtual(final String hostname, final String uriPattern, final Supplier<AsyncPushConsumer> supplier) {
Args.notBlank(hostname, "Hostname");
Args.notBlank(uriPattern, "URI pattern");
Args.notNull(supplier, "Supplier");
@@ -196,24 +196,24 @@ public class Http2MultiplexingRequesterBootstrap {
return this;
}
- public Http2MultiplexingRequester create() {
+ public H2MultiplexingRequester create() {
final RequestHandlerRegistry<Supplier<AsyncPushConsumer>> registry = new RequestHandlerRegistry<>(uriPatternType);
for (final HandlerEntry<Supplier<AsyncPushConsumer>> entry: pushConsumerList) {
registry.register(entry.hostname, entry.uriPattern, entry.handler);
}
- final ClientHttp2StreamMultiplexerFactory http2StreamHandlerFactory = new ClientHttp2StreamMultiplexerFactory(
- httpProcessor != null ? httpProcessor : Http2Processors.client(),
+ final ClientH2StreamMultiplexerFactory http2StreamHandlerFactory = new ClientH2StreamMultiplexerFactory(
+ httpProcessor != null ? httpProcessor : H2Processors.client(),
new DefaultAsyncPushConsumerFactory(registry),
h2Config != null ? h2Config : H2Config.DEFAULT,
charCodingConfig != null ? charCodingConfig : CharCodingConfig.DEFAULT,
streamListener);
- return new Http2MultiplexingRequester(
+ return new H2MultiplexingRequester(
ioReactorConfig,
new IOEventHandlerFactory() {
@Override
public IOEventHandler createHandler(final ProtocolIOSession ioSession, final Object attachment) {
- return new Http2OnlyClientProtocolNegotiator(ioSession, http2StreamHandlerFactory, strictALPNHandshake);
+ return new H2OnlyClientProtocolNegotiator(ioSession, http2StreamHandlerFactory, strictALPNHandshake);
}
},
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java
index 4dc8234..ceb8c15 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java
@@ -46,10 +46,10 @@ import org.apache.hc.core5.http.protocol.RequestHandlerRegistry;
import org.apache.hc.core5.http.protocol.UriPatternType;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.http2.impl.Http2Processors;
-import org.apache.hc.core5.http2.impl.nio.ClientHttp2StreamMultiplexerFactory;
+import org.apache.hc.core5.http2.impl.H2Processors;
+import org.apache.hc.core5.http2.impl.nio.ClientH2StreamMultiplexerFactory;
import org.apache.hc.core5.http2.impl.nio.ClientHttpProtocolNegotiatorFactory;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
import org.apache.hc.core5.http2.nio.support.DefaultAsyncPushConsumerFactory;
import org.apache.hc.core5.http2.ssl.H2ClientTlsStrategy;
import org.apache.hc.core5.pool.ConnPoolListener;
@@ -68,7 +68,7 @@ import org.apache.hc.core5.util.TimeValue;
import org.apache.hc.core5.util.Timeout;
/**
- * {@link Http2AsyncRequester} bootstrap.
+ * {@link H2AsyncRequester} bootstrap.
*
* @since 5.0
*/
@@ -92,7 +92,7 @@ public class H2RequesterBootstrap {
private Decorator<ProtocolIOSession> ioSessionDecorator;
private Callback<Exception> exceptionCallback;
private IOSessionListener sessionListener;
- private Http2StreamListener streamListener;
+ private H2StreamListener streamListener;
private Http1StreamListener http1StreamListener;
private ConnPoolListener<HttpHost> connPoolListener;
@@ -222,9 +222,9 @@ public class H2RequesterBootstrap {
}
/**
- * Assigns {@link Http2StreamListener} instance.
+ * Assigns {@link H2StreamListener} instance.
*/
- public final H2RequesterBootstrap setStreamListener(final Http2StreamListener streamListener) {
+ public final H2RequesterBootstrap setStreamListener(final H2StreamListener streamListener) {
this.streamListener = streamListener;
return this;
}
@@ -283,7 +283,7 @@ public class H2RequesterBootstrap {
return this;
}
- public Http2AsyncRequester create() {
+ public H2AsyncRequester create() {
final ManagedConnPool<HttpHost, IOSession> connPool;
switch (poolConcurrencyPolicy != null ? poolConcurrencyPolicy : PoolConcurrencyPolicy.STRICT) {
case LAX:
@@ -312,8 +312,8 @@ public class H2RequesterBootstrap {
http1Config != null ? http1Config : Http1Config.DEFAULT,
charCodingConfig != null ? charCodingConfig : CharCodingConfig.DEFAULT,
http1StreamListener);
- final ClientHttp2StreamMultiplexerFactory http2StreamHandlerFactory = new ClientHttp2StreamMultiplexerFactory(
- httpProcessor != null ? httpProcessor : Http2Processors.client(),
+ final ClientH2StreamMultiplexerFactory http2StreamHandlerFactory = new ClientH2StreamMultiplexerFactory(
+ httpProcessor != null ? httpProcessor : H2Processors.client(),
new DefaultAsyncPushConsumerFactory(registry),
h2Config != null ? h2Config : H2Config.DEFAULT,
charCodingConfig != null ? charCodingConfig : CharCodingConfig.DEFAULT,
@@ -324,7 +324,7 @@ public class H2RequesterBootstrap {
versionPolicy != null ? versionPolicy : HttpVersionPolicy.NEGOTIATE,
tlsStrategy != null ? tlsStrategy : new H2ClientTlsStrategy(),
handshakeTimeout);
- return new Http2AsyncRequester(
+ return new H2AsyncRequester(
versionPolicy != null ? versionPolicy : HttpVersionPolicy.NEGOTIATE,
ioReactorConfig,
ioEventHandlerFactory,
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java
index 7fadfef..d334cec 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java
@@ -62,9 +62,9 @@ import org.apache.hc.core5.http.protocol.RequestHandlerRegistry;
import org.apache.hc.core5.http.protocol.UriPatternType;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.http2.impl.Http2Processors;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
-import org.apache.hc.core5.http2.impl.nio.ServerHttp2StreamMultiplexerFactory;
+import org.apache.hc.core5.http2.impl.H2Processors;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
+import org.apache.hc.core5.http2.impl.nio.ServerH2StreamMultiplexerFactory;
import org.apache.hc.core5.http2.impl.nio.ServerHttpProtocolNegotiatorFactory;
import org.apache.hc.core5.http2.ssl.H2ServerTlsStrategy;
import org.apache.hc.core5.net.InetAddressUtils;
@@ -97,7 +97,7 @@ public class H2ServerBootstrap {
private Decorator<ProtocolIOSession> ioSessionDecorator;
private Callback<Exception> exceptionCallback;
private IOSessionListener sessionListener;
- private Http2StreamListener http2StreamListener;
+ private H2StreamListener h2StreamListener;
private Http1StreamListener http1StreamListener;
private H2ServerBootstrap() {
@@ -205,10 +205,10 @@ public class H2ServerBootstrap {
}
/**
- * Assigns {@link Http2StreamListener} instance.
+ * Assigns {@link H2StreamListener} instance.
*/
- public final H2ServerBootstrap setStreamListener(final Http2StreamListener http2StreamListener) {
- this.http2StreamListener = http2StreamListener;
+ public final H2ServerBootstrap setStreamListener(final H2StreamListener h2StreamListener) {
+ this.h2StreamListener = h2StreamListener;
return this;
}
@@ -419,12 +419,12 @@ public class H2ServerBootstrap {
});
}
- final ServerHttp2StreamMultiplexerFactory http2StreamHandlerFactory = new ServerHttp2StreamMultiplexerFactory(
- httpProcessor != null ? httpProcessor : Http2Processors.server(),
+ final ServerH2StreamMultiplexerFactory http2StreamHandlerFactory = new ServerH2StreamMultiplexerFactory(
+ httpProcessor != null ? httpProcessor : H2Processors.server(),
handlerFactory,
h2Config != null ? h2Config : H2Config.DEFAULT,
charCodingConfig != null ? charCodingConfig : CharCodingConfig.DEFAULT,
- http2StreamListener);
+ h2StreamListener);
final ServerHttp1StreamDuplexerFactory http1StreamHandlerFactory = new ServerHttp1StreamDuplexerFactory(
httpProcessor != null ? httpProcessor : HttpProcessors.server(),
handlerFactory,
diff --git a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2ConscriptRequestExecutionExample.java b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2ConscriptRequestExecutionExample.java
similarity index 97%
rename from httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2ConscriptRequestExecutionExample.java
rename to httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2ConscriptRequestExecutionExample.java
index fa2a825..13db53e 100644
--- a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2ConscriptRequestExecutionExample.java
+++ b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2ConscriptRequestExecutionExample.java
@@ -46,7 +46,7 @@ import org.apache.hc.core5.http.nio.support.BasicRequestProducer;
import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
import org.apache.hc.core5.http2.config.H2Config;
import org.apache.hc.core5.http2.frame.RawFrame;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2RequesterBootstrap;
import org.apache.hc.core5.http2.ssl.ConscryptClientTlsStrategy;
import org.apache.hc.core5.io.CloseMode;
@@ -58,7 +58,7 @@ import org.conscrypt.Conscrypt;
* This example demonstrates how to execute HTTP/2 requests over TLS connections
* with Java 1.7 or Java 1.8 and Conscrypt TLS library
*/
-public class Http2ConscriptRequestExecutionExample {
+public class H2ConscriptRequestExecutionExample {
public final static void main(final String[] args) throws Exception {
@@ -74,7 +74,7 @@ public class Http2ConscriptRequestExecutionExample {
final HttpAsyncRequester requester = H2RequesterBootstrap.bootstrap()
.setH2Config(h2Config)
.setTlsStrategy(new ConscryptClientTlsStrategy(sslContext))
- .setStreamListener(new Http2StreamListener() {
+ .setStreamListener(new H2StreamListener() {
@Override
public void onHeaderInput(final HttpConnection connection, final int streamId, final List<? extends Header> headers) {
diff --git a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2FileServerExample.java b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2FileServerExample.java
similarity index 98%
rename from httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2FileServerExample.java
rename to httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2FileServerExample.java
index c829b83..eaca5be 100644
--- a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2FileServerExample.java
+++ b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2FileServerExample.java
@@ -57,7 +57,7 @@ import org.apache.hc.core5.http.protocol.HttpContext;
import org.apache.hc.core5.http.protocol.HttpCoreContext;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.frame.RawFrame;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2ServerBootstrap;
import org.apache.hc.core5.io.CloseMode;
import org.apache.hc.core5.reactor.IOReactorConfig;
@@ -67,7 +67,7 @@ import org.apache.hc.core5.util.TimeValue;
/**
* Example of asynchronous embedded HTTP/2 file server.
*/
-public class Http2FileServerExample {
+public class H2FileServerExample {
public static void main(final String[] args) throws Exception {
if (args.length < 1) {
@@ -89,7 +89,7 @@ public class Http2FileServerExample {
final HttpAsyncServer server = H2ServerBootstrap.bootstrap()
.setIOReactorConfig(config)
.setVersionPolicy(HttpVersionPolicy.FORCE_HTTP_2)
- .setStreamListener(new Http2StreamListener() {
+ .setStreamListener(new H2StreamListener() {
@Override
public void onHeaderInput(final HttpConnection connection, final int streamId, final List<? extends Header> headers) {
diff --git a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2FullDuplexClientExample.java b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2FullDuplexClientExample.java
similarity index 97%
rename from httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2FullDuplexClientExample.java
rename to httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2FullDuplexClientExample.java
index 31c79c5..43d36b9 100644
--- a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2FullDuplexClientExample.java
+++ b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2FullDuplexClientExample.java
@@ -52,7 +52,7 @@ import org.apache.hc.core5.http.protocol.HttpCoreContext;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.config.H2Config;
import org.apache.hc.core5.http2.frame.RawFrame;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2RequesterBootstrap;
import org.apache.hc.core5.io.CloseMode;
import org.apache.hc.core5.reactor.IOReactorConfig;
@@ -61,7 +61,7 @@ import org.apache.hc.core5.util.Timeout;
/**
* Example of full-duplex, streaming HTTP message exchanges with an asynchronous HTTP/2 requester.
*/
-public class Http2FullDuplexClientExample {
+public class H2FullDuplexClientExample {
public static void main(final String[] args) throws Exception {
@@ -78,7 +78,7 @@ public class Http2FullDuplexClientExample {
.setIOReactorConfig(ioReactorConfig)
.setH2Config(h2Config)
.setVersionPolicy(HttpVersionPolicy.FORCE_HTTP_2)
- .setStreamListener(new Http2StreamListener() {
+ .setStreamListener(new H2StreamListener() {
@Override
public void onHeaderInput(final HttpConnection connection, final int streamId, final List<? extends Header> headers) {
diff --git a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2FullDuplexServerExample.java b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2FullDuplexServerExample.java
similarity index 98%
rename from httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2FullDuplexServerExample.java
rename to httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2FullDuplexServerExample.java
index 55e34dd..dc922a0 100644
--- a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2FullDuplexServerExample.java
+++ b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2FullDuplexServerExample.java
@@ -52,7 +52,7 @@ import org.apache.hc.core5.http.protocol.HttpContext;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.config.H2Config;
import org.apache.hc.core5.http2.frame.RawFrame;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2ServerBootstrap;
import org.apache.hc.core5.io.CloseMode;
import org.apache.hc.core5.reactor.IOReactorConfig;
@@ -62,7 +62,7 @@ import org.apache.hc.core5.util.TimeValue;
/**
* Example of full-duplex, streaming HTTP message exchanges with an asynchronous embedded HTTP/2 server.
*/
-public class Http2FullDuplexServerExample {
+public class H2FullDuplexServerExample {
public static void main(final String[] args) throws Exception {
int port = 8080;
@@ -84,7 +84,7 @@ public class Http2FullDuplexServerExample {
.setIOReactorConfig(config)
.setH2Config(h2Config)
.setVersionPolicy(HttpVersionPolicy.FORCE_HTTP_2)
- .setStreamListener(new Http2StreamListener() {
+ .setStreamListener(new H2StreamListener() {
@Override
public void onHeaderInput(final HttpConnection connection, final int streamId, final List<? extends Header> headers) {
diff --git a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2GreetingServer.java b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2GreetingServer.java
similarity index 99%
rename from httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2GreetingServer.java
rename to httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2GreetingServer.java
index f9598b1..3105671 100644
--- a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2GreetingServer.java
+++ b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2GreetingServer.java
@@ -84,7 +84,7 @@ import org.apache.hc.core5.util.TimeValue;
* <p>
* This examples uses a {@link AbstractServerExchangeHandler} for the basic request / response processing cycle.
*/
-public class Http2GreetingServer {
+public class H2GreetingServer {
public static void main(final String[] args) throws ExecutionException, InterruptedException {
int port = 8080;
if (args.length >= 1) {
diff --git a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2MultiStreamExecutionExample.java b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2MultiStreamExecutionExample.java
similarity index 97%
rename from httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2MultiStreamExecutionExample.java
rename to httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2MultiStreamExecutionExample.java
index aa2f101..cc70940 100644
--- a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2MultiStreamExecutionExample.java
+++ b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2MultiStreamExecutionExample.java
@@ -46,7 +46,7 @@ import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.config.H2Config;
import org.apache.hc.core5.http2.frame.RawFrame;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2RequesterBootstrap;
import org.apache.hc.core5.io.CloseMode;
import org.apache.hc.core5.reactor.IOReactorConfig;
@@ -55,7 +55,7 @@ import org.apache.hc.core5.util.Timeout;
/**
* Example of HTTP/2 concurrent request execution using multiple streams.
*/
-public class Http2MultiStreamExecutionExample {
+public class H2MultiStreamExecutionExample {
public static void main(final String[] args) throws Exception {
@@ -73,7 +73,7 @@ public class Http2MultiStreamExecutionExample {
.setIOReactorConfig(ioReactorConfig)
.setVersionPolicy(HttpVersionPolicy.FORCE_HTTP_2)
.setH2Config(h2Config)
- .setStreamListener(new Http2StreamListener() {
+ .setStreamListener(new H2StreamListener() {
@Override
public void onHeaderInput(final HttpConnection connection, final int streamId, final List<? extends Header> headers) {
diff --git a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2RequestExecutionExample.java b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2RequestExecutionExample.java
similarity index 97%
rename from httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2RequestExecutionExample.java
rename to httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2RequestExecutionExample.java
index 222c25a..cb7f5a4 100644
--- a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2RequestExecutionExample.java
+++ b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2RequestExecutionExample.java
@@ -45,7 +45,7 @@ import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.config.H2Config;
import org.apache.hc.core5.http2.frame.RawFrame;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2RequesterBootstrap;
import org.apache.hc.core5.io.CloseMode;
import org.apache.hc.core5.util.Timeout;
@@ -53,7 +53,7 @@ import org.apache.hc.core5.util.Timeout;
/**
* Example of HTTP/2 request execution.
*/
-public class Http2RequestExecutionExample {
+public class H2RequestExecutionExample {
public static void main(final String[] args) throws Exception {
@@ -65,7 +65,7 @@ public class Http2RequestExecutionExample {
final HttpAsyncRequester requester = H2RequesterBootstrap.bootstrap()
.setH2Config(h2Config)
.setVersionPolicy(HttpVersionPolicy.FORCE_HTTP_2)
- .setStreamListener(new Http2StreamListener() {
+ .setStreamListener(new H2StreamListener() {
@Override
public void onHeaderInput(final HttpConnection connection, final int streamId, final List<? extends Header> headers) {
diff --git a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2TlsAlpnRequestExecutionExample.java b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2TlsAlpnRequestExecutionExample.java
similarity index 97%
rename from httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2TlsAlpnRequestExecutionExample.java
rename to httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2TlsAlpnRequestExecutionExample.java
index 0a254b1..b14b9b7 100644
--- a/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/Http2TlsAlpnRequestExecutionExample.java
+++ b/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/examples/H2TlsAlpnRequestExecutionExample.java
@@ -47,7 +47,7 @@ import org.apache.hc.core5.http.nio.support.BasicRequestProducer;
import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
import org.apache.hc.core5.http2.config.H2Config;
import org.apache.hc.core5.http2.frame.RawFrame;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2RequesterBootstrap;
import org.apache.hc.core5.http2.ssl.H2ClientTlsStrategy;
import org.apache.hc.core5.io.CloseMode;
@@ -62,7 +62,7 @@ import org.apache.hc.core5.util.Timeout;
* <p>
* It requires Java runtime with ALPN protocol support (such as Oracle JRE 9 or newer).
*/
-public class Http2TlsAlpnRequestExecutionExample {
+public class H2TlsAlpnRequestExecutionExample {
public final static void main(final String[] args) throws Exception {
// Create and start requester
@@ -85,7 +85,7 @@ public class Http2TlsAlpnRequestExecutionExample {
}
}))
- .setStreamListener(new Http2StreamListener() {
+ .setStreamListener(new H2StreamListener() {
@Override
public void onHeaderInput(final HttpConnection connection, final int streamId, final List<? extends Header> headers) {
diff --git a/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java b/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java
index 819fe7b..b12d850 100644
--- a/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java
+++ b/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java
@@ -63,7 +63,7 @@ import org.apache.hc.core5.http.protocol.RequestUserAgent;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.frame.FramePrinter;
import org.apache.hc.core5.http2.frame.RawFrame;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2RequesterBootstrap;
import org.apache.hc.core5.http2.protocol.H2RequestConnControl;
import org.apache.hc.core5.http2.protocol.H2RequestContent;
@@ -396,7 +396,7 @@ public class HttpBenchmark {
}
})
- .setStreamListener(new Http2StreamListener() {
+ .setStreamListener(new H2StreamListener() {
private final FramePrinter framePrinter = new FramePrinter();
diff --git a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/Http2TestClient.java b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/H2TestClient.java
similarity index 91%
rename from httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/Http2TestClient.java
rename to httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/H2TestClient.java
index 9695e6f..f4321dc 100644
--- a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/Http2TestClient.java
+++ b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/H2TestClient.java
@@ -43,7 +43,7 @@ import org.apache.hc.core5.http.protocol.HttpProcessor;
import org.apache.hc.core5.http.protocol.RequestHandlerRegistry;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.http2.impl.Http2Processors;
+import org.apache.hc.core5.http2.impl.H2Processors;
import org.apache.hc.core5.http2.nio.support.DefaultAsyncPushConsumerFactory;
import org.apache.hc.core5.reactor.IOEventHandlerFactory;
import org.apache.hc.core5.reactor.IOReactorConfig;
@@ -51,18 +51,18 @@ import org.apache.hc.core5.reactor.IOSession;
import org.apache.hc.core5.util.Args;
import org.apache.hc.core5.util.Timeout;
-public class Http2TestClient extends AsyncRequester {
+public class H2TestClient extends AsyncRequester {
private final SSLContext sslContext;
private final RequestHandlerRegistry<Supplier<AsyncPushConsumer>> registry;
- public Http2TestClient(final IOReactorConfig ioReactorConfig, final SSLContext sslContext) throws IOException {
+ public H2TestClient(final IOReactorConfig ioReactorConfig, final SSLContext sslContext) throws IOException {
super(ioReactorConfig);
this.sslContext = sslContext;
this.registry = new RequestHandlerRegistry<>();
}
- public Http2TestClient() throws IOException {
+ public H2TestClient() throws IOException {
this(IOReactorConfig.DEFAULT, null);
}
@@ -77,7 +77,7 @@ public class Http2TestClient extends AsyncRequester {
}
public void start(final HttpProcessor httpProcessor, final H2Config h2Config) throws IOException {
- start(new InternalClientHttp2EventHandlerFactory(
+ start(new InternalClientH2EventHandlerFactory(
httpProcessor,
new DefaultAsyncPushConsumerFactory(registry),
HttpVersionPolicy.FORCE_HTTP_2,
@@ -88,7 +88,7 @@ public class Http2TestClient extends AsyncRequester {
}
public void start(final HttpProcessor httpProcessor, final Http1Config http1Config) throws IOException {
- start(new InternalClientHttp2EventHandlerFactory(
+ start(new InternalClientH2EventHandlerFactory(
httpProcessor,
new DefaultAsyncPushConsumerFactory(registry),
HttpVersionPolicy.FORCE_HTTP_1,
@@ -99,11 +99,11 @@ public class Http2TestClient extends AsyncRequester {
}
public void start(final H2Config h2Config) throws IOException {
- start(Http2Processors.client(), h2Config);
+ start(H2Processors.client(), h2Config);
}
public void start(final Http1Config http1Config) throws IOException {
- start(Http2Processors.client(), http1Config);
+ start(H2Processors.client(), http1Config);
}
public void start() throws Exception {
diff --git a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/Http2TestServer.java b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/H2TestServer.java
similarity index 92%
rename from httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/Http2TestServer.java
rename to httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/H2TestServer.java
index d6bd3d7..e3f7017 100644
--- a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/Http2TestServer.java
+++ b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/H2TestServer.java
@@ -47,23 +47,23 @@ import org.apache.hc.core5.http.protocol.HttpProcessor;
import org.apache.hc.core5.http.protocol.RequestHandlerRegistry;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.http2.impl.Http2Processors;
+import org.apache.hc.core5.http2.impl.H2Processors;
import org.apache.hc.core5.reactor.IOEventHandlerFactory;
import org.apache.hc.core5.reactor.IOReactorConfig;
import org.apache.hc.core5.reactor.ListenerEndpoint;
-public class Http2TestServer extends AsyncServer {
+public class H2TestServer extends AsyncServer {
private final SSLContext sslContext;
private final RequestHandlerRegistry<Supplier<AsyncServerExchangeHandler>> registry;
- public Http2TestServer(final IOReactorConfig ioReactorConfig, final SSLContext sslContext) throws IOException {
+ public H2TestServer(final IOReactorConfig ioReactorConfig, final SSLContext sslContext) throws IOException {
super(ioReactorConfig);
this.sslContext = sslContext;
this.registry = new RequestHandlerRegistry<>();
}
- public Http2TestServer() throws IOException {
+ public H2TestServer() throws IOException {
this(IOReactorConfig.DEFAULT, null);
}
@@ -92,8 +92,8 @@ public class Http2TestServer extends AsyncServer {
final HttpProcessor httpProcessor,
final Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator,
final H2Config h2Config) throws Exception {
- start(new InternalServerHttp2EventHandlerFactory(
- httpProcessor != null ? httpProcessor : Http2Processors.server(),
+ start(new InternalServerH2EventHandlerFactory(
+ httpProcessor != null ? httpProcessor : H2Processors.server(),
new DefaultAsyncResponseExchangeHandlerFactory(
registry,
exchangeHandlerDecorator != null ? exchangeHandlerDecorator : new Decorator<AsyncServerExchangeHandler>() {
@@ -118,7 +118,7 @@ public class Http2TestServer extends AsyncServer {
final HttpProcessor httpProcessor,
final Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator,
final Http1Config http1Config) throws Exception {
- start(new InternalServerHttp2EventHandlerFactory(
+ start(new InternalServerH2EventHandlerFactory(
httpProcessor != null ? httpProcessor : HttpProcessors.server(),
new DefaultAsyncResponseExchangeHandlerFactory(
registry,
diff --git a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalClientHttp2EventHandlerFactory.java b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalClientH2EventHandlerFactory.java
similarity index 89%
rename from httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalClientHttp2EventHandlerFactory.java
rename to httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalClientH2EventHandlerFactory.java
index f736eaf..a0eb59a 100644
--- a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalClientHttp2EventHandlerFactory.java
+++ b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalClientH2EventHandlerFactory.java
@@ -38,15 +38,15 @@ import org.apache.hc.core5.http.nio.HandlerFactory;
import org.apache.hc.core5.http.protocol.HttpProcessor;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.http2.impl.Http2Processors;
-import org.apache.hc.core5.http2.impl.nio.ClientHttp2StreamMultiplexerFactory;
+import org.apache.hc.core5.http2.impl.H2Processors;
+import org.apache.hc.core5.http2.impl.nio.ClientH2StreamMultiplexerFactory;
import org.apache.hc.core5.http2.impl.nio.ClientHttpProtocolNegotiator;
import org.apache.hc.core5.reactor.IOEventHandler;
import org.apache.hc.core5.reactor.IOEventHandlerFactory;
import org.apache.hc.core5.reactor.ProtocolIOSession;
import org.apache.hc.core5.util.Args;
-class InternalClientHttp2EventHandlerFactory implements IOEventHandlerFactory {
+class InternalClientH2EventHandlerFactory implements IOEventHandlerFactory {
private final HttpProcessor httpProcessor;
private final HandlerFactory<AsyncPushConsumer> exchangeHandlerFactory;
@@ -56,7 +56,7 @@ class InternalClientHttp2EventHandlerFactory implements IOEventHandlerFactory {
private final CharCodingConfig charCodingConfig;
private final SSLContext sslContext;
- InternalClientHttp2EventHandlerFactory(
+ InternalClientH2EventHandlerFactory(
final HttpProcessor httpProcessor,
final HandlerFactory<AsyncPushConsumer> exchangeHandlerFactory,
final HttpVersionPolicy versionPolicy,
@@ -83,12 +83,12 @@ class InternalClientHttp2EventHandlerFactory implements IOEventHandlerFactory {
http1Config,
charCodingConfig,
LoggingHttp1StreamListener.INSTANCE_CLIENT);
- final ClientHttp2StreamMultiplexerFactory http2StreamHandlerFactory = new ClientHttp2StreamMultiplexerFactory(
- httpProcessor != null ? httpProcessor : Http2Processors.client(),
+ final ClientH2StreamMultiplexerFactory http2StreamHandlerFactory = new ClientH2StreamMultiplexerFactory(
+ httpProcessor != null ? httpProcessor : H2Processors.client(),
exchangeHandlerFactory,
h2Config,
charCodingConfig,
- LoggingHttp2StreamListener.INSTANCE);
+ LoggingH2StreamListener.INSTANCE);
return new ClientHttpProtocolNegotiator(
ioSession,
http1StreamHandlerFactory,
diff --git a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalServerHttp2EventHandlerFactory.java b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalServerH2EventHandlerFactory.java
similarity index 89%
rename from httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalServerHttp2EventHandlerFactory.java
rename to httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalServerH2EventHandlerFactory.java
index ddba0aa..52fc674 100644
--- a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalServerHttp2EventHandlerFactory.java
+++ b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/InternalServerH2EventHandlerFactory.java
@@ -38,15 +38,15 @@ import org.apache.hc.core5.http.nio.HandlerFactory;
import org.apache.hc.core5.http.protocol.HttpProcessor;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.http2.impl.Http2Processors;
-import org.apache.hc.core5.http2.impl.nio.ServerHttp2StreamMultiplexerFactory;
+import org.apache.hc.core5.http2.impl.H2Processors;
+import org.apache.hc.core5.http2.impl.nio.ServerH2StreamMultiplexerFactory;
import org.apache.hc.core5.http2.impl.nio.ServerHttpProtocolNegotiator;
import org.apache.hc.core5.reactor.IOEventHandler;
import org.apache.hc.core5.reactor.IOEventHandlerFactory;
import org.apache.hc.core5.reactor.ProtocolIOSession;
import org.apache.hc.core5.util.Args;
-class InternalServerHttp2EventHandlerFactory implements IOEventHandlerFactory {
+class InternalServerH2EventHandlerFactory implements IOEventHandlerFactory {
private final HttpProcessor httpProcessor;
private final HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory;
@@ -56,7 +56,7 @@ class InternalServerHttp2EventHandlerFactory implements IOEventHandlerFactory {
private final CharCodingConfig charCodingConfig;
private final SSLContext sslContext;
- public InternalServerHttp2EventHandlerFactory(
+ public InternalServerH2EventHandlerFactory(
final HttpProcessor httpProcessor,
final HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory,
final HttpVersionPolicy versionPolicy,
@@ -84,12 +84,12 @@ class InternalServerHttp2EventHandlerFactory implements IOEventHandlerFactory {
http1Config,
charCodingConfig,
LoggingHttp1StreamListener.INSTANCE_SERVER);
- final ServerHttp2StreamMultiplexerFactory http2StreamHandlerFactory = new ServerHttp2StreamMultiplexerFactory(
- httpProcessor != null ? httpProcessor : Http2Processors.server(),
+ final ServerH2StreamMultiplexerFactory http2StreamHandlerFactory = new ServerH2StreamMultiplexerFactory(
+ httpProcessor != null ? httpProcessor : H2Processors.server(),
exchangeHandlerFactory,
h2Config,
charCodingConfig,
- LoggingHttp2StreamListener.INSTANCE);
+ LoggingH2StreamListener.INSTANCE);
return new ServerHttpProtocolNegotiator(
ioSession,
http1StreamHandlerFactory,
diff --git a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/LoggingHttp2StreamListener.java b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/LoggingH2StreamListener.java
similarity index 95%
rename from httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/LoggingHttp2StreamListener.java
rename to httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/LoggingH2StreamListener.java
index 748d057..4b071a4 100644
--- a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/LoggingHttp2StreamListener.java
+++ b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/LoggingH2StreamListener.java
@@ -34,14 +34,14 @@ import org.apache.hc.core5.http.Header;
import org.apache.hc.core5.http.HttpConnection;
import org.apache.hc.core5.http2.frame.FramePrinter;
import org.apache.hc.core5.http2.frame.RawFrame;
-import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
+import org.apache.hc.core5.http2.impl.nio.H2StreamListener;
import org.apache.hc.core5.testing.classic.LoggingSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class LoggingHttp2StreamListener implements Http2StreamListener {
+public class LoggingH2StreamListener implements H2StreamListener {
- public final static LoggingHttp2StreamListener INSTANCE = new LoggingHttp2StreamListener();
+ public final static LoggingH2StreamListener INSTANCE = new LoggingH2StreamListener();
private final Logger headerLog;
private final Logger frameLog;
@@ -49,7 +49,7 @@ public class LoggingHttp2StreamListener implements Http2StreamListener {
private final Logger flowCtrlLog;
private final FramePrinter framePrinter;
- private LoggingHttp2StreamListener() {
+ private LoggingH2StreamListener() {
this.framePrinter = new FramePrinter();
this.headerLog = LoggerFactory.getLogger("org.apache.hc.core5.http.headers");
this.frameLog = LoggerFactory.getLogger("org.apache.hc.core5.http2.frame");
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/compatibility/http2/Http2CompatibilityTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/compatibility/http2/H2CompatibilityTest.java
similarity index 96%
rename from httpcore5-testing/src/test/java/org/apache/hc/core5/testing/compatibility/http2/Http2CompatibilityTest.java
rename to httpcore5-testing/src/test/java/org/apache/hc/core5/testing/compatibility/http2/H2CompatibilityTest.java
index 8c8dd47..3060a1e 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/compatibility/http2/Http2CompatibilityTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/compatibility/http2/H2CompatibilityTest.java
@@ -58,17 +58,17 @@ import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
import org.apache.hc.core5.http2.config.H2Config;
import org.apache.hc.core5.reactor.IOReactorConfig;
import org.apache.hc.core5.testing.nio.ClientSessionEndpoint;
-import org.apache.hc.core5.testing.nio.Http2TestClient;
+import org.apache.hc.core5.testing.nio.H2TestClient;
import org.apache.hc.core5.util.TimeValue;
import org.apache.hc.core5.util.Timeout;
-public class Http2CompatibilityTest {
+public class H2CompatibilityTest {
enum ServerType { DEFAULT, APACHE_HTTPD, NGINX }
private final HttpHost target;
private final H2Config h2Config;
- private final Http2TestClient client;
+ private final H2TestClient client;
public static void main(final String... args) throws Exception {
@@ -91,7 +91,7 @@ public class Http2CompatibilityTest {
h2Config = H2Config.DEFAULT;
}
- final Http2CompatibilityTest test = new Http2CompatibilityTest(target, h2Config);
+ final H2CompatibilityTest test = new H2CompatibilityTest(target, h2Config);
try {
test.start();
test.execute();
@@ -100,10 +100,10 @@ public class Http2CompatibilityTest {
}
}
- Http2CompatibilityTest(final HttpHost target, final H2Config h2Config) throws Exception {
+ H2CompatibilityTest(final HttpHost target, final H2Config h2Config) throws Exception {
this.target = target;
this.h2Config = h2Config;
- this.client = new Http2TestClient(IOReactorConfig.DEFAULT, null);
+ this.client = new H2TestClient(IOReactorConfig.DEFAULT, null);
}
void start() throws Exception {
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2AlpnTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2AlpnTest.java
similarity index 93%
rename from httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2AlpnTest.java
rename to httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2AlpnTest.java
index 23b28e8..330340f 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2AlpnTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2AlpnTest.java
@@ -47,9 +47,9 @@ import org.apache.hc.core5.http.nio.entity.StringAsyncEntityProducer;
import org.apache.hc.core5.http.nio.ssl.BasicServerTlsStrategy;
import org.apache.hc.core5.http.nio.support.BasicRequestProducer;
import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
+import org.apache.hc.core5.http2.impl.nio.bootstrap.H2MultiplexingRequester;
+import org.apache.hc.core5.http2.impl.nio.bootstrap.H2MultiplexingRequesterBootstrap;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2ServerBootstrap;
-import org.apache.hc.core5.http2.impl.nio.bootstrap.Http2MultiplexingRequester;
-import org.apache.hc.core5.http2.impl.nio.bootstrap.Http2MultiplexingRequesterBootstrap;
import org.apache.hc.core5.http2.ssl.H2ClientTlsStrategy;
import org.apache.hc.core5.io.CloseMode;
import org.apache.hc.core5.reactor.IOReactorConfig;
@@ -69,7 +69,7 @@ import org.junit.rules.ExternalResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class Http2AlpnTest {
+public class H2AlpnTest {
private final Logger log = LoggerFactory.getLogger(getClass());
@@ -91,7 +91,7 @@ public class Http2AlpnTest {
.setTlsStrategy(new BasicServerTlsStrategy(
SSLTestContexts.createServerSSLContext(),
SecureAllPortsStrategy.INSTANCE))
- .setStreamListener(LoggingHttp2StreamListener.INSTANCE)
+ .setStreamListener(LoggingH2StreamListener.INSTANCE)
.setIOSessionDecorator(LoggingIOSessionDecorator.INSTANCE)
.setExceptionCallback(LoggingExceptionCallback.INSTANCE)
.setIOSessionListener(LoggingIOSessionListener.INSTANCE)
@@ -116,7 +116,7 @@ public class Http2AlpnTest {
};
- private Http2MultiplexingRequester requester;
+ private H2MultiplexingRequester requester;
@Rule
public ExternalResource clientResource = new ExternalResource() {
@@ -149,13 +149,13 @@ public class Http2AlpnTest {
@Test
public void testALPNLax() throws Exception {
log.debug("Starting up test client");
- requester = Http2MultiplexingRequesterBootstrap.bootstrap()
+ requester = H2MultiplexingRequesterBootstrap.bootstrap()
.setIOReactorConfig(IOReactorConfig.custom()
.setSoTimeout(TIMEOUT)
.build())
.setTlsStrategy(new H2ClientTlsStrategy(SSLTestContexts.createClientSSLContext()))
.setStrictALPNHandshake(false)
- .setStreamListener(LoggingHttp2StreamListener.INSTANCE)
+ .setStreamListener(LoggingH2StreamListener.INSTANCE)
.setIOSessionDecorator(LoggingIOSessionDecorator.INSTANCE)
.setExceptionCallback(LoggingExceptionCallback.INSTANCE)
.setIOSessionListener(LoggingIOSessionListener.INSTANCE)
@@ -187,7 +187,7 @@ public class Http2AlpnTest {
thrown.expectMessage("ALPN: missing application protocol");
log.debug("Starting up test client");
- requester = Http2MultiplexingRequesterBootstrap.bootstrap()
+ requester = H2MultiplexingRequesterBootstrap.bootstrap()
.setIOReactorConfig(IOReactorConfig.custom()
.setSoTimeout(TIMEOUT)
.build())
@@ -195,7 +195,7 @@ public class Http2AlpnTest {
.setStrictALPNHandshake(true)
.setIOSessionListener(LoggingIOSessionListener.INSTANCE)
.setIOSessionDecorator(LoggingIOSessionDecorator.INSTANCE)
- .setStreamListener(LoggingHttp2StreamListener.INSTANCE)
+ .setStreamListener(LoggingH2StreamListener.INSTANCE)
.create();
server.start();
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2IntegrationTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2IntegrationTest.java
similarity index 99%
rename from httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2IntegrationTest.java
rename to httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2IntegrationTest.java
index a2b448d..30615a8 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2IntegrationTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2IntegrationTest.java
@@ -132,7 +132,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@RunWith(Parameterized.class)
-public class Http2IntegrationTest extends InternalHttp2ServerTestBase {
+public class H2IntegrationTest extends InternalH2ServerTestBase {
private final Logger log = LoggerFactory.getLogger(getClass());
@@ -144,19 +144,19 @@ public class Http2IntegrationTest extends InternalHttp2ServerTestBase {
});
}
- public Http2IntegrationTest(final URIScheme scheme) {
+ public H2IntegrationTest(final URIScheme scheme) {
super(scheme);
}
private static final Timeout TIMEOUT = Timeout.ofSeconds(30);
private static final Timeout LONG_TIMEOUT = Timeout.ofSeconds(60);
- private Http2TestClient client;
+ private H2TestClient client;
@Before
public void setup() throws Exception {
log.debug("Starting up test client");
- client = new Http2TestClient(buildReactorConfig(),
+ client = new H2TestClient(buildReactorConfig(),
scheme == URIScheme.HTTPS ? SSLTestContexts.createClientSSLContext() : null);
}
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ProtocolNegotiationTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2ProtocolNegotiationTest.java
similarity index 97%
rename from httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ProtocolNegotiationTest.java
rename to httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2ProtocolNegotiationTest.java
index 72af361..29868b4 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ProtocolNegotiationTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2ProtocolNegotiationTest.java
@@ -47,9 +47,9 @@ import org.apache.hc.core5.http.nio.entity.StringAsyncEntityProducer;
import org.apache.hc.core5.http.nio.support.BasicRequestProducer;
import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
import org.apache.hc.core5.http2.HttpVersionPolicy;
+import org.apache.hc.core5.http2.impl.nio.bootstrap.H2AsyncRequester;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2RequesterBootstrap;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2ServerBootstrap;
-import org.apache.hc.core5.http2.impl.nio.bootstrap.Http2AsyncRequester;
import org.apache.hc.core5.http2.ssl.H2ClientTlsStrategy;
import org.apache.hc.core5.http2.ssl.H2ServerTlsStrategy;
import org.apache.hc.core5.io.CloseMode;
@@ -70,7 +70,7 @@ import org.junit.rules.ExternalResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class Http2ProtocolNegotiationTest {
+public class H2ProtocolNegotiationTest {
private static final Timeout TIMEOUT = Timeout.ofSeconds(30);
@@ -102,7 +102,7 @@ public class Http2ProtocolNegotiationTest {
}
})
- .setStreamListener(LoggingHttp2StreamListener.INSTANCE)
+ .setStreamListener(LoggingH2StreamListener.INSTANCE)
.setStreamListener(LoggingHttp1StreamListener.INSTANCE_SERVER)
.setIOSessionDecorator(LoggingIOSessionDecorator.INSTANCE)
.setExceptionCallback(LoggingExceptionCallback.INSTANCE)
@@ -120,7 +120,7 @@ public class Http2ProtocolNegotiationTest {
};
- private Http2AsyncRequester requester;
+ private H2AsyncRequester requester;
@Rule
public ExternalResource clientResource = new ExternalResource() {
@@ -135,7 +135,7 @@ public class Http2ProtocolNegotiationTest {
.setSoTimeout(TIMEOUT)
.build())
.setTlsStrategy(new H2ClientTlsStrategy(SSLTestContexts.createClientSSLContext()))
- .setStreamListener(LoggingHttp2StreamListener.INSTANCE)
+ .setStreamListener(LoggingH2StreamListener.INSTANCE)
.setStreamListener(LoggingHttp1StreamListener.INSTANCE_CLIENT)
.setConnPoolListener(LoggingConnPoolListener.INSTANCE)
.setIOSessionDecorator(LoggingIOSessionDecorator.INSTANCE)
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ServerAndMultiplexingRequesterTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2ServerAndMultiplexingRequesterTest.java
similarity index 96%
rename from httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ServerAndMultiplexingRequesterTest.java
rename to httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2ServerAndMultiplexingRequesterTest.java
index d20abed..2b1a566 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ServerAndMultiplexingRequesterTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2ServerAndMultiplexingRequesterTest.java
@@ -54,9 +54,9 @@ import org.apache.hc.core5.http.nio.support.BasicClientExchangeHandler;
import org.apache.hc.core5.http.nio.support.BasicRequestProducer;
import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
import org.apache.hc.core5.http.protocol.HttpCoreContext;
+import org.apache.hc.core5.http2.impl.nio.bootstrap.H2MultiplexingRequester;
+import org.apache.hc.core5.http2.impl.nio.bootstrap.H2MultiplexingRequesterBootstrap;
import org.apache.hc.core5.http2.impl.nio.bootstrap.H2ServerBootstrap;
-import org.apache.hc.core5.http2.impl.nio.bootstrap.Http2MultiplexingRequester;
-import org.apache.hc.core5.http2.impl.nio.bootstrap.Http2MultiplexingRequesterBootstrap;
import org.apache.hc.core5.http2.ssl.H2ClientTlsStrategy;
import org.apache.hc.core5.http2.ssl.H2ServerTlsStrategy;
import org.apache.hc.core5.io.CloseMode;
@@ -80,7 +80,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@RunWith(Parameterized.class)
-public class Http2ServerAndMultiplexingRequesterTest {
+public class H2ServerAndMultiplexingRequesterTest {
private final Logger log = LoggerFactory.getLogger(getClass());
@@ -95,7 +95,7 @@ public class Http2ServerAndMultiplexingRequesterTest {
private final URIScheme scheme;
- public Http2ServerAndMultiplexingRequesterTest(final URIScheme scheme) {
+ public H2ServerAndMultiplexingRequesterTest(final URIScheme scheme) {
this.scheme = scheme;
}
@@ -118,7 +118,7 @@ public class Http2ServerAndMultiplexingRequesterTest {
.setIOSessionListener(LoggingIOSessionListener.INSTANCE)
.setIOSessionDecorator(LoggingIOSessionDecorator.INSTANCE)
.setExceptionCallback(LoggingExceptionCallback.INSTANCE)
- .setStreamListener(LoggingHttp2StreamListener.INSTANCE)
+ .setStreamListener(LoggingH2StreamListener.INSTANCE)
.register("*", new Supplier<AsyncServerExchangeHandler>() {
@Override
@@ -140,7 +140,7 @@ public class Http2ServerAndMultiplexingRequesterTest {
};
- private Http2MultiplexingRequester requester;
+ private H2MultiplexingRequester requester;
@Rule
public ExternalResource clientResource = new ExternalResource() {
@@ -148,7 +148,7 @@ public class Http2ServerAndMultiplexingRequesterTest {
@Override
protected void before() throws Throwable {
log.debug("Starting up test client");
- requester = Http2MultiplexingRequesterBootstrap.bootstrap()
+ requester = H2MultiplexingRequesterBootstrap.bootstrap()
.setIOReactorConfig(IOReactorConfig.custom()
.setSoTimeout(TIMEOUT)
.build())
@@ -156,7 +156,7 @@ public class Http2ServerAndMultiplexingRequesterTest {
.setIOSessionListener(LoggingIOSessionListener.INSTANCE)
.setIOSessionDecorator(LoggingIOSessionDecorator.INSTANCE)
.setExceptionCallback(LoggingExceptionCallback.INSTANCE)
- .setStreamListener(LoggingHttp2StreamListener.INSTANCE)
+ .setStreamListener(LoggingH2StreamListener.INSTANCE)
.create();
}
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ServerAndRequesterTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2ServerAndRequesterTest.java
similarity index 98%
rename from httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ServerAndRequesterTest.java
rename to httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2ServerAndRequesterTest.java
index 1fec54c..ab04205 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ServerAndRequesterTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2ServerAndRequesterTest.java
@@ -77,7 +77,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@RunWith(Parameterized.class)
-public class Http2ServerAndRequesterTest {
+public class H2ServerAndRequesterTest {
private final Logger log = LoggerFactory.getLogger(getClass());
@@ -92,7 +92,7 @@ public class Http2ServerAndRequesterTest {
private final URIScheme scheme;
- public Http2ServerAndRequesterTest(final URIScheme scheme) {
+ public H2ServerAndRequesterTest(final URIScheme scheme) {
this.scheme = scheme;
}
@@ -115,7 +115,7 @@ public class Http2ServerAndRequesterTest {
SSLTestContexts.createServerSSLContext(),
SecureAllPortsStrategy.INSTANCE) : null)
.setStreamListener(LoggingHttp1StreamListener.INSTANCE_SERVER)
- .setStreamListener(LoggingHttp2StreamListener.INSTANCE)
+ .setStreamListener(LoggingH2StreamListener.INSTANCE)
.setIOSessionDecorator(LoggingIOSessionDecorator.INSTANCE)
.setExceptionCallback(LoggingExceptionCallback.INSTANCE)
.setIOSessionListener(LoggingIOSessionListener.INSTANCE)
@@ -155,7 +155,7 @@ public class Http2ServerAndRequesterTest {
.build())
.setTlsStrategy(new H2ClientTlsStrategy(SSLTestContexts.createClientSSLContext()))
.setStreamListener(LoggingHttp1StreamListener.INSTANCE_CLIENT)
- .setStreamListener(LoggingHttp2StreamListener.INSTANCE)
+ .setStreamListener(LoggingH2StreamListener.INSTANCE)
.setConnPoolListener(LoggingConnPoolListener.INSTANCE)
.setIOSessionDecorator(LoggingIOSessionDecorator.INSTANCE)
.setExceptionCallback(LoggingExceptionCallback.INSTANCE)
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2SocksProxyIntegrationTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2SocksProxyIntegrationTest.java
similarity index 93%
rename from httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2SocksProxyIntegrationTest.java
rename to httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2SocksProxyIntegrationTest.java
index 9a958e2..7c8f355 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2SocksProxyIntegrationTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2SocksProxyIntegrationTest.java
@@ -34,7 +34,7 @@ import org.apache.hc.core5.util.TimeValue;
import org.junit.AfterClass;
import org.junit.BeforeClass;
-public class Http2SocksProxyIntegrationTest extends Http2IntegrationTest {
+public class H2SocksProxyIntegrationTest extends H2IntegrationTest {
protected static SocksProxy PROXY;
@@ -55,7 +55,7 @@ public class Http2SocksProxyIntegrationTest extends Http2IntegrationTest {
}
}
- public Http2SocksProxyIntegrationTest(final URIScheme scheme) {
+ public H2SocksProxyIntegrationTest(final URIScheme scheme) {
super(scheme);
}
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/InternalHttp2ServerTestBase.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/InternalH2ServerTestBase.java
similarity index 89%
rename from httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/InternalHttp2ServerTestBase.java
rename to httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/InternalH2ServerTestBase.java
index bb5c6ca..2d40c5e 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/InternalHttp2ServerTestBase.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/InternalH2ServerTestBase.java
@@ -36,21 +36,21 @@ import org.junit.rules.ExternalResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public abstract class InternalHttp2ServerTestBase {
+public abstract class InternalH2ServerTestBase {
private final Logger log = LoggerFactory.getLogger(getClass());
protected final URIScheme scheme;
- public InternalHttp2ServerTestBase(final URIScheme scheme) {
+ public InternalH2ServerTestBase(final URIScheme scheme) {
this.scheme = scheme;
}
- public InternalHttp2ServerTestBase() {
+ public InternalH2ServerTestBase() {
this(URIScheme.HTTP);
}
- protected Http2TestServer server;
+ protected H2TestServer server;
@Rule
public ExternalResource serverResource = new ExternalResource() {
@@ -58,7 +58,7 @@ public abstract class InternalHttp2ServerTestBase {
@Override
protected void before() throws Throwable {
log.debug("Starting up test server");
- server = new Http2TestServer(IOReactorConfig.DEFAULT,
+ server = new H2TestServer(IOReactorConfig.DEFAULT,
scheme == URIScheme.HTTPS ? SSLTestContexts.createServerSSLContext() : null);
}
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/reactive/ReactiveClientTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/reactive/ReactiveClientTest.java
index 0a28f1d..892cc9c 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/reactive/ReactiveClientTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/reactive/ReactiveClientTest.java
@@ -82,8 +82,8 @@ import org.apache.hc.core5.reactor.IOReactorConfig;
import org.apache.hc.core5.reactor.ListenerEndpoint;
import org.apache.hc.core5.testing.classic.LoggingConnPoolListener;
import org.apache.hc.core5.testing.nio.LoggingExceptionCallback;
+import org.apache.hc.core5.testing.nio.LoggingH2StreamListener;
import org.apache.hc.core5.testing.nio.LoggingHttp1StreamListener;
-import org.apache.hc.core5.testing.nio.LoggingHttp2StreamListener;
import org.apache.hc.core5.testing.nio.LoggingIOSessionDecorator;
import org.apache.hc.core5.testing.nio.LoggingIOSessionListener;
import org.apache.hc.core5.util.Timeout;
@@ -163,7 +163,7 @@ public class ReactiveClientTest {
.setSoTimeout(SOCKET_TIMEOUT)
.build())
.setStreamListener(LoggingHttp1StreamListener.INSTANCE_SERVER)
- .setStreamListener(LoggingHttp2StreamListener.INSTANCE)
+ .setStreamListener(LoggingH2StreamListener.INSTANCE)
.setIOSessionDecorator(LoggingIOSessionDecorator.INSTANCE)
.setExceptionCallback(LoggingExceptionCallback.INSTANCE)
.setIOSessionListener(LoggingIOSessionListener.INSTANCE)
@@ -202,7 +202,7 @@ public class ReactiveClientTest {
.setSoTimeout(SOCKET_TIMEOUT)
.build())
.setStreamListener(LoggingHttp1StreamListener.INSTANCE_CLIENT)
- .setStreamListener(LoggingHttp2StreamListener.INSTANCE)
+ .setStreamListener(LoggingH2StreamListener.INSTANCE)
.setConnPoolListener(LoggingConnPoolListener.INSTANCE)
.setIOSessionDecorator(LoggingIOSessionDecorator.INSTANCE)
.setExceptionCallback(LoggingExceptionCallback.INSTANCE)