FileDocCategorySizeDatePackage
HttpClientConnection.javaAPI DocAndroid 1.5 API4068Wed May 06 22:41:10 BST 2009org.apache.http

HttpClientConnection

public interface HttpClientConnection implements HttpConnection
An HTTP connection for use on the client side. It is used for sending requests and receiving responses.
author
Oleg Kalnichevski
version
$Revision: 542199 $
since
4.0

Fields Summary
Constructors Summary
Methods Summary
public voidflush()
Writes out all pending buffered data over the open connection.

throws
IOException

public booleanisResponseAvailable(int timeout)
Checks if response data is available from the connection. May wait for the specified time until some data becomes available. Note that some implementations may completely ignore the timeout parameter.

param
timeout the maximum time in milliseconds to wait for data
return
true if data is available; false if there was no data available even after waiting for timeout milliseconds.
throws
IOException if an error happens on the connection

public voidreceiveResponseEntity(org.apache.http.HttpResponse response)
Receives the next response entity available from this connection and attaches it to an existing HttpResponse object.

param
response the response to attach the entity to
throws
HttpException
throws
IOException

public org.apache.http.HttpResponsereceiveResponseHeader()
Receives the request line and headers of the next response available from this connection. The caller should examine the HttpResponse object to find out if it should try to receive a response entity as well.

return
a new HttpResponse object with status line and headers initialized.
throws
HttpException
throws
IOException

public voidsendRequestEntity(org.apache.http.HttpEntityEnclosingRequest request)
Sends the request entity over the connection.

param
request the request whose entity to send.
throws
HttpException
throws
IOException

public voidsendRequestHeader(org.apache.http.HttpRequest request)
Sends the request line and all headers over the connection.

param
request the request whose headers to send.
throws
HttpException
throws
IOException