| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | ConnectionPool.
Entries in connection pool are keyed by destination address and/or proxy address: case 1: plain TCP not via proxy (destination IP only) case 2: plain TCP via proxy (proxy only) case 3: SSL not via proxy (destination IP+hostname only) case 4: SSL over tunnel (destination IP+hostname and proxy) |
| private class | ConnectionPool.
An object that subscribes to the flow while the connection is in the pool. |
| pack-priv static class | |
| private static class | ConnectionPool.
Manages a LinkedList of sorted ExpiryEntry. |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| pack-priv final Logger | |
| private final ConnectionPool. | |
| pack-priv static final long | |
| private final HashMap | |
| private final HashMap | |
| private final ReentrantLock | |
| pack-priv volatile boolean | |
| private final TimeLine |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static ConnectionPool. | |
| pack-priv void | |
| private void | |
| pack-priv boolean | |
| private boolean | |
| pack-priv final String | |
| private HttpConnection | |
| pack-priv HttpConnection | |
| private HttpConnection | |
| pack-priv long | Returns: the delay in milliseconds in which the next connection will expire.Purge expired connection and return the number of milliseconds in which the next connection is scheduled to expire. |
| pack-priv long | |
| private void | |
| private ConnectionPool. | |
| private boolean | |
| private boolean | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void |
| dbgTag | back to summary |
|---|---|
| private final String dbgTag | |
| debug | back to summary |
|---|---|
| pack-priv final Logger debug | |
| expiryList | back to summary |
|---|---|
| private final ConnectionPool. | |
| MAX_POOL_SIZE | back to summary |
|---|---|
| pack-priv static final long MAX_POOL_SIZE | |
| plainPool | back to summary |
|---|---|
| private final HashMap<ConnectionPool. | |
| sslPool | back to summary |
|---|---|
| private final HashMap<ConnectionPool. | |
| stateLock | back to summary |
|---|---|
| private final ReentrantLock stateLock | |
| stopped | back to summary |
|---|---|
| pack-priv volatile boolean stopped | |
| timeSource | back to summary |
|---|---|
| private final TimeLine timeSource | |
| ConnectionPool | back to summary |
|---|---|
| pack-priv ConnectionPool(long clientId) | |
| ConnectionPool | back to summary |
|---|---|
| pack-priv ConnectionPool(long clientId, TimeLine timeSource) | |
| ConnectionPool | back to summary |
|---|---|
| private ConnectionPool(String tag, TimeLine timeSource) There should be one of these per HttpClient. | |
| cacheKey | back to summary |
|---|---|
| pack-priv static ConnectionPool. | |
| cleanup | back to summary |
|---|---|
| pack-priv void cleanup(HttpConnection c, long pendingData, Throwable error) | |
| close | back to summary |
|---|---|
| private void close(HttpConnection c) | |
| contains | back to summary |
|---|---|
| pack-priv boolean contains(HttpConnection c) | |
| contains0 | back to summary |
|---|---|
| private boolean contains0(HttpConnection c) | |
| dbgString | back to summary |
|---|---|
| pack-priv final String dbgString() | |
| findConnection | back to summary |
|---|---|
| private HttpConnection findConnection(ConnectionPool. | |
| getConnection | back to summary |
|---|---|
| pack-priv HttpConnection getConnection(boolean secure, InetSocketAddress addr, InetSocketAddress proxy) | |
| getConnection0 | back to summary |
|---|---|
| private HttpConnection getConnection0(boolean secure, InetSocketAddress addr, InetSocketAddress proxy) | |
| purgeExpiredConnectionsAndReturnNextDeadline | back to summary |
|---|---|
| pack-priv long purgeExpiredConnectionsAndReturnNextDeadline() Purge expired connection and return the number of milliseconds in which the next connection is scheduled to expire. If no connections are scheduled to be purged return 0.
| |
| purgeExpiredConnectionsAndReturnNextDeadline | back to summary |
|---|---|
| pack-priv long purgeExpiredConnectionsAndReturnNextDeadline(Deadline now) | |
| putConnection | back to summary |
|---|---|
| private void putConnection(HttpConnection c, HashMap<ConnectionPool. | |
| registerCleanupTrigger | back to summary |
|---|---|
| private ConnectionPool. | |
| removeFromPool | back to summary |
|---|---|
| private boolean removeFromPool(HttpConnection c, HashMap<ConnectionPool. | |
| removeFromPool | back to summary |
|---|---|
| private boolean removeFromPool(HttpConnection c) | |
| returnToPool | back to summary |
|---|---|
| pack-priv void returnToPool(HttpConnection conn) Returns the connection to the pool. | |
| returnToPool | back to summary |
|---|---|
| pack-priv void returnToPool(HttpConnection conn, Deadline now, long keepAlive) | |
| start | back to summary |
|---|---|
| pack-priv void start() | |
| stop | back to summary |
|---|---|
| pack-priv void stop() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final InetSocketAddress | |
| pack-priv final InetSocketAddress | |
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public int |
| destination | back to summary |
|---|---|
| pack-priv final InetSocketAddress destination | |
| proxy | back to summary |
|---|---|
| pack-priv final InetSocketAddress proxy | |
| secure | back to summary |
|---|---|
| pack-priv final boolean secure | |
| CacheKey | back to summary |
|---|---|
| private CacheKey(boolean secure, InetSocketAddress destination, InetSocketAddress proxy) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpConnection | |
| private volatile boolean | |
| private volatile boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cancel()
Implements java. Causes the Subscriber to (eventually) stop receiving messages. |
| public void | dropSubscription()
Overrides default jdk. Called when the flow is connected again, and the subscription is handed over to a new subscriber. |
| public boolean | |
| public void | onComplete()
Implements java. Method invoked when it is known that no additional Subscriber method invocations will occur for a Subscription that is not already terminated by error, after which no other Subscriber methods are invoked by the Subscription. |
| public void | onError(Throwable error)
Implements java. Method invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription. |
| public void | onNext(List<ByteBuffer> item)
Implements java. Method invoked with a Subscription's next item. |
| public void | onSubscribe(Flow.
Implements java. Method invoked prior to invoking any other Subscriber methods for the given Subscription. |
| public void | request(long n)
Implements java. Adds the given number |
| public void | subscribe(Flow.
Implements java. Adds the given Subscriber if possible. |
| public String | |
| private void |
| connection | back to summary |
|---|---|
| private final HttpConnection connection | |
| done | back to summary |
|---|---|
| private volatile boolean done | |
| dropped | back to summary |
|---|---|
| private volatile boolean dropped | |
| CleanupTrigger | back to summary |
|---|---|
| public CleanupTrigger(HttpConnection connection) | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements java. Doc from java. Causes the Subscriber to (eventually) stop receiving
messages. Implementation is best-effort -- additional
messages may be received after invoking this method.
A cancelled subscription need not ever receive an
| |
| dropSubscription | back to summary |
|---|---|
| public void dropSubscription() Overrides default jdk. Doc from jdk. Called when the flow is connected again, and the subscription
is handed over to a new subscriber.
Once
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() | |
| onComplete | back to summary |
|---|---|
| public void onComplete() Implements java. Doc from java. Method invoked when it is known that no additional Subscriber method invocations will occur for a Subscription that is not already terminated by error, after which no other Subscriber methods are invoked by the Subscription. If this method throws an exception, resulting behavior is undefined.
| |
| onError | back to summary |
|---|---|
| public void onError(Throwable error) Implements java. Doc from java. Method invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription. If this method itself throws an exception, resulting behavior is undefined.
| |
| onNext | back to summary |
|---|---|
| public void onNext(List<ByteBuffer> item) Implements java. Doc from java. Method invoked with a Subscription's next item. If this method throws an exception, resulting behavior is not guaranteed, but may cause the Subscription to be cancelled.
| |
| onSubscribe | back to summary |
|---|---|
| public void onSubscribe(Flow. Implements java. Doc from java. Method invoked prior to invoking any other Subscriber methods for the given Subscription. If this method throws an exception, resulting behavior is not guaranteed, but may cause the Subscription not to be established or to be cancelled. Typically, implementations of this method invoke
| |
| request | back to summary |
|---|---|
| public void request(long n) Implements java. Doc from java. Adds the given number
| |
| subscribe | back to summary |
|---|---|
| public void subscribe(Flow. Implements java. Doc from java. Adds the given Subscriber if possible. If already
subscribed, or the attempt to subscribe fails due to policy
violations or errors, the Subscriber's
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| triggerCleanup | back to summary |
|---|---|
| private void triggerCleanup(long pendingData, Throwable error) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final HttpConnection | |
| pack-priv final Deadline |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| connection | back to summary |
|---|---|
| pack-priv final HttpConnection connection | |
| expiry | back to summary |
|---|---|
| pack-priv final Deadline expiry | |
| ExpiryEntry | back to summary |
|---|---|
| pack-priv ExpiryEntry(HttpConnection connection, Deadline expiry) | |
| Modifier and Type | Field and Description |
|---|---|
| private final LinkedList | |
| private volatile boolean | |
| private final TimeLine |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv Optional | |
| pack-priv boolean | |
| pack-priv List | |
| pack-priv void | |
| pack-priv HttpConnection | |
| pack-priv int | |
| pack-priv Stream |
| list | back to summary |
|---|---|
| private final LinkedList<ConnectionPool. | |
| mayContainEntries | back to summary |
|---|---|
| private volatile boolean mayContainEntries | |
| timeSource | back to summary |
|---|---|
| private final TimeLine timeSource | |
| ExpiryList | back to summary |
|---|---|
| pack-priv ExpiryList(TimeLine timeSource) | |
| add | back to summary |
|---|---|
| pack-priv void add(HttpConnection conn) | |
| add | back to summary |
|---|---|
| pack-priv void add(HttpConnection conn, Deadline now, long keepAlive) | |
| clear | back to summary |
|---|---|
| pack-priv void clear() | |
| nextExpiryDeadline | back to summary |
|---|---|
| pack-priv Optional | |
| purgeMaybeRequired | back to summary |
|---|---|
| pack-priv boolean purgeMaybeRequired() | |
| purgeUntil | back to summary |
|---|---|
| pack-priv List | |
| remove | back to summary |
|---|---|
| pack-priv void remove(HttpConnection c) | |
| removeOldest | back to summary |
|---|---|
| pack-priv HttpConnection removeOldest() | |
| size | back to summary |
|---|---|
| pack-priv int size() | |
| stream | back to summary |
|---|---|
| pack-priv Stream | |