public class HttpClientConnectionManager extends CrtResource
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_BUFFER_SIZE |
static int |
DEFAULT_MAX_CONNECTIONS |
static int |
DEFAULT_MAX_WINDOW_SIZE |
Constructor and Description |
---|
HttpClientConnectionManager(ClientBootstrap clientBootstrap,
SocketOptions socketOptions,
TlsContext tlsContext,
URI uri) |
HttpClientConnectionManager(ClientBootstrap clientBootstrap,
SocketOptions socketOptions,
TlsContext tlsContext,
URI uri,
int bufferSize,
int windowSize,
int maxConnections) |
Modifier and Type | Method and Description |
---|---|
protected CompletableFuture<CrtByteBuffer> |
acquireBuffer() |
CompletableFuture<HttpClientConnection> |
acquireConnection()
Request a HttpClientConnection from the Connection Pool.
|
protected boolean |
canReleaseReferencesImmediately()
Determines whether a resource releases its dependencies at the same time the native handle is released or if it waits.
|
int |
getMaxConnections()
Getter methods
|
CompletableFuture<Void> |
getShutdownCompleteFuture() |
URI |
getUri() |
int |
getWindowSize() |
void |
releaseConnection(HttpClientConnection conn)
Releases this HttpClientConnection back into the Connection Pool, and allows another Request to acquire this connection.
|
protected void |
releaseConnectionPointer(long connection_ptr) |
protected void |
releaseNativeHandle()
Closes this Connection Pool and any pending Connection Acquisitions
|
acquireNativeHandle, addReferenceTo, close, collectNativeResources, getNativeHandle, isNativeResource, isNull, logNativeResources, releaseReferences, waitForNoResources
public static final int DEFAULT_MAX_BUFFER_SIZE
public static final int DEFAULT_MAX_WINDOW_SIZE
public static final int DEFAULT_MAX_CONNECTIONS
public HttpClientConnectionManager(ClientBootstrap clientBootstrap, SocketOptions socketOptions, TlsContext tlsContext, URI uri)
public HttpClientConnectionManager(ClientBootstrap clientBootstrap, SocketOptions socketOptions, TlsContext tlsContext, URI uri, int bufferSize, int windowSize, int maxConnections)
protected CompletableFuture<CrtByteBuffer> acquireBuffer()
public CompletableFuture<HttpClientConnection> acquireConnection()
public void releaseConnection(HttpClientConnection conn)
conn
- protected void releaseConnectionPointer(long connection_ptr)
protected boolean canReleaseReferencesImmediately()
canReleaseReferencesImmediately
in class CrtResource
protected void releaseNativeHandle()
releaseNativeHandle
in class CrtResource
public CompletableFuture<Void> getShutdownCompleteFuture()
public int getMaxConnections()
public int getWindowSize()
public URI getUri()
Copyright © 2019. All rights reserved.