|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ManagedClientConnection
A client-side connection with advanced connection logic. Instances are typically obtained from a connection manager.
Method Summary | |
---|---|
HttpRoute |
getRoute()
Obtains the current route of this connection. |
boolean |
isMarkedReusable()
Indicates whether this connection is in a reusable communication state. |
boolean |
isSecure()
Indicates whether this connection is secure. |
void |
layerProtocol(org.apache.http.protocol.HttpContext context,
org.apache.http.params.HttpParams params)
Layers a new protocol on top of a tunnelled
connection. |
void |
markReusable()
Marks this connection as being in a reusable communication state. |
void |
open(HttpRoute route,
org.apache.http.protocol.HttpContext context,
org.apache.http.params.HttpParams params)
Opens this connection according to the given route. |
void |
tunnelCreated(boolean secure,
org.apache.http.params.HttpParams params)
Indicates that a tunnel has been established. |
void |
unmarkReusable()
Marks this connection as not being in a reusable state. |
Methods inherited from interface org.apache.http.HttpClientConnection |
---|
flush, isResponseAvailable, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader |
Methods inherited from interface org.apache.http.HttpConnection |
---|
close, getMetrics, getSocketTimeout, isOpen, isStale, setSocketTimeout, shutdown |
Methods inherited from interface org.apache.http.HttpInetConnection |
---|
getLocalAddress, getLocalPort, getRemoteAddress, getRemotePort |
Methods inherited from interface org.apache.http.HttpConnection |
---|
close, getMetrics, getSocketTimeout, isOpen, isStale, setSocketTimeout, shutdown |
Methods inherited from interface org.apache.http.conn.ConnectionReleaseTrigger |
---|
abortConnection, releaseConnection |
Method Detail |
---|
boolean isSecure()
true
if this connection is secure,
false
otherwiseHttpRoute getRoute()
null
if not connectedvoid open(HttpRoute route, org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params) throws java.io.IOException
route
- the route along which to open. It will be opened
to the proxy if present, or directly to the target.context
- the context for opening this connectionparams
- the parameters for opening this connection
java.io.IOException
- in case of a problemvoid tunnelCreated(boolean secure, org.apache.http.params.HttpParams params) throws java.io.IOException
open
.
Subsequently, layerProtocol
can be called
to layer the TLS/SSL protocol on top of the tunnelled connection.
secure
- true
if the tunnel should be considered
secure, false
otherwiseparams
- the parameters for tunnelling this connection
java.io.IOException
- in case of a problemvoid layerProtocol(org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params) throws java.io.IOException
tunnelled
connection. This is typically used to create a TLS/SSL connection
through a proxy.
The route is the one previously passed to open
.
It is not guaranteed that the layered connection is
secure
.
context
- the context for layering on top of this connectionparams
- the parameters for layering on top of this connection
java.io.IOException
- in case of a problemvoid markReusable()
route
mismatch, the connection being closed,
or other circumstances might prevent reuse.
void unmarkReusable()
reuse strategy
.
markReusable
.
boolean isMarkedReusable()
markReusable
and
unmarkReusable
for details.
true
if this connection is marked as being in
a reusable communication state,
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |