net.sf.j2ep.responsehandlers
Class BasicResponseHandler

java.lang.Object
  extended by net.sf.j2ep.responsehandlers.ResponseHandlerBase
      extended by net.sf.j2ep.responsehandlers.BasicResponseHandler
All Implemented Interfaces:
ResponseHandler
Direct Known Subclasses:
DeleteResponseHandler, GetResponseHandler, PostResponseHandler, PutResponseHandler

public class BasicResponseHandler
extends ResponseHandlerBase

A simple ResponseHandler used for all those times when all you have to do is write the Headers and process the stream.

Author:
Anders Nyman

Field Summary
 
Fields inherited from class net.sf.j2ep.responsehandlers.ResponseHandlerBase
method
 
Constructor Summary
BasicResponseHandler(org.apache.commons.httpclient.HttpMethod method)
          Default constructor, will only call the super-constructor for ResponseHandlerBase.
 
Method Summary
 void process(HttpServletResponse response)
          Sets the headers, writes the stream and sets the status code.
 
Methods inherited from class net.sf.j2ep.responsehandlers.ResponseHandlerBase
close, getStatusCode, sendStreamToClient, setHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicResponseHandler

public BasicResponseHandler(org.apache.commons.httpclient.HttpMethod method)
Default constructor, will only call the super-constructor for ResponseHandlerBase.

Parameters:
method - The method used for this response
Method Detail

process

public void process(HttpServletResponse response)
             throws java.io.IOException
Sets the headers, writes the stream and sets the status code.

Specified by:
process in interface ResponseHandler
Specified by:
process in class ResponseHandlerBase
Parameters:
response - The response to process
Throws:
java.io.IOException - An exception is thrown when there is a problem with writing the output
See Also:
net.sf.j2ep.model.ResponseHandler#process(javax.servlet.http.HttpServletResponse)