HttpConnectionpublic class HttpConnection extends Connection A requestConnection connecting to a normal (non secure) http server
{@hide} |
Methods Summary |
---|
void | closeConnection()Closes the low level connection.
If an exception is thrown then it is assumed that the
connection will have been closed (to the extent possible)
anyway and the caller does not need to take any further action.
try {
if (mHttpClientConnection != null && mHttpClientConnection.isOpen()) {
mHttpClientConnection.close();
}
} catch (IOException e) {
if (HttpLog.LOGV) HttpLog.v(
"closeConnection(): failed closing connection " +
mHost);
e.printStackTrace();
}
| java.lang.String | getScheme()
return "http";
| AndroidHttpClientConnection | openConnection(Request req)Opens the connection to a http server
// Update the certificate info (connection not secure - set to null)
EventHandler eventHandler = req.getEventHandler();
mCertificate = null;
eventHandler.certificate(mCertificate);
AndroidHttpClientConnection conn = new AndroidHttpClientConnection();
BasicHttpParams params = new BasicHttpParams();
Socket sock = new Socket(mHost.getHostName(), mHost.getPort());
params.setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8192);
conn.bind(sock, params);
return conn;
| void | restartConnection(boolean abort)Restart a secure connection suspended waiting for user interaction.
// not required for plain http connections
|
|