Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.meterware.pseudoserver
Class PseudoServlet  view PseudoServlet download PseudoServlet.java

java.lang.Object
  extended bycom.meterware.pseudoserver.PseudoServlet

public abstract class PseudoServlet
extends java.lang.Object

A basic simulated servlet for testing the HttpUnit library.


Field Summary
private  HttpRequest _request
           
static java.lang.String CONTENTS
           
 
Constructor Summary
PseudoServlet()
           
 
Method Summary
protected  byte[] getBody()
           
 WebResource getGetResponse()
          Returns a resource object as a result of a get request.
protected  java.lang.String getHeader(java.lang.String name)
          Returns the header with the specified name.
protected  java.lang.String[] getParameter(java.lang.String name)
          Returns the values for the parameter with the specified name.
 WebResource getPostResponse()
           
 WebResource getPutResponse()
           
protected  java.io.Reader getReader()
          Returns a reader for the body of the request.
protected  HttpRequest getRequest()
           
 WebResource getResponse(java.lang.String methodType)
          Returns a resource object as a result of a get request.
(package private)  void init(HttpRequest requestStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENTS

public static final java.lang.String CONTENTS
See Also:
Constant Field Values

_request

private HttpRequest _request
Constructor Detail

PseudoServlet

public PseudoServlet()
Method Detail

getResponse

public WebResource getResponse(java.lang.String methodType)
                        throws java.io.IOException
Returns a resource object as a result of a get request.


getGetResponse

public WebResource getGetResponse()
                           throws java.io.IOException
Returns a resource object as a result of a get request.


getPostResponse

public WebResource getPostResponse()
                            throws java.io.IOException

getPutResponse

public WebResource getPutResponse()
                           throws java.io.IOException

init

void init(HttpRequest requestStream)

getHeader

protected java.lang.String getHeader(java.lang.String name)
Returns the header with the specified name. If no such header exists, will return null.


getParameter

protected java.lang.String[] getParameter(java.lang.String name)
Returns the values for the parameter with the specified name. If no values exist will return null.


getReader

protected java.io.Reader getReader()
Returns a reader for the body of the request.


getBody

protected byte[] getBody()

getRequest

protected HttpRequest getRequest()