|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.nimkathana.swx.xmlrpc.SimpleHttpClient
Provides client-side HTTP communication
| Constructor Summary | |
SimpleHttpClient(java.lang.String hostname,
int port,
java.lang.String uri)
Calls initConnection() |
|
| Method Summary | |
protected void |
closeConnection()
Terminates the server connection |
java.lang.String |
execute(byte[] requestBody)
Executes a HTTP request to the connected server |
protected void |
finalize()
Calls closeConnection() |
boolean |
getKeepAlive()
Tells if this connection is using a keep alive |
protected void |
initConnection()
Called by constructor. |
void |
setBasicAuthentication(java.lang.String user,
java.lang.String password)
Base64 encodes the username and password given for basic server authentication |
void |
setKeepAlive(boolean keepAlive)
Turns keep alive on or off for this connection |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleHttpClient(java.lang.String hostname,
int port,
java.lang.String uri)
throws XmlRpcException
initConnection()
hostname - The server address to connect toport - The port on the server we want to connect touri - The connecting URI. Defaults to "/RPC2"
XmlRpcException - If the connection to the server could not be made| Method Detail |
public boolean getKeepAlive()
public void setKeepAlive(boolean keepAlive)
keepAlive - true if a keep alive should be used, false otherwise
public void setBasicAuthentication(java.lang.String user,
java.lang.String password)
user - The username for the serverpassword - The password for the username account on the server
public java.lang.String execute(byte[] requestBody)
throws XmlRpcException
requestBody - The contents of the HTTP request. Headers are added
appropriately by this method
XmlRpcException - If the server returns a status code other than 200 OK
protected void finalize()
throws java.lang.Throwable
closeConnection()
java.lang.Throwable
protected void initConnection()
throws XmlRpcException
XmlRpcExceptionprotected void closeConnection()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||