Package | Description |
---|---|
okhttp3 |
An HTTP+HTTP/2 client for Android and Java applications.
|
okhttp3.internal | |
okhttp3.internal.connection | |
okhttp3.internal.http | |
okhttp3.internal.huc | |
okhttp3.internal.ws |
Modifier and Type | Class and Description |
---|---|
(package private) class |
RealCall |
Modifier and Type | Method and Description |
---|---|
Call |
Interceptor.Chain.call() |
Call |
Call.clone()
Create a new, identical call to this one which can be enqueued or executed even if this call
has already been.
|
Call |
Call.Factory.newCall(Request request) |
Call |
OkHttpClient.newCall(Request request)
Prepares the
request to be executed at some point in the future. |
Modifier and Type | Method and Description |
---|---|
java.util.List<Call> |
Dispatcher.queuedCalls()
Returns a snapshot of the calls currently awaiting execution.
|
java.util.List<Call> |
Dispatcher.runningCalls()
Returns a snapshot of the calls currently being executed.
|
Modifier and Type | Method and Description |
---|---|
void |
EventListener.callEnd(Call call)
Invoked immediately after a call has completely ended.
|
void |
EventListener.callFailed(Call call,
java.io.IOException ioe)
Invoked when a call fails permanently.
|
void |
EventListener.callStart(Call call)
Invoked as soon as a call is enqueued or executed by a client.
|
void |
EventListener.connectEnd(Call call,
java.net.InetSocketAddress inetSocketAddress,
java.net.Proxy proxy,
Protocol protocol)
Invoked immediately after a socket connection was attempted.
|
void |
EventListener.connectFailed(Call call,
java.net.InetSocketAddress inetSocketAddress,
java.net.Proxy proxy,
Protocol protocol,
java.io.IOException ioe)
Invoked when a connection attempt fails.
|
void |
EventListener.connectionAcquired(Call call,
Connection connection)
Invoked after a connection has been acquired for the
call . |
void |
EventListener.connectionReleased(Call call,
Connection connection)
Invoked after a connection has been released for the
call . |
void |
EventListener.connectStart(Call call,
java.net.InetSocketAddress inetSocketAddress,
java.net.Proxy proxy)
Invoked just prior to initiating a socket connection.
|
EventListener |
EventListener.Factory.create(Call call)
Creates an instance of the
EventListener for a particular Call . |
void |
EventListener.dnsEnd(Call call,
java.lang.String domainName,
java.util.List<java.net.InetAddress> inetAddressList)
Invoked immediately after a DNS lookup.
|
void |
EventListener.dnsStart(Call call,
java.lang.String domainName)
Invoked just prior to a DNS lookup.
|
void |
Callback.onFailure(Call call,
java.io.IOException e)
Called when the request could not be executed due to cancellation, a connectivity problem or
timeout.
|
void |
Callback.onResponse(Call call,
Response response)
Called when the HTTP response was successfully returned by the remote server.
|
void |
EventListener.requestBodyEnd(Call call,
long byteCount)
Invoked immediately after sending a request body.
|
void |
EventListener.requestBodyStart(Call call)
Invoked just prior to sending a request body.
|
void |
EventListener.requestHeadersEnd(Call call,
Request request)
Invoked immediately after sending request headers.
|
void |
EventListener.requestHeadersStart(Call call)
Invoked just prior to sending request headers.
|
void |
EventListener.responseBodyEnd(Call call,
long byteCount)
Invoked immediately after receiving a response body and completing reading it.
|
void |
EventListener.responseBodyStart(Call call)
Invoked just prior to receiving the response body.
|
void |
EventListener.responseHeadersEnd(Call call,
Response response)
Invoked immediately after receiving response headers.
|
void |
EventListener.responseHeadersStart(Call call)
Invoked just prior to receiving response headers.
|
void |
EventListener.secureConnectEnd(Call call,
Handshake handshake)
Invoked immediately after a TLS connection was attempted.
|
void |
EventListener.secureConnectStart(Call call)
Invoked just prior to initiating a TLS connection.
|
Modifier and Type | Method and Description |
---|---|
abstract Call |
Internal.newWebSocketCall(OkHttpClient client,
Request request) |
Modifier and Type | Method and Description |
---|---|
abstract StreamAllocation |
Internal.streamAllocation(Call call) |
Modifier and Type | Field and Description |
---|---|
private Call |
RouteSelector.call |
Call |
StreamAllocation.call |
Modifier and Type | Method and Description |
---|---|
void |
RealConnection.connect(int connectTimeout,
int readTimeout,
int writeTimeout,
int pingIntervalMillis,
boolean connectionRetryEnabled,
Call call,
EventListener eventListener) |
private void |
RealConnection.connectSocket(int connectTimeout,
int readTimeout,
Call call,
EventListener eventListener)
Does all the work necessary to build a full HTTP or HTTPS connection on a raw socket.
|
private void |
RealConnection.connectTunnel(int connectTimeout,
int readTimeout,
int writeTimeout,
Call call,
EventListener eventListener)
Does all the work to build an HTTPS connection over a proxy tunnel.
|
private void |
RealConnection.establishProtocol(ConnectionSpecSelector connectionSpecSelector,
int pingIntervalMillis,
Call call,
EventListener eventListener) |
Constructor and Description |
---|
RouteSelector(Address address,
RouteDatabase routeDatabase,
Call call,
EventListener eventListener) |
StreamAllocation(ConnectionPool connectionPool,
Address address,
Call call,
EventListener eventListener,
java.lang.Object callStackTrace) |
Modifier and Type | Field and Description |
---|---|
private Call |
RealInterceptorChain.call |
Modifier and Type | Method and Description |
---|---|
Call |
RealInterceptorChain.call() |
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) |
Modifier and Type | Field and Description |
---|---|
(package private) Call |
OkHttpURLConnection.call |
Modifier and Type | Method and Description |
---|---|
private Call |
OkHttpURLConnection.buildCall() |
Modifier and Type | Method and Description |
---|---|
void |
OkHttpURLConnection.onFailure(Call call,
java.io.IOException e) |
void |
OkHttpURLConnection.onResponse(Call call,
Response response) |
Modifier and Type | Field and Description |
---|---|
private Call |
RealWebSocket.call
Non-null for client web sockets.
|