public class ManagedClientConnectionImpl extends Object implements org.apache.http.conn.ManagedClientConnection
ManagedClientConnection
Constructor and Description |
---|
ManagedClientConnectionImpl(org.apache.http.conn.ClientConnectionManager manager,
org.apache.http.conn.ClientConnectionOperator operator,
HttpPoolEntry entry) |
Modifier and Type | Method and Description |
---|---|
void |
abortConnection() |
void |
bind(Socket socket) |
void |
close() |
HttpPoolEntry |
detach() |
void |
flush() |
Object |
getAttribute(String id) |
String |
getId() |
InetAddress |
getLocalAddress() |
int |
getLocalPort() |
org.apache.http.conn.ClientConnectionManager |
getManager() |
org.apache.http.HttpConnectionMetrics |
getMetrics() |
InetAddress |
getRemoteAddress() |
int |
getRemotePort() |
org.apache.http.conn.routing.HttpRoute |
getRoute() |
Socket |
getSocket() |
int |
getSocketTimeout() |
SSLSession |
getSSLSession() |
Object |
getState() |
boolean |
isMarkedReusable() |
boolean |
isOpen() |
boolean |
isResponseAvailable(int timeout) |
boolean |
isSecure() |
boolean |
isStale() |
void |
layerProtocol(org.apache.http.protocol.HttpContext context,
org.apache.http.params.HttpParams params) |
void |
markReusable() |
void |
open(org.apache.http.conn.routing.HttpRoute route,
org.apache.http.protocol.HttpContext context,
org.apache.http.params.HttpParams params) |
void |
receiveResponseEntity(org.apache.http.HttpResponse response) |
org.apache.http.HttpResponse |
receiveResponseHeader() |
void |
releaseConnection() |
Object |
removeAttribute(String id) |
void |
sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest request) |
void |
sendRequestHeader(org.apache.http.HttpRequest request) |
void |
setAttribute(String id,
Object obj) |
void |
setIdleDuration(long duration,
TimeUnit unit) |
void |
setSocketTimeout(int timeout) |
void |
setState(Object state) |
void |
shutdown() |
void |
tunnelProxy(org.apache.http.HttpHost next,
boolean secure,
org.apache.http.params.HttpParams params) |
void |
tunnelTarget(boolean secure,
org.apache.http.params.HttpParams params) |
void |
unmarkReusable() |
public ManagedClientConnectionImpl(org.apache.http.conn.ClientConnectionManager manager, org.apache.http.conn.ClientConnectionOperator operator, HttpPoolEntry entry)
public String getId()
getId
in interface org.apache.http.conn.ManagedHttpClientConnection
public HttpPoolEntry detach()
public org.apache.http.conn.ClientConnectionManager getManager()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.apache.http.HttpConnection
IOException
public void shutdown() throws IOException
shutdown
in interface org.apache.http.HttpConnection
IOException
public boolean isOpen()
isOpen
in interface org.apache.http.HttpConnection
public boolean isStale()
isStale
in interface org.apache.http.HttpConnection
public void setSocketTimeout(int timeout)
setSocketTimeout
in interface org.apache.http.HttpConnection
public int getSocketTimeout()
getSocketTimeout
in interface org.apache.http.HttpConnection
public org.apache.http.HttpConnectionMetrics getMetrics()
getMetrics
in interface org.apache.http.HttpConnection
public void flush() throws IOException
flush
in interface org.apache.http.HttpClientConnection
IOException
public boolean isResponseAvailable(int timeout) throws IOException
isResponseAvailable
in interface org.apache.http.HttpClientConnection
IOException
public void receiveResponseEntity(org.apache.http.HttpResponse response) throws org.apache.http.HttpException, IOException
receiveResponseEntity
in interface org.apache.http.HttpClientConnection
org.apache.http.HttpException
IOException
public org.apache.http.HttpResponse receiveResponseHeader() throws org.apache.http.HttpException, IOException
receiveResponseHeader
in interface org.apache.http.HttpClientConnection
org.apache.http.HttpException
IOException
public void sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest request) throws org.apache.http.HttpException, IOException
sendRequestEntity
in interface org.apache.http.HttpClientConnection
org.apache.http.HttpException
IOException
public void sendRequestHeader(org.apache.http.HttpRequest request) throws org.apache.http.HttpException, IOException
sendRequestHeader
in interface org.apache.http.HttpClientConnection
org.apache.http.HttpException
IOException
public InetAddress getLocalAddress()
getLocalAddress
in interface org.apache.http.HttpInetConnection
public int getLocalPort()
getLocalPort
in interface org.apache.http.HttpInetConnection
public InetAddress getRemoteAddress()
getRemoteAddress
in interface org.apache.http.HttpInetConnection
public int getRemotePort()
getRemotePort
in interface org.apache.http.HttpInetConnection
public boolean isSecure()
isSecure
in interface org.apache.http.conn.HttpRoutedConnection
isSecure
in interface org.apache.http.conn.ManagedClientConnection
public void bind(Socket socket) throws IOException
bind
in interface org.apache.http.conn.ManagedHttpClientConnection
IOException
public Socket getSocket()
getSocket
in interface org.apache.http.conn.ManagedHttpClientConnection
public SSLSession getSSLSession()
getSSLSession
in interface org.apache.http.conn.HttpRoutedConnection
getSSLSession
in interface org.apache.http.conn.ManagedClientConnection
getSSLSession
in interface org.apache.http.conn.ManagedHttpClientConnection
public org.apache.http.conn.routing.HttpRoute getRoute()
getRoute
in interface org.apache.http.conn.HttpRoutedConnection
getRoute
in interface org.apache.http.conn.ManagedClientConnection
public void open(org.apache.http.conn.routing.HttpRoute route, org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params) throws IOException
open
in interface org.apache.http.conn.ManagedClientConnection
IOException
public void tunnelTarget(boolean secure, org.apache.http.params.HttpParams params) throws IOException
tunnelTarget
in interface org.apache.http.conn.ManagedClientConnection
IOException
public void tunnelProxy(org.apache.http.HttpHost next, boolean secure, org.apache.http.params.HttpParams params) throws IOException
tunnelProxy
in interface org.apache.http.conn.ManagedClientConnection
IOException
public void layerProtocol(org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params) throws IOException
layerProtocol
in interface org.apache.http.conn.ManagedClientConnection
IOException
public Object getState()
getState
in interface org.apache.http.conn.ManagedClientConnection
public void setState(Object state)
setState
in interface org.apache.http.conn.ManagedClientConnection
public void markReusable()
markReusable
in interface org.apache.http.conn.ManagedClientConnection
public void unmarkReusable()
unmarkReusable
in interface org.apache.http.conn.ManagedClientConnection
public boolean isMarkedReusable()
isMarkedReusable
in interface org.apache.http.conn.ManagedClientConnection
public void setIdleDuration(long duration, TimeUnit unit)
setIdleDuration
in interface org.apache.http.conn.ManagedClientConnection
public void releaseConnection()
releaseConnection
in interface org.apache.http.conn.ConnectionReleaseTrigger
public void abortConnection()
abortConnection
in interface org.apache.http.conn.ConnectionReleaseTrigger
Copyright © 1998-2017 Apache Software Foundation. All Rights Reserved.