|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.net.http.AndroidHttpClientConnection
public class AndroidHttpClientConnection
A alternate class for (@link DefaultHttpClientConnection). It has better performance than DefaultHttpClientConnection
| Constructor Summary | |
|---|---|
AndroidHttpClientConnection()
|
|
| Method Summary | |
|---|---|
void |
bind(Socket socket,
HttpParams params)
Bind socket and set HttpParams to AndroidHttpClientConnection |
void |
close()
Closes this connection gracefully. |
protected void |
doFlush()
|
void |
flush()
|
InetAddress |
getLocalAddress()
|
int |
getLocalPort()
|
HttpConnectionMetrics |
getMetrics()
Returns a collection of connection metrcis |
InetAddress |
getRemoteAddress()
|
int |
getRemotePort()
|
int |
getSocketTimeout()
Returns the socket timeout value. |
boolean |
isOpen()
Checks if this connection is open. |
boolean |
isStale()
Checks whether this connection has gone down. |
StatusLine |
parseResponseHeader(Headers headers)
Parses the response headers and adds them to the given headers object, and returns the response StatusLine |
HttpEntity |
receiveResponseEntity(Headers headers)
Return the next response entity. |
void |
sendRequestEntity(HttpEntityEnclosingRequest request)
Sends the request entity over the connection. |
void |
sendRequestHeader(HttpRequest request)
Sends the request line and all headers over the connection. |
void |
setSocketTimeout(int timeout)
Sets the socket timeout value. |
void |
shutdown()
Force-closes this connection. |
String |
toString()
Returns a string containing a concise, human-readable description of the receiver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AndroidHttpClientConnection()
| Method Detail |
|---|
public void bind(Socket socket,
HttpParams params)
throws IOException
socket - outgoing socketparams - HttpParams
IOExceptionpublic String toString()
Object
toString in class Objectpublic boolean isOpen()
HttpConnection
isOpen in interface HttpConnectionpublic InetAddress getLocalAddress()
getLocalAddress in interface HttpInetConnectionpublic int getLocalPort()
getLocalPort in interface HttpInetConnectionpublic InetAddress getRemoteAddress()
getRemoteAddress in interface HttpInetConnectionpublic int getRemotePort()
getRemotePort in interface HttpInetConnectionpublic void setSocketTimeout(int timeout)
HttpConnection
setSocketTimeout in interface HttpConnectiontimeout - timeout value in millisecondspublic int getSocketTimeout()
HttpConnection
getSocketTimeout in interface HttpConnection0 if timeout is disabled or -1 if
timeout is undefined.
public void shutdown()
throws IOException
HttpConnection
shutdown in interface HttpConnectionIOException
public void close()
throws IOException
HttpConnectionshutdown instead.
close in interface HttpConnectionIOException
public void sendRequestHeader(HttpRequest request)
throws HttpException,
IOException
request - the request whose headers to send.
HttpException
IOException
public void sendRequestEntity(HttpEntityEnclosingRequest request)
throws HttpException,
IOException
request - the request whose entity to send.
HttpException
IOException
protected void doFlush()
throws IOException
IOException
public void flush()
throws IOException
IOException
public StatusLine parseResponseHeader(Headers headers)
throws IOException,
ParseException
headers object, and returns the response StatusLine
headers - store parsed header to headers.
IOException
ParseExceptionHttpClientConnection.receiveResponseHeader()public HttpEntity receiveResponseEntity(Headers headers)
headers - contains values for parsing entityHttpClientConnection.receiveResponseEntity(HttpResponse response)public boolean isStale()
isStale in interface HttpConnectiontrue if attempts to use this connection are
likely to succeed, or false if they are likely
to fail and this connection should be closedpublic HttpConnectionMetrics getMetrics()
getMetrics in interface HttpConnection
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||