A pool entry for use by connection manager implementations. More...
Pool entries work in conjunction with an adapter . The adapter is handed out to applications that obtain a connection. The pool entry stores the underlying connection and tracks the route established. The adapter delegates methods for establishing the route to it's pool entry.
If the managed connections is released or revoked, the adapter gets disconnected, but the pool entry still contains the underlying connection and the established route.
The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Public Member Functions | |
Object | getState () |
Returns the state object associated with this pool entry. More... | |
void | setState (final Object state) |
Assigns a state object to this pool entry. More... | |
void | open (HttpRoute route, HttpContext context, HttpParams params) throws IOException |
Opens the underlying connection. More... | |
void | tunnelTarget (boolean secure, HttpParams params) throws IOException |
Tracks tunnelling of the connection to the target. More... | |
void | tunnelProxy (HttpHost next, boolean secure, HttpParams params) throws IOException |
Tracks tunnelling of the connection to a chained proxy. More... | |
void | layerProtocol (HttpContext context, HttpParams params) throws IOException |
Layers a protocol on top of an established tunnel. More... | |
Protected Member Functions | |
AbstractPoolEntry (ClientConnectionOperator connOperator, HttpRoute route) | |
Creates a new pool entry. More... | |
void | shutdownEntry () |
Shuts down the entry. More... | |
Protected Attributes | |
final ClientConnectionOperator | connOperator |
The connection operator. More... | |
final OperatedClientConnection | connection |
The underlying connection being pooled or used. More... | |
volatile HttpRoute | route |
The route for which this entry gets allocated. More... | |
volatile Object | state |
Connection state object. | |
volatile RouteTracker | tracker |
The tracked route, or null before tracking starts. More... | |
|
protected |
connOperator | the Connection Operator for this entry |
route | the planned route for the connection, or null |
Object getState | ( | ) |
void setState | ( | final Object | state | ) |
state | The state object |
void open | ( | HttpRoute | route, |
HttpContext | context, | ||
HttpParams | params | ||
) | throws IOException |
route | the route along which to open the connection |
context | the context for opening the connection |
params | the parameters for opening the connection |
IOException | in case of a problem |
void tunnelTarget | ( | boolean | secure, |
HttpParams | params | ||
) | throws IOException |
The tunnel has to be established outside by sending a CONNECT request to the (last) proxy.
secure | true if the tunnel should be considered secure, false otherwise |
params | the parameters for tunnelling the connection |
IOException | in case of a problem |
void tunnelProxy | ( | HttpHost | next, |
boolean | secure, | ||
HttpParams | params | ||
) | throws IOException |
The tunnel has to be established outside by sending a CONNECT request to the previous proxy.
next | the proxy to which the tunnel was established. See ManagedClientConnection.tunnelProxy for details. |
secure | true if the tunnel should be considered secure, false otherwise |
params | the parameters for tunnelling the connection |
IOException | in case of a problem |
void layerProtocol | ( | HttpContext | context, |
HttpParams | params | ||
) | throws IOException |
context | the context for layering |
params | the parameters for layering |
IOException | in case of a problem |
|
protected |
If (HttpRoute, HttpContext, HttpParams) is in progress, this will cause that open to possibly throw an java.io.IOException.
|
protected |
|
protected |
|
protected |
|
protected |