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
 
Fields inherited from class webfunds.utils.Debug
bug, debugAll, logfix
 
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 webfunds.utils.Debug
debug, debug, debug, debug, err, getDebug, logend, logmsg, logstart, logword
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

url

protected java.net.URL url
The HTTP location

pw

protected transient java.io.PrintWriter pw
Constructor Detail

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
Method Detail

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