private static final class HttpsEndpoint.EndpointInfo extends Object
Modifier and Type | Field and Description |
---|---|
private HttpsEndpoint.HttpsEndpointImpl |
endpoint
A representative endpoint that equals the endpoint for all the
connections.
|
private List |
idle
The idle connections for the endpoint.
|
private List |
inUse
The connections that are in use for the endpoint.
|
private String |
proxyHost
The proxy host, or empty string if using a direct connection.
|
private int |
proxyPort
The proxy port, ignored if using a direct connection.
|
Constructor and Description |
---|
EndpointInfo(HttpsEndpoint.HttpsEndpointImpl endpoint) |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
checkIdle(long now,
List reap)
For each connection, calls checkIdle on the connection and, if that
returns true, removes the connection and adds it to the reap list.
|
(package private) HttpsEndpoint.HttpsConnection |
connect(CallContext context)
Chooses and returns an idle connection that satisfies the
constraints, removing the connection from the list of idle
connections and adding it to the list of ones in use, else returns
null.
|
(package private) void |
noteClosed(HttpsEndpoint.HttpsConnection connection)
Removes a connection from the set of connections in use.
|
(package private) void |
noteIdle(HttpsEndpoint.HttpsConnection connection)
Removes a connection from the set of connections in use and adds it
to the set of idle connections.
|
(package private) void |
noteInUse(HttpsEndpoint.HttpsConnection connection)
Adds a connection to the set of connections in use.
|
private final HttpsEndpoint.HttpsEndpointImpl endpoint
private String proxyHost
private int proxyPort
private final List idle
private final List inUse
EndpointInfo(HttpsEndpoint.HttpsEndpointImpl endpoint)
HttpsEndpoint.HttpsConnection connect(CallContext context) throws IOException
IOException
void noteInUse(HttpsEndpoint.HttpsConnection connection)
void noteClosed(HttpsEndpoint.HttpsConnection connection)
void noteIdle(HttpsEndpoint.HttpsConnection connection)
boolean checkIdle(long now, List reap)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.