Package org.apache.http.impl.nio.conn
Class CPoolProxy
java.lang.Object
org.apache.http.impl.nio.conn.CPoolProxy
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.http.HttpConnection
,org.apache.http.HttpInetConnection
,ManagedNHttpClientConnection
,org.apache.http.nio.IOControl
,org.apache.http.nio.NHttpClientConnection
,org.apache.http.nio.NHttpConnection
-
Field Summary
FieldsFields inherited from interface org.apache.http.nio.NHttpConnection
ACTIVE, CLOSED, CLOSING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bind
(org.apache.http.nio.reactor.IOSession iosession) Binds connection to the given I/O session.void
close()
(package private) CPoolEntry
detach()
static CPoolEntry
detach
(org.apache.http.nio.NHttpClientConnection proxy) (package private) ManagedNHttpClientConnection
org.apache.http.protocol.HttpContext
org.apache.http.HttpRequest
org.apache.http.HttpResponse
getId()
Returns connection ID which is expected to be unique for the life span of the connection manager.org.apache.http.nio.reactor.IOSession
Returns the underlying I/O session.int
org.apache.http.HttpConnectionMetrics
(package private) CPoolEntry
static CPoolEntry
getPoolEntry
(org.apache.http.nio.NHttpClientConnection proxy) private static CPoolProxy
getProxy
(org.apache.http.nio.NHttpClientConnection conn) int
int
Obtains the SSL session of the underlying connection, if any.int
(package private) ManagedNHttpClientConnection
boolean
isOpen()
boolean
boolean
isStale()
static org.apache.http.nio.NHttpClientConnection
newProxy
(CPoolEntry poolEntry) void
void
void
void
void
setSocketTimeout
(int i) void
shutdown()
void
submitRequest
(org.apache.http.HttpRequest request) void
void
toString()
-
Field Details
-
poolEntry
-
-
Constructor Details
-
CPoolProxy
CPoolProxy(CPoolEntry entry)
-
-
Method Details
-
getPoolEntry
CPoolEntry getPoolEntry() -
detach
CPoolEntry detach() -
getConnection
ManagedNHttpClientConnection getConnection() -
getValidConnection
ManagedNHttpClientConnection getValidConnection() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.apache.http.HttpConnection
- Throws:
IOException
-
shutdown
- Specified by:
shutdown
in interfaceorg.apache.http.HttpConnection
- Specified by:
shutdown
in interfaceorg.apache.http.nio.IOControl
- Throws:
IOException
-
getMetrics
public org.apache.http.HttpConnectionMetrics getMetrics()- Specified by:
getMetrics
in interfaceorg.apache.http.HttpConnection
-
requestInput
public void requestInput()- Specified by:
requestInput
in interfaceorg.apache.http.nio.IOControl
-
suspendInput
public void suspendInput()- Specified by:
suspendInput
in interfaceorg.apache.http.nio.IOControl
-
requestOutput
public void requestOutput()- Specified by:
requestOutput
in interfaceorg.apache.http.nio.IOControl
-
suspendOutput
public void suspendOutput()- Specified by:
suspendOutput
in interfaceorg.apache.http.nio.IOControl
-
getLocalAddress
- Specified by:
getLocalAddress
in interfaceorg.apache.http.HttpInetConnection
-
getLocalPort
public int getLocalPort()- Specified by:
getLocalPort
in interfaceorg.apache.http.HttpInetConnection
-
getRemoteAddress
- Specified by:
getRemoteAddress
in interfaceorg.apache.http.HttpInetConnection
-
getRemotePort
public int getRemotePort()- Specified by:
getRemotePort
in interfaceorg.apache.http.HttpInetConnection
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in interfaceorg.apache.http.HttpConnection
-
isStale
public boolean isStale()- Specified by:
isStale
in interfaceorg.apache.http.HttpConnection
-
setSocketTimeout
public void setSocketTimeout(int i) - Specified by:
setSocketTimeout
in interfaceorg.apache.http.HttpConnection
-
getSocketTimeout
public int getSocketTimeout()- Specified by:
getSocketTimeout
in interfaceorg.apache.http.HttpConnection
-
submitRequest
public void submitRequest(org.apache.http.HttpRequest request) throws IOException, org.apache.http.HttpException - Specified by:
submitRequest
in interfaceorg.apache.http.nio.NHttpClientConnection
- Throws:
IOException
org.apache.http.HttpException
-
isRequestSubmitted
public boolean isRequestSubmitted()- Specified by:
isRequestSubmitted
in interfaceorg.apache.http.nio.NHttpClientConnection
-
resetOutput
public void resetOutput()- Specified by:
resetOutput
in interfaceorg.apache.http.nio.NHttpClientConnection
-
resetInput
public void resetInput()- Specified by:
resetInput
in interfaceorg.apache.http.nio.NHttpClientConnection
-
getStatus
public int getStatus()- Specified by:
getStatus
in interfaceorg.apache.http.nio.NHttpConnection
-
getHttpRequest
public org.apache.http.HttpRequest getHttpRequest()- Specified by:
getHttpRequest
in interfaceorg.apache.http.nio.NHttpConnection
-
getHttpResponse
public org.apache.http.HttpResponse getHttpResponse()- Specified by:
getHttpResponse
in interfaceorg.apache.http.nio.NHttpConnection
-
getContext
public org.apache.http.protocol.HttpContext getContext()- Specified by:
getContext
in interfaceorg.apache.http.nio.NHttpConnection
-
newProxy
-
getProxy
-
getPoolEntry
-
detach
-
getId
Description copied from interface:ManagedNHttpClientConnection
Returns connection ID which is expected to be unique for the life span of the connection manager.- Specified by:
getId
in interfaceManagedNHttpClientConnection
-
bind
public void bind(org.apache.http.nio.reactor.IOSession iosession) Description copied from interface:ManagedNHttpClientConnection
Binds connection to the given I/O session.- Specified by:
bind
in interfaceManagedNHttpClientConnection
-
getIOSession
public org.apache.http.nio.reactor.IOSession getIOSession()Description copied from interface:ManagedNHttpClientConnection
Returns the underlying I/O session.- Specified by:
getIOSession
in interfaceManagedNHttpClientConnection
-
getSSLSession
Description copied from interface:ManagedNHttpClientConnection
Obtains the SSL session of the underlying connection, if any.- Specified by:
getSSLSession
in interfaceManagedNHttpClientConnection
- Returns:
- the underlying SSL session if available,
null
otherwise
-
toString
-