From 669020ccaca0c9a35a029dc7afa74363553ab63f Mon Sep 17 00:00:00 2001
From: Oleg Kalnichevski
Date: Fri, 12 Jul 2019 15:33:21 +0200
Subject: [PATCH] Renamed Http2 to H2 (no functional changes)
---
....java => CachingH2AsyncClientBuilder.java} | 26 +++---
.../impl/cache/CachingHttpAsyncClients.java | 8 +-
.../{TestHttp2Async.java => TestH2Async.java} | 10 +--
...ncMinimal.java => TestH2AsyncMinimal.java} | 8 +-
...Redirect.java => TestH2AsyncRedirect.java} | 10 +--
...n.java => TestH2ClientAuthentication.java} | 10 +--
...Builder.java => H2AsyncClientBuilder.java} | 82 +++++++++----------
... => H2AsyncClientEventHandlerFactory.java} | 4 +-
...ntExec.java => H2AsyncMainClientExec.java} | 2 +-
.../http/impl/async/HttpAsyncClients.java | 34 ++++----
...Client.java => InternalH2AsyncClient.java} | 6 +-
...e.java => InternalH2AsyncExecRuntime.java} | 10 +--
...cClient.java => MinimalH2AsyncClient.java} | 4 +-
...a => AsyncClientH2FullDuplexExchange.java} | 2 +-
...ng.java => AsyncClientH2Multiplexing.java} | 2 +-
...Push.java => AsyncClientH2ServerPush.java} | 2 +-
16 files changed, 110 insertions(+), 110 deletions(-)
rename httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/{CachingHttp2AsyncClientBuilder.java => CachingH2AsyncClientBuilder.java} (84%)
rename httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/{TestHttp2Async.java => TestH2Async.java} (89%)
rename httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/{TestHttp2AsyncMinimal.java => TestH2AsyncMinimal.java} (89%)
rename httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/{TestHttp2AsyncRedirect.java => TestH2AsyncRedirect.java} (88%)
rename httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/{TestHttp2ClientAuthentication.java => TestH2ClientAuthentication.java} (90%)
rename httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/{Http2AsyncClientBuilder.java => H2AsyncClientBuilder.java} (89%)
rename httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/{Http2AsyncClientEventHandlerFactory.java => H2AsyncClientEventHandlerFactory.java} (98%)
rename httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/{Http2AsyncMainClientExec.java => H2AsyncMainClientExec.java} (99%)
rename httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/{InternalHttp2AsyncClient.java => InternalH2AsyncClient.java} (95%)
rename httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/{InternalHttp2AsyncExecRuntime.java => InternalH2AsyncExecRuntime.java} (96%)
rename httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/{MinimalHttp2AsyncClient.java => MinimalH2AsyncClient.java} (99%)
rename httpclient5/src/test/java/org/apache/hc/client5/http/examples/{AsyncClientHttp2FullDuplexExchange.java => AsyncClientH2FullDuplexExchange.java} (99%)
rename httpclient5/src/test/java/org/apache/hc/client5/http/examples/{AsyncClientHttp2Multiplexing.java => AsyncClientH2Multiplexing.java} (99%)
rename httpclient5/src/test/java/org/apache/hc/client5/http/examples/{AsyncClientHttp2ServerPush.java => AsyncClientH2ServerPush.java} (99%)
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttp2AsyncClientBuilder.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingH2AsyncClientBuilder.java
similarity index 84%
rename from httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttp2AsyncClientBuilder.java
rename to httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingH2AsyncClientBuilder.java
index 927d79cf2..2dc11aa07 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttp2AsyncClientBuilder.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingH2AsyncClientBuilder.java
@@ -39,7 +39,7 @@ import org.apache.hc.client5.http.cache.HttpAsyncCacheStorageAdaptor;
import org.apache.hc.client5.http.cache.HttpCacheStorage;
import org.apache.hc.client5.http.cache.ResourceFactory;
import org.apache.hc.client5.http.impl.ChainElements;
-import org.apache.hc.client5.http.impl.async.Http2AsyncClientBuilder;
+import org.apache.hc.client5.http.impl.async.H2AsyncClientBuilder;
import org.apache.hc.client5.http.impl.schedule.ImmediateSchedulingStrategy;
import org.apache.hc.client5.http.schedule.SchedulingStrategy;
import org.apache.hc.core5.http.config.NamedElementChain;
@@ -50,7 +50,7 @@ import org.apache.hc.core5.http.config.NamedElementChain;
*
* @since 5.0
*/
-public class CachingHttp2AsyncClientBuilder extends Http2AsyncClientBuilder {
+public class CachingH2AsyncClientBuilder extends H2AsyncClientBuilder {
private ResourceFactory resourceFactory;
private HttpAsyncCacheStorage storage;
@@ -60,51 +60,51 @@ public class CachingHttp2AsyncClientBuilder extends Http2AsyncClientBuilder {
private HttpAsyncCacheInvalidator httpCacheInvalidator;
private boolean deleteCache;
- public static CachingHttp2AsyncClientBuilder create() {
- return new CachingHttp2AsyncClientBuilder();
+ public static CachingH2AsyncClientBuilder create() {
+ return new CachingH2AsyncClientBuilder();
}
- protected CachingHttp2AsyncClientBuilder() {
+ protected CachingH2AsyncClientBuilder() {
super();
this.deleteCache = true;
}
- public final CachingHttp2AsyncClientBuilder setResourceFactory(final ResourceFactory resourceFactory) {
+ public final CachingH2AsyncClientBuilder setResourceFactory(final ResourceFactory resourceFactory) {
this.resourceFactory = resourceFactory;
return this;
}
- public final CachingHttp2AsyncClientBuilder setHttpCacheStorage(final HttpCacheStorage storage) {
+ public final CachingH2AsyncClientBuilder setHttpCacheStorage(final HttpCacheStorage storage) {
this.storage = storage != null ? new HttpAsyncCacheStorageAdaptor(storage) : null;
return this;
}
- public final CachingHttp2AsyncClientBuilder setHttpCacheStorage(final HttpAsyncCacheStorage storage) {
+ public final CachingH2AsyncClientBuilder setHttpCacheStorage(final HttpAsyncCacheStorage storage) {
this.storage = storage;
return this;
}
- public final CachingHttp2AsyncClientBuilder setCacheDir(final File cacheDir) {
+ public final CachingH2AsyncClientBuilder setCacheDir(final File cacheDir) {
this.cacheDir = cacheDir;
return this;
}
- public final CachingHttp2AsyncClientBuilder setSchedulingStrategy(final SchedulingStrategy schedulingStrategy) {
+ public final CachingH2AsyncClientBuilder setSchedulingStrategy(final SchedulingStrategy schedulingStrategy) {
this.schedulingStrategy = schedulingStrategy;
return this;
}
- public final CachingHttp2AsyncClientBuilder setCacheConfig(final CacheConfig cacheConfig) {
+ public final CachingH2AsyncClientBuilder setCacheConfig(final CacheConfig cacheConfig) {
this.cacheConfig = cacheConfig;
return this;
}
- public final CachingHttp2AsyncClientBuilder setHttpCacheInvalidator(final HttpAsyncCacheInvalidator cacheInvalidator) {
+ public final CachingH2AsyncClientBuilder setHttpCacheInvalidator(final HttpAsyncCacheInvalidator cacheInvalidator) {
this.httpCacheInvalidator = cacheInvalidator;
return this;
}
- public CachingHttp2AsyncClientBuilder setDeleteCache(final boolean deleteCache) {
+ public CachingH2AsyncClientBuilder setDeleteCache(final boolean deleteCache) {
this.deleteCache = deleteCache;
return this;
}
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpAsyncClients.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpAsyncClients.java
index 4742b00d0..8b20b9825 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpAsyncClients.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpAsyncClients.java
@@ -73,8 +73,8 @@ public final class CachingHttpAsyncClients {
* Creates builder object for construction of custom HTTP/2
* {@link CloseableHttpAsyncClient} instances.
*/
- public static CachingHttp2AsyncClientBuilder customHttp2() {
- return CachingHttp2AsyncClientBuilder.create();
+ public static CachingH2AsyncClientBuilder customHttp2() {
+ return CachingH2AsyncClientBuilder.create();
}
/**
@@ -82,7 +82,7 @@ public final class CachingHttpAsyncClients {
* response cache.
*/
public static CloseableHttpAsyncClient createHttp2MemoryBound() {
- return CachingHttp2AsyncClientBuilder.create().build();
+ return CachingH2AsyncClientBuilder.create().build();
}
/**
@@ -92,7 +92,7 @@ public final class CachingHttpAsyncClients {
* @param cacheDir location of response cache.
*/
public static CloseableHttpAsyncClient createHttp2FileBound(final File cacheDir) {
- return CachingHttp2AsyncClientBuilder.create().setCacheDir(cacheDir).build();
+ return CachingH2AsyncClientBuilder.create().setCacheDir(cacheDir).build();
}
}
diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/TestHttp2Async.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/TestH2Async.java
similarity index 89%
rename from httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/TestHttp2Async.java
rename to httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/TestH2Async.java
index d41fed2a0..207614392 100644
--- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/TestHttp2Async.java
+++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/TestH2Async.java
@@ -31,7 +31,7 @@ import java.util.Collection;
import org.apache.hc.client5.http.config.RequestConfig;
import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
-import org.apache.hc.client5.http.impl.async.Http2AsyncClientBuilder;
+import org.apache.hc.client5.http.impl.async.H2AsyncClientBuilder;
import org.apache.hc.client5.testing.SSLTestContexts;
import org.apache.hc.core5.http.HttpHost;
import org.apache.hc.core5.http.URIScheme;
@@ -43,7 +43,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(Parameterized.class)
-public class TestHttp2Async extends AbstractHttpAsyncFundamentalsTest {
+public class TestH2Async extends AbstractHttpAsyncFundamentalsTest {
@Parameterized.Parameters(name = "HTTP/2 {0}")
public static Collection
*/
- public Http2AsyncClientBuilder setRedirectStrategy(final RedirectStrategy redirectStrategy) {
+ public H2AsyncClientBuilder setRedirectStrategy(final RedirectStrategy redirectStrategy) {
this.redirectStrategy = redirectStrategy;
return this;
}
@@ -404,7 +404,7 @@ public class Http2AsyncClientBuilder {
/**
* Assigns {@link SchemePortResolver} instance.
*/
- public final Http2AsyncClientBuilder setSchemePortResolver(final SchemePortResolver schemePortResolver) {
+ public final H2AsyncClientBuilder setSchemePortResolver(final SchemePortResolver schemePortResolver) {
this.schemePortResolver = schemePortResolver;
return this;
}
@@ -412,7 +412,7 @@ public class Http2AsyncClientBuilder {
/**
* Assigns {@link DnsResolver} instance.
*/
- public final Http2AsyncClientBuilder setDnsResolver(final DnsResolver dnsResolver) {
+ public final H2AsyncClientBuilder setDnsResolver(final DnsResolver dnsResolver) {
this.dnsResolver = dnsResolver;
return this;
}
@@ -420,7 +420,7 @@ public class Http2AsyncClientBuilder {
/**
* Assigns {@link TlsStrategy} instance.
*/
- public final Http2AsyncClientBuilder setTlsStrategy(final TlsStrategy tlsStrategy) {
+ public final H2AsyncClientBuilder setTlsStrategy(final TlsStrategy tlsStrategy) {
this.tlsStrategy = tlsStrategy;
return this;
}
@@ -428,7 +428,7 @@ public class Http2AsyncClientBuilder {
/**
* Assigns {@link ThreadFactory} instance.
*/
- public final Http2AsyncClientBuilder setThreadFactory(final ThreadFactory threadFactory) {
+ public final H2AsyncClientBuilder setThreadFactory(final ThreadFactory threadFactory) {
this.threadFactory = threadFactory;
return this;
}
@@ -436,7 +436,7 @@ public class Http2AsyncClientBuilder {
/**
* Assigns {@code User-Agent} value.
*/
- public final Http2AsyncClientBuilder setUserAgent(final String userAgent) {
+ public final H2AsyncClientBuilder setUserAgent(final String userAgent) {
this.userAgent = userAgent;
return this;
}
@@ -444,7 +444,7 @@ public class Http2AsyncClientBuilder {
/**
* Assigns default request header values.
*/
- public final Http2AsyncClientBuilder setDefaultHeaders(final Collection extends Header> defaultHeaders) {
+ public final H2AsyncClientBuilder setDefaultHeaders(final Collection extends Header> defaultHeaders) {
this.defaultHeaders = defaultHeaders;
return this;
}
@@ -452,7 +452,7 @@ public class Http2AsyncClientBuilder {
/**
* Assigns {@link HttpRoutePlanner} instance.
*/
- public final Http2AsyncClientBuilder setRoutePlanner(final HttpRoutePlanner routePlanner) {
+ public final H2AsyncClientBuilder setRoutePlanner(final HttpRoutePlanner routePlanner) {
this.routePlanner = routePlanner;
return this;
}
@@ -462,7 +462,7 @@ public class Http2AsyncClientBuilder {
* for request execution if not explicitly set in the client execution
* context.
*/
- public final Http2AsyncClientBuilder setDefaultCredentialsProvider(final CredentialsProvider credentialsProvider) {
+ public final H2AsyncClientBuilder setDefaultCredentialsProvider(final CredentialsProvider credentialsProvider) {
this.credentialsProvider = credentialsProvider;
return this;
}
@@ -472,7 +472,7 @@ public class Http2AsyncClientBuilder {
* be used for request execution if not explicitly set in the client execution
* context.
*/
- public final Http2AsyncClientBuilder setDefaultAuthSchemeRegistry(final Lookup authSchemeRegistry) {
+ public final H2AsyncClientBuilder setDefaultAuthSchemeRegistry(final Lookup authSchemeRegistry) {
this.authSchemeRegistry = authSchemeRegistry;
return this;
}
@@ -482,7 +482,7 @@ public class Http2AsyncClientBuilder {
* which will be used for request execution if not explicitly set in the client
* execution context.
*/
- public final Http2AsyncClientBuilder setDefaultCookieSpecRegistry(final Lookup cookieSpecRegistry) {
+ public final H2AsyncClientBuilder setDefaultCookieSpecRegistry(final Lookup cookieSpecRegistry) {
this.cookieSpecRegistry = cookieSpecRegistry;
return this;
}
@@ -491,7 +491,7 @@ public class Http2AsyncClientBuilder {
* Assigns default {@link CookieStore} instance which will be used for
* request execution if not explicitly set in the client execution context.
*/
- public final Http2AsyncClientBuilder setDefaultCookieStore(final CookieStore cookieStore) {
+ public final H2AsyncClientBuilder setDefaultCookieStore(final CookieStore cookieStore) {
this.cookieStore = cookieStore;
return this;
}
@@ -501,7 +501,7 @@ public class Http2AsyncClientBuilder {
* for request execution if not explicitly set in the client execution
* context.
*/
- public final Http2AsyncClientBuilder setDefaultRequestConfig(final RequestConfig config) {
+ public final H2AsyncClientBuilder setDefaultRequestConfig(final RequestConfig config) {
this.defaultRequestConfig = config;
return this;
}
@@ -510,7 +510,7 @@ public class Http2AsyncClientBuilder {
* Use system properties when creating and configuring default
* implementations.
*/
- public final Http2AsyncClientBuilder useSystemProperties() {
+ public final H2AsyncClientBuilder useSystemProperties() {
this.systemProperties = true;
return this;
}
@@ -518,7 +518,7 @@ public class Http2AsyncClientBuilder {
/**
* Disables automatic redirect handling.
*/
- public final Http2AsyncClientBuilder disableRedirectHandling() {
+ public final H2AsyncClientBuilder disableRedirectHandling() {
redirectHandlingDisabled = true;
return this;
}
@@ -526,7 +526,7 @@ public class Http2AsyncClientBuilder {
/**
* Disables automatic request recovery and re-execution.
*/
- public final Http2AsyncClientBuilder disableAutomaticRetries() {
+ public final H2AsyncClientBuilder disableAutomaticRetries() {
automaticRetriesDisabled = true;
return this;
}
@@ -534,7 +534,7 @@ public class Http2AsyncClientBuilder {
/**
* Disables state (cookie) management.
*/
- public final Http2AsyncClientBuilder disableCookieManagement() {
+ public final H2AsyncClientBuilder disableCookieManagement() {
this.cookieManagementDisabled = true;
return this;
}
@@ -542,7 +542,7 @@ public class Http2AsyncClientBuilder {
/**
* Disables authentication scheme caching.
*/
- public final Http2AsyncClientBuilder disableAuthCaching() {
+ public final H2AsyncClientBuilder disableAuthCaching() {
this.authCachingDisabled = true;
return this;
}
@@ -561,7 +561,7 @@ public class Http2AsyncClientBuilder {
* in the connection pool. Connections whose inactivity period exceeds this value will
* get closed and evicted from the pool.
*/
- public final Http2AsyncClientBuilder evictIdleConnections(final TimeValue maxIdleTime) {
+ public final H2AsyncClientBuilder evictIdleConnections(final TimeValue maxIdleTime) {
this.evictIdleConnections = true;
this.maxIdleTime = maxIdleTime;
return this;
@@ -595,7 +595,7 @@ public class Http2AsyncClientBuilder {
public CloseableHttpAsyncClient build() {
final NamedElementChain execChainDefinition = new NamedElementChain<>();
execChainDefinition.addLast(
- new Http2AsyncMainClientExec(),
+ new H2AsyncMainClientExec(),
ChainElements.MAIN_TRANSPORT.name());
AuthenticationStrategy targetAuthStrategyCopy = this.targetAuthStrategy;
@@ -704,7 +704,7 @@ public class Http2AsyncClientBuilder {
}
final AsyncPushConsumerRegistry pushConsumerRegistry = new AsyncPushConsumerRegistry();
- final IOEventHandlerFactory ioEventHandlerFactory = new Http2AsyncClientEventHandlerFactory(
+ final IOEventHandlerFactory ioEventHandlerFactory = new H2AsyncClientEventHandlerFactory(
new DefaultHttpProcessor(new H2RequestContent(), new H2RequestTargetHost(), new H2RequestConnControl()),
new HandlerFactory() {
@@ -829,7 +829,7 @@ public class Http2AsyncClientBuilder {
}
closeablesCopy.add(connPool);
- return new InternalHttp2AsyncClient(
+ return new InternalH2AsyncClient(
ioReactor,
execChain,
pushConsumerRegistry,
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientEventHandlerFactory.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientEventHandlerFactory.java
similarity index 98%
rename from httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientEventHandlerFactory.java
rename to httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientEventHandlerFactory.java
index 4849ba3fb..6e3799bad 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientEventHandlerFactory.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientEventHandlerFactory.java
@@ -50,7 +50,7 @@ import org.apache.hc.core5.util.Args;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-class Http2AsyncClientEventHandlerFactory implements IOEventHandlerFactory {
+class H2AsyncClientEventHandlerFactory implements IOEventHandlerFactory {
private final Logger wireLog = LoggerFactory.getLogger("org.apache.hc.client5.http.wire");
private final Logger headerLog = LoggerFactory.getLogger("org.apache.hc.client5.http.headers");
@@ -63,7 +63,7 @@ class Http2AsyncClientEventHandlerFactory implements IOEventHandlerFactory {
private final H2Config h2Config;
private final CharCodingConfig charCodingConfig;
- Http2AsyncClientEventHandlerFactory(
+ H2AsyncClientEventHandlerFactory(
final HttpProcessor httpProcessor,
final HandlerFactory exchangeHandlerFactory,
final H2Config h2Config,
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncMainClientExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncMainClientExec.java
similarity index 99%
rename from httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncMainClientExec.java
rename to httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncMainClientExec.java
index 1e8b843d1..5ad074b09 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncMainClientExec.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncMainClientExec.java
@@ -66,7 +66,7 @@ import org.slf4j.LoggerFactory;
*/
@Contract(threading = ThreadingBehavior.STATELESS)
@Internal
-public class Http2AsyncMainClientExec implements AsyncExecChainHandler {
+public class H2AsyncMainClientExec implements AsyncExecChainHandler {
private final Logger log = LoggerFactory.getLogger(getClass());
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClients.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClients.java
index 83c354671..9c38f24f3 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClients.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClients.java
@@ -95,8 +95,8 @@ public final class HttpAsyncClients {
* {@link CloseableHttpAsyncClient} instances optimized for HTTP/2 protocol
* and message multiplexing
*/
- public static Http2AsyncClientBuilder customHttp2() {
- return Http2AsyncClientBuilder.create();
+ public static H2AsyncClientBuilder customHttp2() {
+ return H2AsyncClientBuilder.create();
}
/**
@@ -104,7 +104,7 @@ public final class HttpAsyncClients {
* optimized for HTTP/2 protocol and message multiplexing.
*/
public static CloseableHttpAsyncClient createHttp2Default() {
- return Http2AsyncClientBuilder.create().build();
+ return H2AsyncClientBuilder.create().build();
}
/**
@@ -112,7 +112,7 @@ public final class HttpAsyncClients {
* system properties optimized for HTTP/2 protocol and message multiplexing.
*/
public static CloseableHttpAsyncClient createHttp2System() {
- return Http2AsyncClientBuilder.create().useSystemProperties().build();
+ return H2AsyncClientBuilder.create().useSystemProperties().build();
}
private static HttpProcessor createMinimalProtocolProcessor() {
@@ -223,13 +223,13 @@ public final class HttpAsyncClients {
connManager);
}
- private static MinimalHttp2AsyncClient createMinimalHttp2AsyncClientImpl(
+ private static MinimalH2AsyncClient createMinimalHttp2AsyncClientImpl(
final IOEventHandlerFactory eventHandlerFactory,
final AsyncPushConsumerRegistry pushConsumerRegistry,
final IOReactorConfig ioReactorConfig,
final DnsResolver dnsResolver,
final TlsStrategy tlsStrategy) {
- return new MinimalHttp2AsyncClient(
+ return new MinimalH2AsyncClient(
eventHandlerFactory,
pushConsumerRegistry,
ioReactorConfig,
@@ -240,17 +240,17 @@ public final class HttpAsyncClients {
}
/**
- * Creates {@link MinimalHttp2AsyncClient} instance optimized for HTTP/2 multiplexing message
+ * Creates {@link MinimalH2AsyncClient} instance optimized for HTTP/2 multiplexing message
* transport without advanced HTTP protocol functionality.
*/
- public static MinimalHttp2AsyncClient createHttp2Minimal(
+ public static MinimalH2AsyncClient createHttp2Minimal(
final H2Config h2Config,
final IOReactorConfig ioReactorConfig,
final DnsResolver dnsResolver,
final TlsStrategy tlsStrategy) {
final AsyncPushConsumerRegistry pushConsumerRegistry = new AsyncPushConsumerRegistry();
return createMinimalHttp2AsyncClientImpl(
- new Http2AsyncClientEventHandlerFactory(
+ new H2AsyncClientEventHandlerFactory(
createMinimalProtocolProcessor(),
new HandlerFactory() {
@@ -269,10 +269,10 @@ public final class HttpAsyncClients {
}
/**
- * Creates {@link MinimalHttp2AsyncClient} instance optimized for HTTP/2 multiplexing message
+ * Creates {@link MinimalH2AsyncClient} instance optimized for HTTP/2 multiplexing message
* transport without advanced HTTP protocol functionality.
*/
- public static MinimalHttp2AsyncClient createHttp2Minimal(
+ public static MinimalH2AsyncClient createHttp2Minimal(
final H2Config h2Config,
final IOReactorConfig ioReactorConfig,
final TlsStrategy tlsStrategy) {
@@ -280,28 +280,28 @@ public final class HttpAsyncClients {
}
/**
- * Creates {@link MinimalHttp2AsyncClient} instance optimized for HTTP/2 multiplexing message
+ * Creates {@link MinimalH2AsyncClient} instance optimized for HTTP/2 multiplexing message
* transport without advanced HTTP protocol functionality.
*/
- public static MinimalHttp2AsyncClient createHttp2Minimal(
+ public static MinimalH2AsyncClient createHttp2Minimal(
final H2Config h2Config,
final IOReactorConfig ioReactorConfig) {
return createHttp2Minimal(h2Config, ioReactorConfig, DefaultClientTlsStrategy.getDefault());
}
/**
- * Creates {@link MinimalHttp2AsyncClient} instance optimized for HTTP/2 multiplexing message
+ * Creates {@link MinimalH2AsyncClient} instance optimized for HTTP/2 multiplexing message
* transport without advanced HTTP protocol functionality.
*/
- public static MinimalHttp2AsyncClient createHttp2Minimal(final H2Config h2Config) {
+ public static MinimalH2AsyncClient createHttp2Minimal(final H2Config h2Config) {
return createHttp2Minimal(h2Config, IOReactorConfig.DEFAULT);
}
/**
- * Creates {@link MinimalHttp2AsyncClient} instance optimized for HTTP/2 multiplexing message
+ * Creates {@link MinimalH2AsyncClient} instance optimized for HTTP/2 multiplexing message
* transport without advanced HTTP protocol functionality.
*/
- public static MinimalHttp2AsyncClient createHttp2Minimal() {
+ public static MinimalH2AsyncClient createHttp2Minimal() {
return createHttp2Minimal(H2Config.DEFAULT);
}
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttp2AsyncClient.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalH2AsyncClient.java
similarity index 95%
rename from httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttp2AsyncClient.java
rename to httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalH2AsyncClient.java
index 323ef772a..ff7210960 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttp2AsyncClient.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalH2AsyncClient.java
@@ -63,12 +63,12 @@ import org.apache.hc.core5.reactor.DefaultConnectingIOReactor;
*/
@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
@Internal
-public final class InternalHttp2AsyncClient extends InternalAbstractHttpAsyncClient {
+public final class InternalH2AsyncClient extends InternalAbstractHttpAsyncClient {
private final HttpRoutePlanner routePlanner;
private final H2ConnPool connPool;
- InternalHttp2AsyncClient(
+ InternalH2AsyncClient(
final DefaultConnectingIOReactor ioReactor,
final AsyncExecChainElement execChain,
final AsyncPushConsumerRegistry pushConsumerRegistry,
@@ -89,7 +89,7 @@ public final class InternalHttp2AsyncClient extends InternalAbstractHttpAsyncCli
@Override
AsyncExecRuntime crerateAsyncExecRuntime(final HandlerFactory pushHandlerFactory) {
- return new InternalHttp2AsyncExecRuntime(log, connPool, pushHandlerFactory);
+ return new InternalH2AsyncExecRuntime(log, connPool, pushHandlerFactory);
}
@Override
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttp2AsyncExecRuntime.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalH2AsyncExecRuntime.java
similarity index 96%
rename from httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttp2AsyncExecRuntime.java
rename to httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalH2AsyncExecRuntime.java
index 5fc835c00..de9207539 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttp2AsyncExecRuntime.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalH2AsyncExecRuntime.java
@@ -53,7 +53,7 @@ import org.apache.hc.core5.util.TimeValue;
import org.apache.hc.core5.util.Timeout;
import org.slf4j.Logger;
-class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
+class InternalH2AsyncExecRuntime implements AsyncExecRuntime {
private final Logger log;
private final H2ConnPool connPool;
@@ -61,7 +61,7 @@ class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
private final AtomicReference sessionRef;
private volatile boolean reusable;
- InternalHttp2AsyncExecRuntime(
+ InternalH2AsyncExecRuntime(
final Logger log,
final H2ConnPool connPool,
final HandlerFactory pushHandlerFactory) {
@@ -103,7 +103,7 @@ class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
if (log.isDebugEnabled()) {
log.debug(id + ": acquired endpoint");
}
- callback.completed(InternalHttp2AsyncExecRuntime.this);
+ callback.completed(InternalH2AsyncExecRuntime.this);
}
@Override
@@ -198,7 +198,7 @@ class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
if (log.isDebugEnabled()) {
log.debug(ConnPoolSupport.getId(endpoint) + ": endpoint connected");
}
- callback.completed(InternalHttp2AsyncExecRuntime.this);
+ callback.completed(InternalH2AsyncExecRuntime.this);
}
@Override
@@ -296,7 +296,7 @@ class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
@Override
public AsyncExecRuntime fork() {
- return new InternalHttp2AsyncExecRuntime(log, connPool, pushHandlerFactory);
+ return new InternalH2AsyncExecRuntime(log, connPool, pushHandlerFactory);
}
}
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/MinimalHttp2AsyncClient.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/MinimalH2AsyncClient.java
similarity index 99%
rename from httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/MinimalHttp2AsyncClient.java
rename to httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/MinimalH2AsyncClient.java
index 6f728e1aa..cad86c107 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/MinimalHttp2AsyncClient.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/MinimalH2AsyncClient.java
@@ -88,12 +88,12 @@ import org.apache.hc.core5.util.Timeout;
* @since 5.0
*/
@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
-public final class MinimalHttp2AsyncClient extends AbstractMinimalHttpAsyncClientBase {
+public final class MinimalH2AsyncClient extends AbstractMinimalHttpAsyncClientBase {
private final H2ConnPool connPool;
private final ConnectionInitiator connectionInitiator;
- MinimalHttp2AsyncClient(
+ MinimalH2AsyncClient(
final IOEventHandlerFactory eventHandlerFactory,
final AsyncPushConsumerRegistry pushConsumerRegistry,
final IOReactorConfig reactorConfig,
diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientHttp2FullDuplexExchange.java b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientH2FullDuplexExchange.java
similarity index 99%
rename from httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientHttp2FullDuplexExchange.java
rename to httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientH2FullDuplexExchange.java
index 9cc783de8..f3ea5f5cd 100644
--- a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientHttp2FullDuplexExchange.java
+++ b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientH2FullDuplexExchange.java
@@ -58,7 +58,7 @@ import org.apache.hc.core5.util.Timeout;
/**
* This example demonstrates a full-duplex, streaming HTTP/2 message exchange.
*/
-public class AsyncClientHttp2FullDuplexExchange {
+public class AsyncClientH2FullDuplexExchange {
public static void main(final String[] args) throws Exception {
diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientHttp2Multiplexing.java b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientH2Multiplexing.java
similarity index 99%
rename from httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientHttp2Multiplexing.java
rename to httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientH2Multiplexing.java
index 729ca1817..e10af5a07 100644
--- a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientHttp2Multiplexing.java
+++ b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientH2Multiplexing.java
@@ -50,7 +50,7 @@ import org.apache.hc.core5.util.Timeout;
* This example demonstrates concurrent (multiplexed) execution of multiple
* HTTP/2 message exchanges.
*/
-public class AsyncClientHttp2Multiplexing {
+public class AsyncClientH2Multiplexing {
public static void main(final String[] args) throws Exception {
diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientHttp2ServerPush.java b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientH2ServerPush.java
similarity index 99%
rename from httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientHttp2ServerPush.java
rename to httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientH2ServerPush.java
index 22dc28310..12ec238c5 100644
--- a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientHttp2ServerPush.java
+++ b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientH2ServerPush.java
@@ -54,7 +54,7 @@ import org.apache.hc.core5.util.Timeout;
/**
* This example demonstrates handling of HTTP/2 message exchanges pushed by the server.
*/
-public class AsyncClientHttp2ServerPush {
+public class AsyncClientH2ServerPush {
public static void main(final String[] args) throws Exception {