class CPoolProxy extends java.lang.Object implements ManagedHttpClientConnection, org.apache.http.protocol.HttpContext
| Modifier and Type | Field and Description |
|---|---|
private CPoolEntry |
poolEntry |
| Constructor and Description |
|---|
CPoolProxy(CPoolEntry entry) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(java.net.Socket socket)
Binds this connection to the given socket.
|
void |
close() |
(package private) CPoolEntry |
detach() |
static CPoolEntry |
detach(org.apache.http.HttpClientConnection conn) |
void |
flush() |
java.lang.Object |
getAttribute(java.lang.String id) |
(package private) ManagedHttpClientConnection |
getConnection() |
java.lang.String |
getId()
Returns connection ID which is expected to be unique
for the life span of the connection manager.
|
java.net.InetAddress |
getLocalAddress() |
int |
getLocalPort() |
org.apache.http.HttpConnectionMetrics |
getMetrics() |
(package private) CPoolEntry |
getPoolEntry() |
static CPoolEntry |
getPoolEntry(org.apache.http.HttpClientConnection proxy) |
private static CPoolProxy |
getProxy(org.apache.http.HttpClientConnection conn) |
java.net.InetAddress |
getRemoteAddress() |
int |
getRemotePort() |
java.net.Socket |
getSocket()
Returns the underlying socket.
|
int |
getSocketTimeout() |
javax.net.ssl.SSLSession |
getSSLSession()
Obtains the SSL session of the underlying connection, if any.
|
(package private) ManagedHttpClientConnection |
getValidConnection() |
boolean |
isOpen() |
boolean |
isResponseAvailable(int timeout) |
boolean |
isStale() |
static org.apache.http.HttpClientConnection |
newProxy(CPoolEntry poolEntry) |
void |
receiveResponseEntity(org.apache.http.HttpResponse response) |
org.apache.http.HttpResponse |
receiveResponseHeader() |
java.lang.Object |
removeAttribute(java.lang.String id) |
void |
sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest request) |
void |
sendRequestHeader(org.apache.http.HttpRequest request) |
void |
setAttribute(java.lang.String id,
java.lang.Object obj) |
void |
setSocketTimeout(int timeout) |
void |
shutdown() |
java.lang.String |
toString() |
private volatile CPoolEntry poolEntry
CPoolProxy(CPoolEntry entry)
CPoolEntry getPoolEntry()
CPoolEntry detach()
ManagedHttpClientConnection getConnection()
ManagedHttpClientConnection getValidConnection()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface org.apache.http.HttpConnectionjava.io.IOExceptionpublic void shutdown()
throws java.io.IOException
shutdown in interface org.apache.http.HttpConnectionjava.io.IOExceptionpublic boolean isOpen()
isOpen in interface org.apache.http.HttpConnectionpublic boolean isStale()
isStale in interface org.apache.http.HttpConnectionpublic void setSocketTimeout(int timeout)
setSocketTimeout in interface org.apache.http.HttpConnectionpublic int getSocketTimeout()
getSocketTimeout in interface org.apache.http.HttpConnectionpublic java.lang.String getId()
ManagedHttpClientConnectiongetId in interface ManagedHttpClientConnectionpublic void bind(java.net.Socket socket)
throws java.io.IOException
ManagedHttpClientConnectionbind in interface ManagedHttpClientConnectionsocket - the socket to bind the connection to.java.io.IOExceptionpublic java.net.Socket getSocket()
ManagedHttpClientConnectiongetSocket in interface ManagedHttpClientConnectionpublic javax.net.ssl.SSLSession getSSLSession()
ManagedHttpClientConnectionSSLSocket, the SSL session of
that socket is obtained. This is a potentially blocking operation.getSSLSession in interface ManagedHttpClientConnectionnull otherwisepublic boolean isResponseAvailable(int timeout)
throws java.io.IOException
isResponseAvailable in interface org.apache.http.HttpClientConnectionjava.io.IOExceptionpublic void sendRequestHeader(org.apache.http.HttpRequest request)
throws org.apache.http.HttpException,
java.io.IOException
sendRequestHeader in interface org.apache.http.HttpClientConnectionorg.apache.http.HttpExceptionjava.io.IOExceptionpublic void sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest request)
throws org.apache.http.HttpException,
java.io.IOException
sendRequestEntity in interface org.apache.http.HttpClientConnectionorg.apache.http.HttpExceptionjava.io.IOExceptionpublic org.apache.http.HttpResponse receiveResponseHeader()
throws org.apache.http.HttpException,
java.io.IOException
receiveResponseHeader in interface org.apache.http.HttpClientConnectionorg.apache.http.HttpExceptionjava.io.IOExceptionpublic void receiveResponseEntity(org.apache.http.HttpResponse response)
throws org.apache.http.HttpException,
java.io.IOException
receiveResponseEntity in interface org.apache.http.HttpClientConnectionorg.apache.http.HttpExceptionjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface org.apache.http.HttpClientConnectionjava.io.IOExceptionpublic org.apache.http.HttpConnectionMetrics getMetrics()
getMetrics in interface org.apache.http.HttpConnectionpublic java.net.InetAddress getLocalAddress()
getLocalAddress in interface org.apache.http.HttpInetConnectionpublic int getLocalPort()
getLocalPort in interface org.apache.http.HttpInetConnectionpublic java.net.InetAddress getRemoteAddress()
getRemoteAddress in interface org.apache.http.HttpInetConnectionpublic int getRemotePort()
getRemotePort in interface org.apache.http.HttpInetConnectionpublic java.lang.Object getAttribute(java.lang.String id)
getAttribute in interface org.apache.http.protocol.HttpContextpublic void setAttribute(java.lang.String id,
java.lang.Object obj)
setAttribute in interface org.apache.http.protocol.HttpContextpublic java.lang.Object removeAttribute(java.lang.String id)
removeAttribute in interface org.apache.http.protocol.HttpContextpublic java.lang.String toString()
toString in class java.lang.Objectpublic static org.apache.http.HttpClientConnection newProxy(CPoolEntry poolEntry)
private static CPoolProxy getProxy(org.apache.http.HttpClientConnection conn)
public static CPoolEntry getPoolEntry(org.apache.http.HttpClientConnection proxy)
public static CPoolEntry detach(org.apache.http.HttpClientConnection conn)