|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnetapp.manage.http.HTTPClient
An HTTP client implements the client portion of RFC2616.
| Field Summary | |
static int |
snoop
The debug level. |
| Constructor Summary | |
HTTPClient(boolean ssl,
java.net.InetAddress host,
int port)
Constructs a HTTPClient. |
|
HTTPClient(boolean ssl,
java.net.InetAddress host,
int port,
boolean reservedPort)
Constructs a HTTPClient. |
|
HTTPClient(boolean ssl,
java.lang.String host,
int port)
Constructs a HTTPClient. |
|
HTTPClient(boolean ssl,
java.lang.String host,
int port,
boolean reservedPort)
Constructs a HTTPClient. |
|
| Method Summary | |
void |
close()
Close this HTTP client's connections. |
HTTPResponse |
doRequest(HTTPRequest request)
Send a HTTPRequest and receive the corresponding
HTTPResponse. |
int |
getUseCount()
Get the number of requests that have been processed by this HTTPClient. |
boolean |
isCompatible(boolean ssl,
java.net.InetAddress host,
int port)
Test whether this HTTPClient was created with some
particular paramters. |
boolean |
isCompatible(boolean ssl,
java.lang.String host,
int port)
Test whether this HTTPClient was created with some
particular paramters. |
boolean |
isTimedOut()
Test whether the connection has been idle for too long. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int snoop
System.err.
| Constructor Detail |
public HTTPClient(boolean ssl,
java.lang.String host,
int port)
throws java.io.IOException,
java.net.UnknownHostException
HTTPClient. A single socket
connection is made to the HTTP server,
ssl - flag to use HTTPS instead of HTTP.host - the server hostname.port - the server TCP port.
java.io.IOException - if the connection cannot be established.
java.net.UnknownHostException - if the hostname is not known.
public HTTPClient(boolean ssl,
java.lang.String host,
int port,
boolean reservedPort)
throws java.io.IOException,
java.net.UnknownHostException
HTTPClient. A single socket
connection is made to the HTTP server,
ssl - flag to use HTTPS instead of HTTP.host - the server hostname.port - the server TCP port.reservedPort - flag indicating to bind to a reserved port.
java.io.IOException - if the connection cannot be established.
java.net.UnknownHostException - if the hostname is not known.
public HTTPClient(boolean ssl,
java.net.InetAddress host,
int port)
throws java.io.IOException
HTTPClient. A single socket
connection is made to the HTTP server,
ssl - flag to use HTTPS instead of HTTP.host - the server address.port - the server TCP port.
java.io.IOException - if the connection cannot be established.
public HTTPClient(boolean ssl,
java.net.InetAddress host,
int port,
boolean reservedPort)
throws java.io.IOException
HTTPClient. A single socket
connection is made to the HTTP server,
ssl - flag to use HTTPS instead of HTTP.host - the server address.port - the server TCP port.reservedPort - flag indicating to bind to a reserved port.
java.io.IOException - if the connection cannot be established.| Method Detail |
public void close()
HTTPClient.
public boolean isCompatible(boolean ssl,
java.lang.String host,
int port)
HTTPClient was created with some
particular paramters.
ssl - flag to use HTTPS instead of HTTP.host - the server hostname.port - the server TCP port.
true if all the parameters are the
same as when the object was created, otherwise
false.
public boolean isCompatible(boolean ssl,
java.net.InetAddress host,
int port)
HTTPClient was created with some
particular paramters.
ssl - flag to use HTTPS instead of HTTP.host - the server address.port - the server TCP port.
true if all the parameters are the
same as when the object was created, otherwise
false.public boolean isTimedOut()
true if the connection was idle for
too long, otherwise false.public int getUseCount()
HTTPClient.
public HTTPResponse doRequest(HTTPRequest request)
throws java.io.IOException,
HTTPException
HTTPRequest and receive the corresponding
HTTPResponse. This function will automatically
set the "Host" header in the request based on the parameters
of this HTTPClient.
request - the request to send.
java.io.IOException - if there is a communication error.
HTTPException - if there is a HTTP protocol error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||