webfunds.comms
Class HttpAgent
java.lang.Object
|
+--webfunds.utils.Debug
|
+--webfunds.comms.CommsAgent
|
+--webfunds.comms.HttpAgent
- public class HttpAgent
- extends CommsAgent
Instances of this class are used to perform Http requests.
|
Field Summary |
protected java.io.PrintWriter |
pw
|
protected java.net.URL |
url
The HTTP location |
|
Constructor Summary |
HttpAgent(java.net.URL url,
java.io.PrintWriter bug)
Create a new HttpAgent object. |
|
Method Summary |
byte[] |
request(byte[] request)
Send a Http request and await the reply. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
url
protected java.net.URL url
- The HTTP location
pw
protected transient java.io.PrintWriter pw
HttpAgent
public HttpAgent(java.net.URL url,
java.io.PrintWriter bug)
- Create a new HttpAgent object.
- Parameters:
url - the http location where requests are sent
request
public byte[] request(byte[] request)
throws AgentReplyException,
AgentURLException,
AgentConnectException
- Send a Http request and await the reply.
- Overrides:
- request in class CommsAgent
- Returns:
- the reply
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object