Package | Description |
---|---|
okhttp3 |
An HTTP+HTTP/2 client for Android and Java applications.
|
okhttp3.internal | |
okhttp3.internal.connection | |
okhttp3.internal.http |
Modifier and Type | Field and Description |
---|---|
private java.util.Deque<RealConnection> |
ConnectionPool.connections |
Modifier and Type | Method and Description |
---|---|
(package private) RealConnection |
ConnectionPool.get(Address address,
StreamAllocation streamAllocation,
Route route)
Returns a recycled connection to
address , or null if no such connection exists. |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
ConnectionPool.connectionBecameIdle(RealConnection connection)
Notify this pool that
connection has become idle. |
private int |
ConnectionPool.pruneAndGetAllocationCount(RealConnection connection,
long now)
Prunes any leaked allocations and then returns the number of remaining live allocations on
connection . |
(package private) void |
ConnectionPool.put(RealConnection connection) |
Modifier and Type | Method and Description |
---|---|
abstract RealConnection |
Internal.get(ConnectionPool pool,
Address address,
StreamAllocation streamAllocation,
Route route) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
Internal.connectionBecameIdle(ConnectionPool pool,
RealConnection connection) |
abstract void |
Internal.put(ConnectionPool pool,
RealConnection connection) |
Modifier and Type | Field and Description |
---|---|
private RealConnection |
StreamAllocation.connection |
Modifier and Type | Method and Description |
---|---|
RealConnection |
StreamAllocation.connection() |
private RealConnection |
StreamAllocation.findConnection(int connectTimeout,
int readTimeout,
int writeTimeout,
int pingIntervalMillis,
boolean connectionRetryEnabled)
Returns a connection to host a new stream.
|
private RealConnection |
StreamAllocation.findHealthyConnection(int connectTimeout,
int readTimeout,
int writeTimeout,
int pingIntervalMillis,
boolean connectionRetryEnabled,
boolean doExtensiveHealthChecks)
Finds a connection and returns it if it is healthy.
|
static RealConnection |
RealConnection.testConnection(ConnectionPool connectionPool,
Route route,
java.net.Socket socket,
long idleAtNanos) |
Modifier and Type | Method and Description |
---|---|
void |
StreamAllocation.acquire(RealConnection connection,
boolean reportedAcquired)
Use this allocation to hold
connection . |
private void |
StreamAllocation.release(RealConnection connection)
Remove this allocation from the connection's list of allocations.
|
java.net.Socket |
StreamAllocation.releaseAndAcquire(RealConnection newConnection)
Release the connection held by this connection and acquire
newConnection instead. |
Modifier and Type | Field and Description |
---|---|
private RealConnection |
RealInterceptorChain.connection |
Modifier and Type | Method and Description |
---|---|
Response |
RealInterceptorChain.proceed(Request request,
StreamAllocation streamAllocation,
HttpCodec httpCodec,
RealConnection connection) |
Constructor and Description |
---|
RealInterceptorChain(java.util.List<Interceptor> interceptors,
StreamAllocation streamAllocation,
HttpCodec httpCodec,
RealConnection connection,
int index,
Request request,
Call call,
EventListener eventListener,
int connectTimeout,
int readTimeout,
int writeTimeout) |