public interface OperatedClientConnection extends HttpClientConnection, HttpInetConnection
|Modifier and Type||Method and Description|
Obtains the socket for this connection.
Obtains the target host for this connection.
Indicates whether this connection is secure.
Signals that the connection has been successfully open.
Signals that this connection is in the process of being open.
Updates this connection.
flush, isResponseAvailable, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader
getLocalAddress, getLocalPort, getRemoteAddress, getRemotePort
trueif this connection is secure,
void opening(Socket sock, HttpHost target) throws IOException
By calling this method, the connection can be re-initialized
with a new Socket instance before
openCompleted(boolean, org.apache.http.params.HttpParams) is called.
This enabled the connection to close that socket if
is called before it is fully open. Closing an 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.
This method can be called multiple times if the connection is layered over another protocol. Note: This method will not close the previously used socket. It is the caller's responsibility to close that socket if it is no longer required.
The caller must invoke
openCompleted(boolean, org.apache.http.params.HttpParams) in order to complete
sock- the unconnected socket which is about to be connected.
target- the target host of this connection
void openCompleted(boolean secure, HttpParams params) throws IOException
trueif this connection is secure, for example if an
SSLSocketis used, or
falseif it is not secure
params- parameters for this connection. The parameters will be used when creating dependent objects, for example to determine buffer sizes.
void update(Socket sock, HttpHost target, boolean secure, HttpParams params) throws IOException
sock- the new socket for communicating with the target host, or
nullto continue using the old socket. If
nullis 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 connection
trueif this connection is now secure,
falseif it is not secure
params- new parameters for this connection
Copyright © 1999–2013 The Apache Software Foundation. All rights reserved.