|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OperatedClientConnection
A client-side connection that relies on outside logic to connect sockets to the
appropriate hosts. It can be operated directly by an application, or through an
operator
.
Method Summary | |
---|---|
Socket |
getSocket()
Obtains the socket for this connection. |
HttpHost |
getTargetHost()
Obtains the target host for this connection. |
boolean |
isSecure()
Indicates whether this connection is secure. |
void |
openCompleted(boolean secure,
HttpParams params)
Signals that the connection has been successfully open. |
void |
opening(Socket sock,
HttpHost target)
Signals that this connection is in the process of being open. |
void |
update(Socket sock,
HttpHost target,
boolean secure,
HttpParams params)
Updates this connection. |
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 |
Method Detail |
---|
HttpHost getTargetHost()
update
.
boolean isSecure()
update
.
true
if this connection is secure,
false
otherwiseSocket getSocket()
update
.
target host
void opening(Socket sock, HttpHost target) throws IOException
openCompleted(boolean, org.apache.http.params.HttpParams)
is called. This allows
the connection to close that socket if
shutdown
is called before it is open. Closing the unconnected socket
will interrupt a thread that is blocked on the connect.
Otherwise, that thread will either time out on the connect,
or it returns successfully and then opens this connection
which was just shut down.
openCompleted(boolean, org.apache.http.params.HttpParams)
in order to complete
the process
sock
- the unconnected socket which is about to
be connected.target
- the target host of this connection
IOException
void openCompleted(boolean secure, HttpParams params) throws IOException
secure
- true
if this connection is secure, for
example if an SSLSocket
is used, or
false
if it is not secureparams
- parameters for this connection. The parameters will
be used when creating dependent objects, for example
to determine buffer sizes.
IOException
void update(Socket sock, HttpHost target, boolean secure, HttpParams params) throws IOException
sock
- the new socket for communicating with the target host,
or null
to continue using the old socket.
If null
is passed, helper objects that
depend on the socket should be re-used. In that case,
some changes in the parameters will not take effect.target
- the new target host of this connectionsecure
- true
if this connection is now secure,
false
if it is not secureparams
- new parameters for this connection
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |