com.meterware.pseudoserver

Class PseudoServlet

public abstract class PseudoServlet extends Object

A basic simulated servlet for testing the HttpUnit library.
Field Summary
static StringCONTENTS
Method Summary
protected byte[]getBody()
WebResourcegetGetResponse()
Returns a resource object as a result of a get request.
protected StringgetHeader(String name)
Returns the header with the specified name.
protected String[]getParameter(String name)
Returns the values for the parameter with the specified name.
WebResourcegetPostResponse()
WebResourcegetPutResponse()
protected ReadergetReader()
Returns a reader for the body of the request.
protected HttpRequestgetRequest()
WebResourcegetResponse(String methodType)
Returns a resource object as a result of a get request.

Field Detail

CONTENTS

public static final String CONTENTS

Method Detail

getBody

protected byte[] getBody()

getGetResponse

public WebResource getGetResponse()
Returns a resource object as a result of a get request.

getHeader

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

getParameter

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

getPostResponse

public WebResource getPostResponse()

getPutResponse

public WebResource getPutResponse()

getReader

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

getRequest

protected HttpRequest getRequest()

getResponse

public WebResource getResponse(String methodType)
Returns a resource object as a result of a get request.