public abstract class

AbstractPooledConnAdapter

extends AbstractClientConnAdapter
java.lang.Object
   ↳ org.apache.http.impl.conn.AbstractClientConnAdapter
     ↳ org.apache.http.impl.conn.AbstractPooledConnAdapter
Known Direct Subclasses

Class Overview

Abstract adapter from pool entries to managed client connections. The connection in the pool entry is used to initialize the base class. In addition, methods to establish a route are delegated to the pool entry. shutdown and close will clear the tracked route in the pool entry and call the respective method of the wrapped connection.

Summary

[Expand]
Inherited Constants
From interface org.apache.http.protocol.HttpContext
Fields
protected AbstractPoolEntry poolEntry The wrapped pool entry.
Protected Constructors
AbstractPooledConnAdapter(ClientConnectionManager manager, AbstractPoolEntry entry)
Creates a new connection adapter.
Public Methods
void close()
HttpRoute getRoute()
Object getState()
void layerProtocol(HttpContext context, HttpParams params)
void open(HttpRoute route, HttpContext context, HttpParams params)
void setState(Object state)
void shutdown()
void tunnelProxy(HttpHost next, boolean secure, HttpParams params)
void tunnelTarget(boolean secure, HttpParams params)
Protected Methods
final void assertAttached()
This method is deprecated. use assertValid(AbstractPoolEntry)
void assertValid(AbstractPoolEntry entry)
Asserts that there is a valid pool entry.
synchronized void detach()
Detaches this adapter from the wrapped connection.
AbstractPoolEntry getPoolEntry()
Obtains the pool entry.
[Expand]
Inherited Methods
From class org.apache.http.impl.conn.AbstractClientConnAdapter
From class java.lang.Object
From interface org.apache.http.HttpClientConnection
From interface org.apache.http.HttpConnection
From interface org.apache.http.HttpInetConnection
From interface org.apache.http.conn.ConnectionReleaseTrigger
From interface org.apache.http.conn.HttpRoutedConnection
From interface org.apache.http.conn.ManagedClientConnection
From interface org.apache.http.protocol.HttpContext

Fields

protected AbstractPoolEntry poolEntry

Also: HttpClient

The wrapped pool entry.

Protected Constructors

protected AbstractPooledConnAdapter (ClientConnectionManager manager, AbstractPoolEntry entry)

Also: HttpClient

Creates a new connection adapter.

Parameters
manager the connection manager
entry the pool entry for the connection being wrapped

Public Methods

public void close ()

Also: HttpClient

Throws
IOException

public HttpRoute getRoute ()

Also: HttpClient

public Object getState ()

Also: HttpClient

public void layerProtocol (HttpContext context, HttpParams params)

Also: HttpClient

Throws
IOException

public void open (HttpRoute route, HttpContext context, HttpParams params)

Also: HttpClient

Throws
IOException

public void setState (Object state)

Also: HttpClient

public void shutdown ()

Also: HttpClient

Throws
IOException

public void tunnelProxy (HttpHost next, boolean secure, HttpParams params)

Also: HttpClient

Throws
IOException

public void tunnelTarget (boolean secure, HttpParams params)

Also: HttpClient

Throws
IOException

Protected Methods

protected final void assertAttached ()

Also: HttpClient

This method is deprecated.
use assertValid(AbstractPoolEntry)

protected void assertValid (AbstractPoolEntry entry)

Also: HttpClient

Asserts that there is a valid pool entry.

Throws
ConnectionShutdownException if there is no pool entry or connection has been aborted

protected synchronized void detach ()

Also: HttpClient

Detaches this adapter from the wrapped connection. This adapter becomes useless.

protected AbstractPoolEntry getPoolEntry ()

Also: HttpClient

Obtains the pool entry.

Returns
  • the pool entry, or null if detached