SLF4J logging facade
This commit is contained in:
parent
16147b1852
commit
eb71f45ee5
|
@ -45,14 +45,18 @@
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>log4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-slf4j-impl</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-core</artifactId>
|
<artifactId>log4j-core</artifactId>
|
||||||
<version>${log4j.version}</version>
|
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -50,12 +50,12 @@ import org.apache.hc.core5.http.HttpResponse;
|
||||||
import org.apache.hc.core5.http.message.RequestLine;
|
import org.apache.hc.core5.http.message.RequestLine;
|
||||||
import org.apache.hc.core5.http.message.StatusLine;
|
import org.apache.hc.core5.http.message.StatusLine;
|
||||||
import org.apache.hc.core5.util.ByteArrayBuffer;
|
import org.apache.hc.core5.util.ByteArrayBuffer;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
class BasicHttpAsyncCache implements HttpAsyncCache {
|
class BasicHttpAsyncCache implements HttpAsyncCache {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final CacheUpdateHandler cacheUpdateHandler;
|
private final CacheUpdateHandler cacheUpdateHandler;
|
||||||
private final CacheKeyGenerator cacheKeyGenerator;
|
private final CacheKeyGenerator cacheKeyGenerator;
|
||||||
|
|
|
@ -46,12 +46,12 @@ import org.apache.hc.core5.http.HttpResponse;
|
||||||
import org.apache.hc.core5.http.message.RequestLine;
|
import org.apache.hc.core5.http.message.RequestLine;
|
||||||
import org.apache.hc.core5.http.message.StatusLine;
|
import org.apache.hc.core5.http.message.StatusLine;
|
||||||
import org.apache.hc.core5.util.ByteArrayBuffer;
|
import org.apache.hc.core5.util.ByteArrayBuffer;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
class BasicHttpCache implements HttpCache {
|
class BasicHttpCache implements HttpCache {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final CacheUpdateHandler cacheUpdateHandler;
|
private final CacheUpdateHandler cacheUpdateHandler;
|
||||||
private final CacheKeyGenerator cacheKeyGenerator;
|
private final CacheKeyGenerator cacheKeyGenerator;
|
||||||
|
|
|
@ -45,8 +45,8 @@ import org.apache.hc.core5.http.HttpResponse;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.hc.core5.util.Timeout;
|
import org.apache.hc.core5.util.Timeout;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract cache re-validation class.
|
* Abstract cache re-validation class.
|
||||||
|
@ -94,7 +94,7 @@ class CacheRevalidatorBase implements Closeable {
|
||||||
private final Set<String> pendingRequest;
|
private final Set<String> pendingRequest;
|
||||||
private final ConcurrentCountMap<String> failureCache;
|
private final ConcurrentCountMap<String> failureCache;
|
||||||
|
|
||||||
final Logger log = LogManager.getLogger(getClass());
|
final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create CacheValidator which will make ache revalidation requests
|
* Create CacheValidator which will make ache revalidation requests
|
||||||
|
|
|
@ -36,8 +36,8 @@ import org.apache.hc.core5.http.HttpRequest;
|
||||||
import org.apache.hc.core5.http.HttpVersion;
|
import org.apache.hc.core5.http.HttpVersion;
|
||||||
import org.apache.hc.core5.http.ProtocolVersion;
|
import org.apache.hc.core5.http.ProtocolVersion;
|
||||||
import org.apache.hc.core5.http.message.MessageSupport;
|
import org.apache.hc.core5.http.message.MessageSupport;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if an HttpRequest is allowed to be served from the cache.
|
* Determines if an HttpRequest is allowed to be served from the cache.
|
||||||
|
@ -47,7 +47,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
||||||
class CacheableRequestPolicy {
|
class CacheableRequestPolicy {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if an HttpRequest can be served from the cache.
|
* Determines if an HttpRequest can be served from the cache.
|
||||||
|
|
|
@ -40,8 +40,8 @@ import org.apache.hc.core5.http.HttpHost;
|
||||||
import org.apache.hc.core5.http.HttpRequest;
|
import org.apache.hc.core5.http.HttpRequest;
|
||||||
import org.apache.hc.core5.http.HttpStatus;
|
import org.apache.hc.core5.http.HttpStatus;
|
||||||
import org.apache.hc.core5.http.message.MessageSupport;
|
import org.apache.hc.core5.http.message.MessageSupport;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether a given {@link HttpCacheEntry} is suitable to be
|
* Determines whether a given {@link HttpCacheEntry} is suitable to be
|
||||||
|
@ -52,7 +52,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
||||||
class CachedResponseSuitabilityChecker {
|
class CachedResponseSuitabilityChecker {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final boolean sharedCache;
|
private final boolean sharedCache;
|
||||||
private final boolean useHeuristicCaching;
|
private final boolean useHeuristicCaching;
|
||||||
|
|
|
@ -69,8 +69,8 @@ import org.apache.hc.core5.http.protocol.HttpCoreContext;
|
||||||
import org.apache.hc.core5.net.URIAuthority;
|
import org.apache.hc.core5.net.URIAuthority;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.hc.core5.util.ByteArrayBuffer;
|
import org.apache.hc.core5.util.ByteArrayBuffer;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -107,7 +107,7 @@ public class CachingExec extends CachingExecBase implements ExecChainHandler {
|
||||||
private final DefaultCacheRevalidator cacheRevalidator;
|
private final DefaultCacheRevalidator cacheRevalidator;
|
||||||
private final ConditionalRequestBuilder<ClassicHttpRequest> conditionalRequestBuilder;
|
private final ConditionalRequestBuilder<ClassicHttpRequest> conditionalRequestBuilder;
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
CachingExec(final HttpCache cache, final DefaultCacheRevalidator cacheRevalidator, final CacheConfig config) {
|
CachingExec(final HttpCache cache, final DefaultCacheRevalidator cacheRevalidator, final CacheConfig config) {
|
||||||
super(config);
|
super(config);
|
||||||
|
|
|
@ -54,8 +54,8 @@ import org.apache.hc.core5.http.ProtocolVersion;
|
||||||
import org.apache.hc.core5.http.message.MessageSupport;
|
import org.apache.hc.core5.http.message.MessageSupport;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.util.VersionInfo;
|
import org.apache.hc.core5.util.VersionInfo;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class CachingExecBase {
|
public class CachingExecBase {
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ public class CachingExecBase {
|
||||||
final RequestProtocolCompliance requestCompliance;
|
final RequestProtocolCompliance requestCompliance;
|
||||||
final CacheConfig cacheConfig;
|
final CacheConfig cacheConfig;
|
||||||
|
|
||||||
final Logger log = LogManager.getLogger(getClass());
|
final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
CachingExecBase(
|
CachingExecBase(
|
||||||
final CacheValidityPolicy validityPolicy,
|
final CacheValidityPolicy validityPolicy,
|
||||||
|
|
|
@ -47,8 +47,8 @@ import org.apache.hc.core5.http.HttpHost;
|
||||||
import org.apache.hc.core5.http.HttpRequest;
|
import org.apache.hc.core5.http.HttpRequest;
|
||||||
import org.apache.hc.core5.http.HttpResponse;
|
import org.apache.hc.core5.http.HttpResponse;
|
||||||
import org.apache.hc.core5.http.HttpStatus;
|
import org.apache.hc.core5.http.HttpStatus;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a particular HTTP request / response pair, flush any cache entries
|
* Given a particular HTTP request / response pair, flush any cache entries
|
||||||
|
@ -62,7 +62,7 @@ public class DefaultAsyncCacheInvalidator extends CacheInvalidatorBase implement
|
||||||
|
|
||||||
public static final DefaultAsyncCacheInvalidator INSTANCE = new DefaultAsyncCacheInvalidator();
|
public static final DefaultAsyncCacheInvalidator INSTANCE = new DefaultAsyncCacheInvalidator();
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private void removeEntry(final HttpAsyncCacheStorage storage, final String cacheKey) {
|
private void removeEntry(final HttpAsyncCacheStorage storage, final String cacheKey) {
|
||||||
storage.removeEntry(cacheKey, new FutureCallback<Boolean>() {
|
storage.removeEntry(cacheKey, new FutureCallback<Boolean>() {
|
||||||
|
|
|
@ -41,8 +41,8 @@ import org.apache.hc.core5.http.Header;
|
||||||
import org.apache.hc.core5.http.HttpHost;
|
import org.apache.hc.core5.http.HttpHost;
|
||||||
import org.apache.hc.core5.http.HttpRequest;
|
import org.apache.hc.core5.http.HttpRequest;
|
||||||
import org.apache.hc.core5.http.HttpResponse;
|
import org.apache.hc.core5.http.HttpResponse;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a particular HTTP request / response pair, flush any cache entries
|
* Given a particular HTTP request / response pair, flush any cache entries
|
||||||
|
@ -56,7 +56,7 @@ public class DefaultCacheInvalidator extends CacheInvalidatorBase implements Htt
|
||||||
|
|
||||||
public static final DefaultCacheInvalidator INSTANCE = new DefaultCacheInvalidator();
|
public static final DefaultCacheInvalidator INSTANCE = new DefaultCacheInvalidator();
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private HttpCacheEntry getEntry(final HttpCacheStorage storage, final String cacheKey) {
|
private HttpCacheEntry getEntry(final HttpCacheStorage storage, final String cacheKey) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -46,8 +46,8 @@ import org.apache.hc.core5.http.HttpStatus;
|
||||||
import org.apache.hc.core5.http.HttpVersion;
|
import org.apache.hc.core5.http.HttpVersion;
|
||||||
import org.apache.hc.core5.http.ProtocolVersion;
|
import org.apache.hc.core5.http.ProtocolVersion;
|
||||||
import org.apache.hc.core5.http.message.MessageSupport;
|
import org.apache.hc.core5.http.message.MessageSupport;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if an HttpResponse can be cached.
|
* Determines if an HttpResponse can be cached.
|
||||||
|
@ -68,7 +68,7 @@ class ResponseCachingPolicy {
|
||||||
HttpStatus.SC_MOVED_PERMANENTLY,
|
HttpStatus.SC_MOVED_PERMANENTLY,
|
||||||
HttpStatus.SC_GONE));
|
HttpStatus.SC_GONE));
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final long maxObjectSizeBytes;
|
private final long maxObjectSizeBytes;
|
||||||
private final boolean sharedCache;
|
private final boolean sharedCache;
|
||||||
|
|
|
@ -30,8 +30,8 @@ import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
import org.apache.commons.codec.binary.Hex;
|
import org.apache.commons.codec.binary.Hex;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a {@link KeyHashingScheme} based on the
|
* This is a {@link KeyHashingScheme} based on the
|
||||||
|
@ -44,7 +44,7 @@ public final class SHA256KeyHashingScheme implements KeyHashingScheme {
|
||||||
|
|
||||||
public static final SHA256KeyHashingScheme INSTANCE = new SHA256KeyHashingScheme();
|
public static final SHA256KeyHashingScheme INSTANCE = new SHA256KeyHashingScheme();
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String hash(final String key) {
|
public String hash(final String key) {
|
||||||
|
|
|
@ -51,15 +51,19 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
<classifier>tests</classifier>
|
<classifier>tests</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- direct dependency on logging -->
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-api</artifactId>
|
<artifactId>log4j-slf4j-impl</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-core</artifactId>
|
<artifactId>log4j-core</artifactId>
|
||||||
<version>${log4j.version}</version>
|
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
<packaging>bundle</packaging>
|
<packaging>bundle</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<httpcore.osgi.import.version>"5.0-alpha2"</httpcore.osgi.import.version>
|
<httpcore.osgi.import.version>"5.0-beta1"</httpcore.osgi.import.version>
|
||||||
<log4j.osgi.import.version>"2.8"</log4j.osgi.import.version>
|
<slf4j.osgi.import.version>"[1.7, 1.8)"</slf4j.osgi.import.version>
|
||||||
<osgi.framework.version>5.0.0</osgi.framework.version>
|
<osgi.framework.version>5.0.0</osgi.framework.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
@ -57,12 +57,6 @@
|
||||||
<artifactId>httpcore5-osgi</artifactId>
|
<artifactId>httpcore5-osgi</artifactId>
|
||||||
<version>${httpcore.version}</version>
|
<version>${httpcore.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.httpcomponents.client5</groupId>
|
|
||||||
<artifactId>httpcore-nio</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-codec</groupId>
|
<groupId>commons-codec</groupId>
|
||||||
|
@ -134,7 +128,7 @@
|
||||||
org.ietf.jgss,,
|
org.ietf.jgss,,
|
||||||
org.osgi.framework,
|
org.osgi.framework,
|
||||||
org.osgi.service.cm,
|
org.osgi.service.cm,
|
||||||
org.apache.logging.log4j;version=${log4j.osgi.import.version},
|
org.slf4j;version=${slf4j.osgi.import.version},
|
||||||
org.apache.hc.core5.*;version=${httpcore.osgi.import.version},
|
org.apache.hc.core5.*;version=${httpcore.osgi.import.version},
|
||||||
org.ehcache.*;resolution:=optional,
|
org.ehcache.*;resolution:=optional,
|
||||||
net.spy.memcached.*;resolution:=optional
|
net.spy.memcached.*;resolution:=optional
|
||||||
|
|
|
@ -35,15 +35,15 @@ import org.apache.hc.client5.http.auth.NTCredentials;
|
||||||
import org.apache.hc.client5.http.auth.UsernamePasswordCredentials;
|
import org.apache.hc.client5.http.auth.UsernamePasswordCredentials;
|
||||||
import org.apache.hc.client5.http.osgi.services.ProxyConfiguration;
|
import org.apache.hc.client5.http.osgi.services.ProxyConfiguration;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.3
|
* @since 4.3
|
||||||
*/
|
*/
|
||||||
final class OSGiCredentialsProvider implements CredentialsStore {
|
final class OSGiCredentialsProvider implements CredentialsStore {
|
||||||
|
|
||||||
private static final Logger log = LogManager.getLogger(OSGiCredentialsProvider.class);
|
private static final Logger log = LoggerFactory.getLogger(OSGiCredentialsProvider.class);
|
||||||
|
|
||||||
private static final int HOST_AND_PORT_MATCH = 12;
|
private static final int HOST_AND_PORT_MATCH = 12;
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,18 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-slf4j-impl</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<!-- TODO remove after upgrade to HttpCore 5.0b2 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-api</artifactId>
|
<artifactId>log4j-api</artifactId>
|
||||||
|
@ -57,6 +69,7 @@
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-core</artifactId>
|
<artifactId>log4j-core</artifactId>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents.client5</groupId>
|
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||||
|
|
|
@ -50,6 +50,21 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
<classifier>tests</classifier>
|
<classifier>tests</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-slf4j-impl</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.java.dev.jna</groupId>
|
<groupId>net.java.dev.jna</groupId>
|
||||||
<artifactId>jna</artifactId>
|
<artifactId>jna</artifactId>
|
||||||
|
@ -65,11 +80,6 @@
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
|
||||||
<artifactId>log4j-core</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<reporting>
|
<reporting>
|
||||||
|
|
|
@ -44,8 +44,8 @@ import org.apache.hc.core5.http.HttpRequest;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.net.URIAuthority;
|
import org.apache.hc.core5.net.URIAuthority;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.sun.jna.platform.win32.Secur32;
|
import com.sun.jna.platform.win32.Secur32;
|
||||||
import com.sun.jna.platform.win32.Secur32Util;
|
import com.sun.jna.platform.win32.Secur32Util;
|
||||||
|
@ -71,7 +71,7 @@ import com.sun.jna.ptr.IntByReference;
|
||||||
*/
|
*/
|
||||||
public class WindowsNegotiateScheme implements AuthScheme {
|
public class WindowsNegotiateScheme implements AuthScheme {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
// NTLM or Negotiate
|
// NTLM or Negotiate
|
||||||
private final String scheme;
|
private final String scheme;
|
||||||
|
|
|
@ -48,14 +48,18 @@
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>log4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-slf4j-impl</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-core</artifactId>
|
<artifactId>log4j-core</artifactId>
|
||||||
<version>${log4j.version}</version>
|
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -48,8 +48,8 @@ import org.apache.hc.core5.annotation.ThreadingBehavior;
|
||||||
import org.apache.hc.core5.http.config.Lookup;
|
import org.apache.hc.core5.http.config.Lookup;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default implementation of {@link AuthenticationStrategy}
|
* Default implementation of {@link AuthenticationStrategy}
|
||||||
|
@ -59,7 +59,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
||||||
public class DefaultAuthenticationStrategy implements AuthenticationStrategy {
|
public class DefaultAuthenticationStrategy implements AuthenticationStrategy {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
public static final DefaultAuthenticationStrategy INSTANCE = new DefaultAuthenticationStrategy();
|
public static final DefaultAuthenticationStrategy INSTANCE = new DefaultAuthenticationStrategy();
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import org.apache.hc.client5.http.DnsResolver;
|
import org.apache.hc.client5.http.DnsResolver;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In-memory {@link DnsResolver} implementation.
|
* In-memory {@link DnsResolver} implementation.
|
||||||
|
@ -45,7 +45,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
public class InMemoryDnsResolver implements DnsResolver {
|
public class InMemoryDnsResolver implements DnsResolver {
|
||||||
|
|
||||||
/** Logger associated to this class. */
|
/** Logger associated to this class. */
|
||||||
private final Logger log = LogManager.getLogger(InMemoryDnsResolver.class);
|
private final Logger log = LoggerFactory.getLogger(InMemoryDnsResolver.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In-memory collection that will hold the associations between a host name
|
* In-memory collection that will hold the associations between a host name
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.nio.ByteBuffer;
|
||||||
|
|
||||||
import org.apache.hc.core5.annotation.Internal;
|
import org.apache.hc.core5.annotation.Internal;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
@Internal
|
@Internal
|
||||||
public class Wire {
|
public class Wire {
|
||||||
|
|
|
@ -40,14 +40,14 @@ import org.apache.hc.core5.reactor.DefaultConnectingIOReactor;
|
||||||
import org.apache.hc.core5.reactor.ExceptionEvent;
|
import org.apache.hc.core5.reactor.ExceptionEvent;
|
||||||
import org.apache.hc.core5.reactor.IOReactorStatus;
|
import org.apache.hc.core5.reactor.IOReactorStatus;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
abstract class AbstractHttpAsyncClientBase extends CloseableHttpAsyncClient {
|
abstract class AbstractHttpAsyncClientBase extends CloseableHttpAsyncClient {
|
||||||
|
|
||||||
enum Status { READY, RUNNING, TERMINATED }
|
enum Status { READY, RUNNING, TERMINATED }
|
||||||
|
|
||||||
final Logger log = LogManager.getLogger(getClass());
|
final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final AsyncPushConsumerRegistry pushConsumerRegistry;
|
private final AsyncPushConsumerRegistry pushConsumerRegistry;
|
||||||
private final DefaultConnectingIOReactor ioReactor;
|
private final DefaultConnectingIOReactor ioReactor;
|
||||||
|
|
|
@ -63,8 +63,8 @@ import org.apache.hc.core5.http.nio.AsyncEntityProducer;
|
||||||
import org.apache.hc.core5.http.protocol.HttpCoreContext;
|
import org.apache.hc.core5.http.protocol.HttpCoreContext;
|
||||||
import org.apache.hc.core5.http.protocol.HttpProcessor;
|
import org.apache.hc.core5.http.protocol.HttpProcessor;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request executor in the HTTP request execution chain
|
* Request executor in the HTTP request execution chain
|
||||||
|
@ -76,7 +76,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
|
||||||
public final class AsyncConnectExec implements AsyncExecChainHandler {
|
public final class AsyncConnectExec implements AsyncExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final HttpProcessor proxyHttpProcessor;
|
private final HttpProcessor proxyHttpProcessor;
|
||||||
private final AuthenticationStrategy proxyAuthStrategy;
|
private final AuthenticationStrategy proxyAuthStrategy;
|
||||||
|
|
|
@ -64,8 +64,8 @@ import org.apache.hc.core5.http.protocol.HttpCoreContext;
|
||||||
import org.apache.hc.core5.http.protocol.HttpProcessor;
|
import org.apache.hc.core5.http.protocol.HttpProcessor;
|
||||||
import org.apache.hc.core5.net.URIAuthority;
|
import org.apache.hc.core5.net.URIAuthority;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request executor in the request execution chain that is responsible
|
* Request executor in the request execution chain that is responsible
|
||||||
|
@ -80,7 +80,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
||||||
class AsyncProtocolExec implements AsyncExecChainHandler {
|
class AsyncProtocolExec implements AsyncExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final HttpProcessor httpProcessor;
|
private final HttpProcessor httpProcessor;
|
||||||
private final AuthenticationStrategy targetAuthStrategy;
|
private final AuthenticationStrategy targetAuthStrategy;
|
||||||
|
|
|
@ -55,12 +55,12 @@ import org.apache.hc.core5.http.message.BasicHttpRequest;
|
||||||
import org.apache.hc.core5.http.nio.AsyncDataConsumer;
|
import org.apache.hc.core5.http.nio.AsyncDataConsumer;
|
||||||
import org.apache.hc.core5.http.nio.AsyncEntityProducer;
|
import org.apache.hc.core5.http.nio.AsyncEntityProducer;
|
||||||
import org.apache.hc.core5.util.LangUtils;
|
import org.apache.hc.core5.util.LangUtils;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
class AsyncRedirectExec implements AsyncExecChainHandler {
|
class AsyncRedirectExec implements AsyncExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final HttpRoutePlanner routePlanner;
|
private final HttpRoutePlanner routePlanner;
|
||||||
private final RedirectStrategy redirectStrategy;
|
private final RedirectStrategy redirectStrategy;
|
||||||
|
|
|
@ -42,12 +42,12 @@ import org.apache.hc.core5.http.HttpResponse;
|
||||||
import org.apache.hc.core5.http.nio.AsyncDataConsumer;
|
import org.apache.hc.core5.http.nio.AsyncDataConsumer;
|
||||||
import org.apache.hc.core5.http.nio.AsyncEntityProducer;
|
import org.apache.hc.core5.http.nio.AsyncEntityProducer;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
class AsyncRetryExec implements AsyncExecChainHandler {
|
class AsyncRetryExec implements AsyncExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final HttpRequestRetryHandler retryHandler;
|
private final HttpRequestRetryHandler retryHandler;
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,8 @@ import org.apache.hc.core5.reactor.IOEventHandler;
|
||||||
import org.apache.hc.core5.reactor.IOEventHandlerFactory;
|
import org.apache.hc.core5.reactor.IOEventHandlerFactory;
|
||||||
import org.apache.hc.core5.reactor.TlsCapableIOSession;
|
import org.apache.hc.core5.reactor.TlsCapableIOSession;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
|
@ -57,11 +57,11 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
||||||
class Http2AsyncClientEventHandlerFactory implements IOEventHandlerFactory {
|
class Http2AsyncClientEventHandlerFactory implements IOEventHandlerFactory {
|
||||||
|
|
||||||
private final Logger wireLog = LogManager.getLogger("org.apache.hc.client5.http.wire");
|
private final Logger wireLog = LoggerFactory.getLogger("org.apache.hc.client5.http.wire");
|
||||||
private final Logger headerLog = LogManager.getLogger("org.apache.hc.client5.http.headers");
|
private final Logger headerLog = LoggerFactory.getLogger("org.apache.hc.client5.http.headers");
|
||||||
private final Logger frameLog = LogManager.getLogger("org.apache.hc.client5.http2.frame");
|
private final Logger frameLog = LoggerFactory.getLogger("org.apache.hc.client5.http2.frame");
|
||||||
private final Logger framePayloadLog = LogManager.getLogger("org.apache.hc.client5.http2.frame.payload");
|
private final Logger framePayloadLog = LoggerFactory.getLogger("org.apache.hc.client5.http2.frame.payload");
|
||||||
private final Logger flowCtrlLog = LogManager.getLogger("org.apache.hc.client5.http2.flow");
|
private final Logger flowCtrlLog = LoggerFactory.getLogger("org.apache.hc.client5.http2.flow");
|
||||||
|
|
||||||
private final HttpProcessor httpProcessor;
|
private final HttpProcessor httpProcessor;
|
||||||
private final HandlerFactory<AsyncPushConsumer> exchangeHandlerFactory;
|
private final HandlerFactory<AsyncPushConsumer> exchangeHandlerFactory;
|
||||||
|
@ -81,7 +81,7 @@ class Http2AsyncClientEventHandlerFactory implements IOEventHandlerFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IOEventHandler createHandler(final TlsCapableIOSession ioSession, final Object attachment) {
|
public IOEventHandler createHandler(final TlsCapableIOSession ioSession, final Object attachment) {
|
||||||
final Logger sessionLog = LogManager.getLogger(ioSession.getClass());
|
final Logger sessionLog = LoggerFactory.getLogger(ioSession.getClass());
|
||||||
if (sessionLog.isDebugEnabled()
|
if (sessionLog.isDebugEnabled()
|
||||||
|| wireLog.isDebugEnabled()
|
|| wireLog.isDebugEnabled()
|
||||||
|| headerLog.isDebugEnabled()
|
|| headerLog.isDebugEnabled()
|
||||||
|
|
|
@ -50,12 +50,12 @@ import org.apache.hc.core5.http.nio.AsyncEntityProducer;
|
||||||
import org.apache.hc.core5.http.nio.CapacityChannel;
|
import org.apache.hc.core5.http.nio.CapacityChannel;
|
||||||
import org.apache.hc.core5.http.nio.DataStreamChannel;
|
import org.apache.hc.core5.http.nio.DataStreamChannel;
|
||||||
import org.apache.hc.core5.http.nio.RequestChannel;
|
import org.apache.hc.core5.http.nio.RequestChannel;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
class Http2AsyncMainClientExec implements AsyncExecChainHandler {
|
class Http2AsyncMainClientExec implements AsyncExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(
|
public void execute(
|
||||||
|
|
|
@ -64,8 +64,8 @@ import org.apache.hc.core5.reactor.IOEventHandler;
|
||||||
import org.apache.hc.core5.reactor.IOEventHandlerFactory;
|
import org.apache.hc.core5.reactor.IOEventHandlerFactory;
|
||||||
import org.apache.hc.core5.reactor.TlsCapableIOSession;
|
import org.apache.hc.core5.reactor.TlsCapableIOSession;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
|
@ -73,12 +73,12 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
||||||
class HttpAsyncClientEventHandlerFactory implements IOEventHandlerFactory {
|
class HttpAsyncClientEventHandlerFactory implements IOEventHandlerFactory {
|
||||||
|
|
||||||
private final Logger streamLog = LogManager.getLogger(InternalHttpAsyncClient.class);
|
private final Logger streamLog = LoggerFactory.getLogger(InternalHttpAsyncClient.class);
|
||||||
private final Logger wireLog = LogManager.getLogger("org.apache.hc.client5.http.wire");
|
private final Logger wireLog = LoggerFactory.getLogger("org.apache.hc.client5.http.wire");
|
||||||
private final Logger headerLog = LogManager.getLogger("org.apache.hc.client5.http.headers");
|
private final Logger headerLog = LoggerFactory.getLogger("org.apache.hc.client5.http.headers");
|
||||||
private final Logger frameLog = LogManager.getLogger("org.apache.hc.client5.http2.frame");
|
private final Logger frameLog = LoggerFactory.getLogger("org.apache.hc.client5.http2.frame");
|
||||||
private final Logger framePayloadLog = LogManager.getLogger("org.apache.hc.client5.http2.frame.payload");
|
private final Logger framePayloadLog = LoggerFactory.getLogger("org.apache.hc.client5.http2.frame.payload");
|
||||||
private final Logger flowCtrlLog = LogManager.getLogger("org.apache.hc.client5.http2.flow");
|
private final Logger flowCtrlLog = LoggerFactory.getLogger("org.apache.hc.client5.http2.flow");
|
||||||
|
|
||||||
private final HttpProcessor httpProcessor;
|
private final HttpProcessor httpProcessor;
|
||||||
private final HandlerFactory<AsyncPushConsumer> exchangeHandlerFactory;
|
private final HandlerFactory<AsyncPushConsumer> exchangeHandlerFactory;
|
||||||
|
@ -111,7 +111,7 @@ class HttpAsyncClientEventHandlerFactory implements IOEventHandlerFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IOEventHandler createHandler(final TlsCapableIOSession ioSession, final Object attachment) {
|
public IOEventHandler createHandler(final TlsCapableIOSession ioSession, final Object attachment) {
|
||||||
final Logger sessionLog = LogManager.getLogger(ioSession.getClass());
|
final Logger sessionLog = LoggerFactory.getLogger(ioSession.getClass());
|
||||||
if (sessionLog.isDebugEnabled()
|
if (sessionLog.isDebugEnabled()
|
||||||
|| streamLog.isDebugEnabled()
|
|| streamLog.isDebugEnabled()
|
||||||
|| wireLog.isDebugEnabled()
|
|| wireLog.isDebugEnabled()
|
||||||
|
|
|
@ -55,12 +55,12 @@ import org.apache.hc.core5.http.nio.CapacityChannel;
|
||||||
import org.apache.hc.core5.http.nio.DataStreamChannel;
|
import org.apache.hc.core5.http.nio.DataStreamChannel;
|
||||||
import org.apache.hc.core5.http.nio.RequestChannel;
|
import org.apache.hc.core5.http.nio.RequestChannel;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
class HttpAsyncMainClientExec implements AsyncExecChainHandler {
|
class HttpAsyncMainClientExec implements AsyncExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final ConnectionKeepAliveStrategy keepAliveStrategy;
|
private final ConnectionKeepAliveStrategy keepAliveStrategy;
|
||||||
private final UserTokenHandler userTokenHandler;
|
private final UserTokenHandler userTokenHandler;
|
||||||
|
|
|
@ -45,7 +45,7 @@ import org.apache.hc.core5.http2.nio.pool.H2ConnPool;
|
||||||
import org.apache.hc.core5.io.ShutdownType;
|
import org.apache.hc.core5.io.ShutdownType;
|
||||||
import org.apache.hc.core5.reactor.IOSession;
|
import org.apache.hc.core5.reactor.IOSession;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
|
class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ import org.apache.hc.core5.http.nio.AsyncClientExchangeHandler;
|
||||||
import org.apache.hc.core5.http2.HttpVersionPolicy;
|
import org.apache.hc.core5.http2.HttpVersionPolicy;
|
||||||
import org.apache.hc.core5.reactor.ConnectionInitiator;
|
import org.apache.hc.core5.reactor.ConnectionInitiator;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
class InternalHttpAsyncExecRuntime implements AsyncExecRuntime {
|
class InternalHttpAsyncExecRuntime implements AsyncExecRuntime {
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ package org.apache.hc.client5.http.impl.async;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
public final class LogAppendable implements Appendable {
|
public final class LogAppendable implements Appendable {
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ import org.apache.hc.core5.http.nio.CapacityChannel;
|
||||||
import org.apache.hc.core5.http.nio.DataStreamChannel;
|
import org.apache.hc.core5.http.nio.DataStreamChannel;
|
||||||
import org.apache.hc.core5.http.nio.RequestChannel;
|
import org.apache.hc.core5.http.nio.RequestChannel;
|
||||||
import org.apache.hc.core5.util.Identifiable;
|
import org.apache.hc.core5.util.Identifiable;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
final class LoggingAsyncClientExchangeHandler implements AsyncClientExchangeHandler, Identifiable {
|
final class LoggingAsyncClientExchangeHandler implements AsyncClientExchangeHandler, Identifiable {
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ import org.apache.hc.core5.reactor.ssl.SSLBufferManagement;
|
||||||
import org.apache.hc.core5.reactor.ssl.SSLSessionInitializer;
|
import org.apache.hc.core5.reactor.ssl.SSLSessionInitializer;
|
||||||
import org.apache.hc.core5.reactor.ssl.SSLSessionVerifier;
|
import org.apache.hc.core5.reactor.ssl.SSLSessionVerifier;
|
||||||
import org.apache.hc.core5.reactor.ssl.TlsDetails;
|
import org.apache.hc.core5.reactor.ssl.TlsDetails;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
class LoggingIOSession implements TlsCapableIOSession {
|
class LoggingIOSession implements TlsCapableIOSession {
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,8 @@ import org.apache.hc.core5.annotation.Contract;
|
||||||
import org.apache.hc.core5.annotation.ThreadingBehavior;
|
import org.apache.hc.core5.annotation.ThreadingBehavior;
|
||||||
import org.apache.hc.core5.http.HttpHost;
|
import org.apache.hc.core5.http.HttpHost;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default implementation of {@link AuthCache}. This implements
|
* Default implementation of {@link AuthCache}. This implements
|
||||||
|
@ -60,7 +60,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
|
@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
|
||||||
public class BasicAuthCache implements AuthCache {
|
public class BasicAuthCache implements AuthCache {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final Map<HttpHost, byte[]> map;
|
private final Map<HttpHost, byte[]> map;
|
||||||
private final SchemePortResolver schemePortResolver;
|
private final SchemePortResolver schemePortResolver;
|
||||||
|
|
|
@ -60,8 +60,8 @@ import org.apache.hc.core5.http.HttpHost;
|
||||||
import org.apache.hc.core5.http.HttpRequest;
|
import org.apache.hc.core5.http.HttpRequest;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -83,7 +83,7 @@ public class CredSspScheme implements AuthScheme
|
||||||
private static final Charset UNICODE_LITTLE_UNMARKED = Charset.forName( "UnicodeLittleUnmarked" );
|
private static final Charset UNICODE_LITTLE_UNMARKED = Charset.forName( "UnicodeLittleUnmarked" );
|
||||||
public static final String SCHEME_NAME = "CredSSP";
|
public static final String SCHEME_NAME = "CredSSP";
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger( CredSspScheme.class );
|
private final Logger log = LoggerFactory.getLogger( CredSspScheme.class );
|
||||||
|
|
||||||
enum State
|
enum State
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,14 +47,14 @@ import org.apache.hc.core5.http.HttpHost;
|
||||||
import org.apache.hc.core5.http.HttpRequest;
|
import org.apache.hc.core5.http.HttpRequest;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
import org.ietf.jgss.GSSContext;
|
import org.ietf.jgss.GSSContext;
|
||||||
import org.ietf.jgss.GSSCredential;
|
import org.ietf.jgss.GSSCredential;
|
||||||
import org.ietf.jgss.GSSException;
|
import org.ietf.jgss.GSSException;
|
||||||
import org.ietf.jgss.GSSManager;
|
import org.ietf.jgss.GSSManager;
|
||||||
import org.ietf.jgss.GSSName;
|
import org.ietf.jgss.GSSName;
|
||||||
import org.ietf.jgss.Oid;
|
import org.ietf.jgss.Oid;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
|
@ -68,7 +68,7 @@ public abstract class GGSSchemeBase implements AuthScheme {
|
||||||
FAILED,
|
FAILED,
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final KerberosConfig config;
|
private final KerberosConfig config;
|
||||||
private final DnsResolver dnsResolver;
|
private final DnsResolver dnsResolver;
|
||||||
|
|
|
@ -58,8 +58,8 @@ import org.apache.hc.core5.http.message.ParserCursor;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.util.Asserts;
|
import org.apache.hc.core5.util.Asserts;
|
||||||
import org.apache.hc.core5.util.CharArrayBuffer;
|
import org.apache.hc.core5.util.CharArrayBuffer;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.3
|
* @since 4.3
|
||||||
|
@ -71,7 +71,7 @@ public class HttpAuthenticator {
|
||||||
|
|
||||||
public HttpAuthenticator(final Logger log) {
|
public HttpAuthenticator(final Logger log) {
|
||||||
super();
|
super();
|
||||||
this.log = log != null ? log : LogManager.getLogger(getClass());
|
this.log = log != null ? log : LoggerFactory.getLogger(getClass());
|
||||||
this.parser = new AuthChallengeParser();
|
this.parser = new AuthChallengeParser();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,8 @@ import org.apache.hc.core5.http.io.HttpClientResponseHandler;
|
||||||
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base implementation of {@link HttpClient} that also implements {@link Closeable}.
|
* Base implementation of {@link HttpClient} that also implements {@link Closeable}.
|
||||||
|
@ -56,7 +56,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.SAFE)
|
@Contract(threading = ThreadingBehavior.SAFE)
|
||||||
public abstract class CloseableHttpClient implements HttpClient, Closeable {
|
public abstract class CloseableHttpClient implements HttpClient, Closeable {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
protected abstract CloseableHttpResponse doExecute(HttpHost target, ClassicHttpRequest request,
|
protected abstract CloseableHttpResponse doExecute(HttpHost target, ClassicHttpRequest request,
|
||||||
HttpContext context) throws IOException;
|
HttpContext context) throws IOException;
|
||||||
|
|
|
@ -60,8 +60,8 @@ import org.apache.hc.core5.http.message.BasicClassicHttpRequest;
|
||||||
import org.apache.hc.core5.http.message.StatusLine;
|
import org.apache.hc.core5.http.message.StatusLine;
|
||||||
import org.apache.hc.core5.http.protocol.HttpProcessor;
|
import org.apache.hc.core5.http.protocol.HttpProcessor;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request executor in the HTTP request execution chain
|
* Request executor in the HTTP request execution chain
|
||||||
|
@ -73,7 +73,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
|
||||||
public final class ConnectExec implements ExecChainHandler {
|
public final class ConnectExec implements ExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final ConnectionReuseStrategy reuseStrategy;
|
private final ConnectionReuseStrategy reuseStrategy;
|
||||||
private final HttpProcessor proxyHttpProcessor;
|
private final HttpProcessor proxyHttpProcessor;
|
||||||
|
|
|
@ -50,7 +50,7 @@ import org.apache.hc.core5.io.ShutdownType;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.hc.core5.util.Timeout;
|
import org.apache.hc.core5.util.Timeout;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
class InternalExecRuntime implements ExecRuntime, Cancellable {
|
class InternalExecRuntime implements ExecRuntime, Cancellable {
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,8 @@ import org.apache.hc.core5.http.protocol.BasicHttpContext;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.net.URIAuthority;
|
import org.apache.hc.core5.net.URIAuthority;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal class.
|
* Internal class.
|
||||||
|
@ -71,7 +71,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
|
@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
|
||||||
class InternalHttpClient extends CloseableHttpClient implements Configurable {
|
class InternalHttpClient extends CloseableHttpClient implements Configurable {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final HttpClientConnectionManager connManager;
|
private final HttpClientConnectionManager connManager;
|
||||||
private final HttpRequestExecutor requestExecutor;
|
private final HttpRequestExecutor requestExecutor;
|
||||||
|
|
|
@ -48,8 +48,8 @@ import org.apache.hc.core5.http.HttpException;
|
||||||
import org.apache.hc.core5.http.message.RequestLine;
|
import org.apache.hc.core5.http.message.RequestLine;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The last request executor in the HTTP request execution chain
|
* The last request executor in the HTTP request execution chain
|
||||||
|
@ -61,7 +61,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
|
||||||
final class MainClientExec implements ExecChainHandler {
|
final class MainClientExec implements ExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final ConnectionReuseStrategy reuseStrategy;
|
private final ConnectionReuseStrategy reuseStrategy;
|
||||||
private final ConnectionKeepAliveStrategy keepAliveStrategy;
|
private final ConnectionKeepAliveStrategy keepAliveStrategy;
|
||||||
|
|
|
@ -64,8 +64,8 @@ import org.apache.hc.core5.http.protocol.RequestUserAgent;
|
||||||
import org.apache.hc.core5.net.URIAuthority;
|
import org.apache.hc.core5.net.URIAuthority;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.hc.core5.util.VersionInfo;
|
import org.apache.hc.core5.util.VersionInfo;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal class.
|
* Internal class.
|
||||||
|
@ -75,7 +75,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.SAFE)
|
@Contract(threading = ThreadingBehavior.SAFE)
|
||||||
public class MinimalHttpClient extends CloseableHttpClient {
|
public class MinimalHttpClient extends CloseableHttpClient {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final HttpClientConnectionManager connManager;
|
private final HttpClientConnectionManager connManager;
|
||||||
private final ConnectionReuseStrategy reuseStrategy;
|
private final ConnectionReuseStrategy reuseStrategy;
|
||||||
|
|
|
@ -63,8 +63,8 @@ import org.apache.hc.core5.http.protocol.HttpCoreContext;
|
||||||
import org.apache.hc.core5.http.protocol.HttpProcessor;
|
import org.apache.hc.core5.http.protocol.HttpProcessor;
|
||||||
import org.apache.hc.core5.net.URIAuthority;
|
import org.apache.hc.core5.net.URIAuthority;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request executor in the request execution chain that is responsible
|
* Request executor in the request execution chain that is responsible
|
||||||
|
@ -80,7 +80,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
||||||
final class ProtocolExec implements ExecChainHandler {
|
final class ProtocolExec implements ExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final HttpProcessor httpProcessor;
|
private final HttpProcessor httpProcessor;
|
||||||
private final AuthenticationStrategy targetAuthStrategy;
|
private final AuthenticationStrategy targetAuthStrategy;
|
||||||
|
|
|
@ -58,8 +58,8 @@ import org.apache.hc.core5.http.ProtocolException;
|
||||||
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.hc.core5.util.LangUtils;
|
import org.apache.hc.core5.util.LangUtils;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request executor in the request execution chain that is responsible
|
* Request executor in the request execution chain that is responsible
|
||||||
|
@ -75,7 +75,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
|
@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
|
||||||
final class RedirectExec implements ExecChainHandler {
|
final class RedirectExec implements ExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final RedirectStrategy redirectStrategy;
|
private final RedirectStrategy redirectStrategy;
|
||||||
private final HttpRoutePlanner routePlanner;
|
private final HttpRoutePlanner routePlanner;
|
||||||
|
|
|
@ -42,8 +42,8 @@ import org.apache.hc.core5.http.HttpEntity;
|
||||||
import org.apache.hc.core5.http.HttpException;
|
import org.apache.hc.core5.http.HttpException;
|
||||||
import org.apache.hc.core5.http.NoHttpResponseException;
|
import org.apache.hc.core5.http.NoHttpResponseException;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request executor in the request execution chain that is responsible
|
* Request executor in the request execution chain that is responsible
|
||||||
|
@ -60,7 +60,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
|
||||||
final class RetryExec implements ExecChainHandler {
|
final class RetryExec implements ExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final HttpRequestRetryHandler retryHandler;
|
private final HttpRequestRetryHandler retryHandler;
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,8 @@ import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||||
import org.apache.hc.core5.http.HttpEntity;
|
import org.apache.hc.core5.http.HttpEntity;
|
||||||
import org.apache.hc.core5.http.HttpException;
|
import org.apache.hc.core5.http.HttpException;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request executor in the request execution chain that is responsible
|
* Request executor in the request execution chain that is responsible
|
||||||
|
@ -59,7 +59,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
|
||||||
final class ServiceUnavailableRetryExec implements ExecChainHandler {
|
final class ServiceUnavailableRetryExec implements ExecChainHandler {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final ServiceUnavailableRetryStrategy retryStrategy;
|
private final ServiceUnavailableRetryStrategy retryStrategy;
|
||||||
|
|
||||||
|
|
|
@ -66,8 +66,8 @@ import org.apache.hc.core5.util.Asserts;
|
||||||
import org.apache.hc.core5.util.LangUtils;
|
import org.apache.hc.core5.util.LangUtils;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.hc.core5.util.Timeout;
|
import org.apache.hc.core5.util.Timeout;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A connection manager for a single connection. This connection manager maintains only one active
|
* A connection manager for a single connection. This connection manager maintains only one active
|
||||||
|
@ -90,7 +90,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.SAFE)
|
@Contract(threading = ThreadingBehavior.SAFE)
|
||||||
public class BasicHttpClientConnectionManager implements HttpClientConnectionManager {
|
public class BasicHttpClientConnectionManager implements HttpClientConnectionManager {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final HttpClientConnectionOperator connectionOperator;
|
private final HttpClientConnectionOperator connectionOperator;
|
||||||
private final HttpConnectionFactory<ManagedHttpClientConnection> connFactory;
|
private final HttpConnectionFactory<ManagedHttpClientConnection> connFactory;
|
||||||
|
|
|
@ -56,8 +56,8 @@ import org.apache.hc.core5.http.config.SocketConfig;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default implementation of {@link HttpClientConnectionOperator} used as default in Http client,
|
* Default implementation of {@link HttpClientConnectionOperator} used as default in Http client,
|
||||||
|
@ -72,7 +72,7 @@ public class DefaultHttpClientConnectionOperator implements HttpClientConnection
|
||||||
|
|
||||||
static final String SOCKET_FACTORY_REGISTRY = "http.socket-factory-registry";
|
static final String SOCKET_FACTORY_REGISTRY = "http.socket-factory-registry";
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final Lookup<ConnectionSocketFactory> socketFactoryRegistry;
|
private final Lookup<ConnectionSocketFactory> socketFactoryRegistry;
|
||||||
private final SchemePortResolver schemePortResolver;
|
private final SchemePortResolver schemePortResolver;
|
||||||
|
|
|
@ -51,8 +51,8 @@ import org.apache.hc.core5.http.message.RequestLine;
|
||||||
import org.apache.hc.core5.http.message.StatusLine;
|
import org.apache.hc.core5.http.message.StatusLine;
|
||||||
import org.apache.hc.core5.io.ShutdownType;
|
import org.apache.hc.core5.io.ShutdownType;
|
||||||
import org.apache.hc.core5.util.Identifiable;
|
import org.apache.hc.core5.util.Identifiable;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default {@link ManagedHttpClientConnection} implementation.
|
* Default {@link ManagedHttpClientConnection} implementation.
|
||||||
|
@ -62,9 +62,9 @@ import org.apache.logging.log4j.Logger;
|
||||||
final class DefaultManagedHttpClientConnection
|
final class DefaultManagedHttpClientConnection
|
||||||
extends DefaultBHttpClientConnection implements ManagedHttpClientConnection, Identifiable {
|
extends DefaultBHttpClientConnection implements ManagedHttpClientConnection, Identifiable {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(DefaultManagedHttpClientConnection.class);
|
private final Logger log = LoggerFactory.getLogger(DefaultManagedHttpClientConnection.class);
|
||||||
private final Logger headerlog = LogManager.getLogger("org.apache.hc.client5.http.headers");
|
private final Logger headerlog = LoggerFactory.getLogger("org.apache.hc.client5.http.headers");
|
||||||
private final Logger wirelog = LogManager.getLogger("org.apache.hc.client5.http.wire");
|
private final Logger wirelog = LoggerFactory.getLogger("org.apache.hc.client5.http.wire");
|
||||||
|
|
||||||
private final String id;
|
private final String id;
|
||||||
private final AtomicBoolean closed;
|
private final AtomicBoolean closed;
|
||||||
|
|
|
@ -36,8 +36,8 @@ import org.apache.hc.core5.http.config.H1Config;
|
||||||
import org.apache.hc.core5.http.impl.io.DefaultHttpResponseParser;
|
import org.apache.hc.core5.http.impl.io.DefaultHttpResponseParser;
|
||||||
import org.apache.hc.core5.http.message.LineParser;
|
import org.apache.hc.core5.http.message.LineParser;
|
||||||
import org.apache.hc.core5.util.CharArrayBuffer;
|
import org.apache.hc.core5.util.CharArrayBuffer;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lenient HTTP response parser implementation that can skip malformed data until
|
* Lenient HTTP response parser implementation that can skip malformed data until
|
||||||
|
@ -47,7 +47,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
*/
|
*/
|
||||||
public class LenientHttpResponseParser extends DefaultHttpResponseParser {
|
public class LenientHttpResponseParser extends DefaultHttpResponseParser {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new instance of DefaultHttpResponseParser.
|
* Creates new instance of DefaultHttpResponseParser.
|
||||||
|
|
|
@ -34,7 +34,7 @@ import java.net.Socket;
|
||||||
|
|
||||||
import org.apache.hc.client5.http.impl.Wire;
|
import org.apache.hc.client5.http.impl.Wire;
|
||||||
import org.apache.hc.core5.http.impl.io.SocketHolder;
|
import org.apache.hc.core5.http.impl.io.SocketHolder;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
class LoggingSocketHolder extends SocketHolder {
|
class LoggingSocketHolder extends SocketHolder {
|
||||||
|
|
||||||
|
|
|
@ -74,8 +74,8 @@ import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.hc.core5.util.Asserts;
|
import org.apache.hc.core5.util.Asserts;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.hc.core5.util.Timeout;
|
import org.apache.hc.core5.util.Timeout;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@code ClientConnectionPoolManager} maintains a pool of
|
* {@code ClientConnectionPoolManager} maintains a pool of
|
||||||
|
@ -105,7 +105,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
public class PoolingHttpClientConnectionManager
|
public class PoolingHttpClientConnectionManager
|
||||||
implements HttpClientConnectionManager, ConnPoolControl<HttpRoute> {
|
implements HttpClientConnectionManager, ConnPoolControl<HttpRoute> {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 25;
|
public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 25;
|
||||||
public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE = 5;
|
public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE = 5;
|
||||||
|
|
|
@ -52,8 +52,8 @@ import org.apache.hc.core5.reactor.ssl.SSLSessionVerifier;
|
||||||
import org.apache.hc.core5.reactor.ssl.TlsDetails;
|
import org.apache.hc.core5.reactor.ssl.TlsDetails;
|
||||||
import org.apache.hc.core5.reactor.ssl.TransportSecurityLayer;
|
import org.apache.hc.core5.reactor.ssl.TransportSecurityLayer;
|
||||||
import org.apache.hc.core5.util.Identifiable;
|
import org.apache.hc.core5.util.Identifiable;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default {@link ManagedAsyncClientConnection} implementation.
|
* Default {@link ManagedAsyncClientConnection} implementation.
|
||||||
|
@ -63,7 +63,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Internal
|
@Internal
|
||||||
final class DefaultManagedAsyncClientConnection implements ManagedAsyncClientConnection, Identifiable {
|
final class DefaultManagedAsyncClientConnection implements ManagedAsyncClientConnection, Identifiable {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final IOSession ioSession;
|
private final IOSession ioSession;
|
||||||
private final int socketTimeout;
|
private final int socketTimeout;
|
||||||
|
|
|
@ -77,8 +77,8 @@ import org.apache.hc.core5.util.Asserts;
|
||||||
import org.apache.hc.core5.util.Identifiable;
|
import org.apache.hc.core5.util.Identifiable;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.hc.core5.util.Timeout;
|
import org.apache.hc.core5.util.Timeout;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@code PoolingAsyncClientConnectionManager} maintains a pool of non-blocking
|
* {@code PoolingAsyncClientConnectionManager} maintains a pool of non-blocking
|
||||||
|
@ -101,7 +101,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
|
@Contract(threading = ThreadingBehavior.SAFE_CONDITIONAL)
|
||||||
public class PoolingAsyncClientConnectionManager implements AsyncClientConnectionManager, ConnPoolControl<HttpRoute> {
|
public class PoolingAsyncClientConnectionManager implements AsyncClientConnectionManager, ConnPoolControl<HttpRoute> {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 25;
|
public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 25;
|
||||||
public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE = 5;
|
public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE = 5;
|
||||||
|
|
|
@ -52,8 +52,8 @@ import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.net.URIAuthority;
|
import org.apache.hc.core5.net.URIAuthority;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.hc.core5.util.TextUtils;
|
import org.apache.hc.core5.util.TextUtils;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request interceptor that matches cookies available in the current
|
* Request interceptor that matches cookies available in the current
|
||||||
|
@ -65,7 +65,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
||||||
public class RequestAddCookies implements HttpRequestInterceptor {
|
public class RequestAddCookies implements HttpRequestInterceptor {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
public RequestAddCookies() {
|
public RequestAddCookies() {
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -44,8 +44,8 @@ import org.apache.hc.core5.http.HttpRequestInterceptor;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.net.URIAuthority;
|
import org.apache.hc.core5.net.URIAuthority;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request interceptor that can preemptively authenticate against known hosts,
|
* Request interceptor that can preemptively authenticate against known hosts,
|
||||||
|
@ -57,7 +57,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
||||||
public class RequestAuthCache implements HttpRequestInterceptor {
|
public class RequestAuthCache implements HttpRequestInterceptor {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
public RequestAuthCache() {
|
public RequestAuthCache() {
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -40,8 +40,8 @@ import org.apache.hc.core5.http.HttpRequest;
|
||||||
import org.apache.hc.core5.http.HttpRequestInterceptor;
|
import org.apache.hc.core5.http.HttpRequestInterceptor;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This protocol interceptor is responsible for adding {@code Connection}
|
* This protocol interceptor is responsible for adding {@code Connection}
|
||||||
|
@ -53,7 +53,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
||||||
public class RequestClientConnControl implements HttpRequestInterceptor {
|
public class RequestClientConnControl implements HttpRequestInterceptor {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private static final String PROXY_CONN_DIRECTIVE = "Proxy-Connection";
|
private static final String PROXY_CONN_DIRECTIVE = "Proxy-Connection";
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,8 @@ import org.apache.hc.core5.http.HttpResponse;
|
||||||
import org.apache.hc.core5.http.HttpResponseInterceptor;
|
import org.apache.hc.core5.http.HttpResponseInterceptor;
|
||||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response interceptor that populates the current {@link CookieStore} with data
|
* Response interceptor that populates the current {@link CookieStore} with data
|
||||||
|
@ -57,7 +57,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
||||||
public class ResponseProcessCookies implements HttpResponseInterceptor {
|
public class ResponseProcessCookies implements HttpResponseInterceptor {
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
public ResponseProcessCookies() {
|
public ResponseProcessCookies() {
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -39,8 +39,8 @@ import java.util.List;
|
||||||
import org.apache.hc.core5.annotation.Contract;
|
import org.apache.hc.core5.annotation.Contract;
|
||||||
import org.apache.hc.core5.annotation.ThreadingBehavior;
|
import org.apache.hc.core5.annotation.ThreadingBehavior;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link PublicSuffixMatcher} loader.
|
* {@link PublicSuffixMatcher} loader.
|
||||||
|
@ -83,7 +83,7 @@ public final class PublicSuffixMatcherLoader {
|
||||||
DEFAULT_INSTANCE = load(url);
|
DEFAULT_INSTANCE = load(url);
|
||||||
} catch (final IOException ex) {
|
} catch (final IOException ex) {
|
||||||
// Should never happen
|
// Should never happen
|
||||||
final Logger log = LogManager.getLogger(PublicSuffixMatcherLoader.class);
|
final Logger log = LoggerFactory.getLogger(PublicSuffixMatcherLoader.class);
|
||||||
if (log.isWarnEnabled()) {
|
if (log.isWarnEnabled()) {
|
||||||
log.warn("Failure loading public suffix list from default resource", ex);
|
log.warn("Failure loading public suffix list from default resource", ex);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,8 +55,8 @@ import org.apache.hc.client5.http.psl.PublicSuffixMatcher;
|
||||||
import org.apache.hc.core5.annotation.Contract;
|
import org.apache.hc.core5.annotation.Contract;
|
||||||
import org.apache.hc.core5.annotation.ThreadingBehavior;
|
import org.apache.hc.core5.annotation.ThreadingBehavior;
|
||||||
import org.apache.hc.core5.net.InetAddressUtils;
|
import org.apache.hc.core5.net.InetAddressUtils;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default {@link javax.net.ssl.HostnameVerifier} implementation.
|
* Default {@link javax.net.ssl.HostnameVerifier} implementation.
|
||||||
|
@ -78,7 +78,7 @@ public final class DefaultHostnameVerifier implements HttpClientHostnameVerifier
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final PublicSuffixMatcher publicSuffixMatcher;
|
private final PublicSuffixMatcher publicSuffixMatcher;
|
||||||
|
|
||||||
|
|
|
@ -58,8 +58,8 @@ import org.apache.hc.core5.reactor.ssl.TransportSecurityLayer;
|
||||||
import org.apache.hc.core5.ssl.SSLContexts;
|
import org.apache.hc.core5.ssl.SSLContexts;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.hc.core5.util.TextUtils;
|
import org.apache.hc.core5.util.TextUtils;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default SSL upgrade strategy for non-blocking connections.
|
* Default SSL upgrade strategy for non-blocking connections.
|
||||||
|
@ -102,7 +102,7 @@ public class H2TlsStrategy implements TlsStrategy {
|
||||||
getDefaultHostnameVerifier());
|
getDefaultHostnameVerifier());
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final SSLContext sslContext;
|
private final SSLContext sslContext;
|
||||||
private final String[] supportedProtocols;
|
private final String[] supportedProtocols;
|
||||||
|
|
|
@ -58,8 +58,8 @@ import org.apache.hc.core5.ssl.SSLInitializationException;
|
||||||
import org.apache.hc.core5.util.Args;
|
import org.apache.hc.core5.util.Args;
|
||||||
import org.apache.hc.core5.util.TextUtils;
|
import org.apache.hc.core5.util.TextUtils;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.slf4j.Logger;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Layered socket factory for TLS/SSL connections.
|
* Layered socket factory for TLS/SSL connections.
|
||||||
|
@ -142,7 +142,7 @@ public class SSLConnectionSocketFactory implements LayeredConnectionSocketFactor
|
||||||
public static final String TLS = "TLS";
|
public static final String TLS = "TLS";
|
||||||
public static final String SSL = "SSL";
|
public static final String SSL = "SSL";
|
||||||
|
|
||||||
private final Logger log = LogManager.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.4
|
* @since 4.4
|
||||||
|
|
|
@ -44,13 +44,13 @@ import org.apache.hc.core5.http.impl.io.HttpRequestExecutor;
|
||||||
import org.apache.hc.core5.io.ShutdownType;
|
import org.apache.hc.core5.io.ShutdownType;
|
||||||
import org.apache.hc.core5.util.TimeValue;
|
import org.apache.hc.core5.util.TimeValue;
|
||||||
import org.apache.hc.core5.util.Timeout;
|
import org.apache.hc.core5.util.Timeout;
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
import org.mockito.Mockito;
|
import org.mockito.Mockito;
|
||||||
import org.mockito.MockitoAnnotations;
|
import org.mockito.MockitoAnnotations;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
@SuppressWarnings({"static-access"}) // test code
|
@SuppressWarnings({"static-access"}) // test code
|
||||||
public class TestInternalExecRuntime {
|
public class TestInternalExecRuntime {
|
||||||
|
|
20
pom.xml
20
pom.xml
|
@ -73,7 +73,7 @@
|
||||||
<commons-codec.version>1.10</commons-codec.version>
|
<commons-codec.version>1.10</commons-codec.version>
|
||||||
<ehcache.version>3.4.0</ehcache.version>
|
<ehcache.version>3.4.0</ehcache.version>
|
||||||
<memcached.version>2.12.3</memcached.version>
|
<memcached.version>2.12.3</memcached.version>
|
||||||
<slf4j.version>1.7.13</slf4j.version>
|
<slf4j.version>1.7.25</slf4j.version>
|
||||||
<junit.version>4.12</junit.version>
|
<junit.version>4.12</junit.version>
|
||||||
<easymock.version>2.5.2</easymock.version>
|
<easymock.version>2.5.2</easymock.version>
|
||||||
<mockito.version>2.7.22</mockito.version>
|
<mockito.version>2.7.22</mockito.version>
|
||||||
|
@ -98,22 +98,26 @@
|
||||||
<artifactId>httpcore5-testing</artifactId>
|
<artifactId>httpcore5-testing</artifactId>
|
||||||
<version>${httpcore.version}</version>
|
<version>${httpcore.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<version>${slf4j.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-api</artifactId>
|
<artifactId>log4j-api</artifactId>
|
||||||
<version>${log4j.version}</version>
|
<version>${log4j.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- TODO remove after upgrade to HttpCore 5.0b2 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-slf4j-impl</artifactId>
|
||||||
|
<version>${log4j.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-core</artifactId>
|
<artifactId>log4j-core</artifactId>
|
||||||
<version>${log4j.version}</version>
|
<version>${log4j.version}</version>
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
|
||||||
<artifactId>log4j-slf4j-impl</artifactId>
|
|
||||||
<version>${log4j.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-codec</groupId>
|
<groupId>commons-codec</groupId>
|
||||||
|
|
Loading…
Reference in New Issue