edu.neu.ccs.demeterf.http.classes
Class ReqHandler

java.lang.Object
  extended by edu.neu.ccs.demeterf.http.classes.ReqHandler

public class ReqHandler
extends java.lang.Object

Representation of ReqHandler


Constructor Summary
ReqHandler()
          Construct a(n) ReqHandler Instance
 
Method Summary
 boolean equals(java.lang.Object o)
          Is the given object Equal to this ReqHandler?
 HTTPResp get(HTTPReq r)
          Handle a GET request
 HTTPResp head(HTTPReq r)
          Handle a HEAD request
 HTTPResp other(HTTPReq r)
          Handle any Other/unknown request
static ReqHandler parse(java.io.InputStream inpt)
          Parse an instance of ReqHandler from the given Stream
static ReqHandler parse(java.io.Reader inpt)
          Parse an instance of ReqHandler from the given Reader
static ReqHandler parse(java.lang.String inpt)
          Parse an instance of ReqHandler from the given String
 HTTPResp post(HTTPReq r)
          Handle a POST request
 void respond(java.net.ServerSocket s)
          Respond to a possible ServerSocket Connection
 void respond(java.net.Socket in)
          Respond to a Socket Connection
 java.lang.String toString()
          DGP method from Class PrintToString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReqHandler

public ReqHandler()
Construct a(n) ReqHandler Instance

Method Detail

equals

public boolean equals(java.lang.Object o)
Is the given object Equal to this ReqHandler?

Overrides:
equals in class java.lang.Object

parse

public static ReqHandler parse(java.lang.String inpt)
                        throws ParseException
Parse an instance of ReqHandler from the given String

Throws:
ParseException

parse

public static ReqHandler parse(java.io.InputStream inpt)
                        throws ParseException
Parse an instance of ReqHandler from the given Stream

Throws:
ParseException

parse

public static ReqHandler parse(java.io.Reader inpt)
                        throws ParseException
Parse an instance of ReqHandler from the given Reader

Throws:
ParseException

respond

public void respond(java.net.ServerSocket s)
Respond to a possible ServerSocket Connection


respond

public void respond(java.net.Socket in)
Respond to a Socket Connection


get

public HTTPResp get(HTTPReq r)
Handle a GET request


post

public HTTPResp post(HTTPReq r)
Handle a POST request


head

public HTTPResp head(HTTPReq r)
Handle a HEAD request


other

public HTTPResp other(HTTPReq r)
Handle any Other/unknown request


toString

public java.lang.String toString()
DGP method from Class PrintToString

Overrides:
toString in class java.lang.Object