org.inria.ns.reflex.util.wunit
Class HttpService

java.lang.Object
  extended by org.inria.ns.reflex.util.wunit.HttpService

public class HttpService
extends Object

An abstraction of an HTTP service that supplies server-side components.

Author:
Philippe Poulard
See Also:
ServerEmulator.getService(java.net.URI, java.io.InputStream, java.io.OutputStream)

Method Summary
 HttpServletRequest getRequest()
          Return the servlet request.
 HttpServletResponse getResponse()
          Return the servlet response.
 void service()
          Invoke this service.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

service

public void service()
             throws IOException,
                    ServletException
Invoke this service. After invokation, a servlet might be available.

Throws:
IOException - If an input or output error is detected.
ServletException - If the request could not be handled.
See Also:
#getServlet()

getRequest

public HttpServletRequest getRequest()
Return the servlet request. This method can be used before invoking the service.

Returns:
The servlet request.

getResponse

public HttpServletResponse getResponse()
Return the servlet response. This method can be used before invoking the service (but the response will be somewhat empty).

Returns:
The servlet response.