net.sf.j2ep.model
Interface ResponseHandler

All Known Implementing Classes:
BasicResponseHandler, DeleteResponseHandler, GetResponseHandler, HeadResponseHandler, OptionsResponseHandler, PostResponseHandler, PutResponseHandler, ResponseHandlerBase, TraceResponseHandler

public interface ResponseHandler

A handler for all responses. Will set the headers, process any output stream and do any method specific actions.

Author:
Anders Nyman

Method Summary
 void close()
          Do any actions needed when we wont need the ResponseHandler any more.
 int getStatusCode()
          Returns the HTTP status code we received from the server
 void process(HttpServletResponse response)
          Will process the response to set headers and streams for it.
 

Method Detail

process

void process(HttpServletResponse response)
             throws java.io.IOException
Will process the response to set headers and streams for it. Each implementation of ResponseHandler can also add it's one method specific actions to the process method.

Parameters:
response - The response to process
Throws:
java.io.IOException - An exception is thrown when there is a problem with writing the output

getStatusCode

int getStatusCode()
Returns the HTTP status code we received from the server

Returns:
The status code

close

void close()
Do any actions needed when we wont need the ResponseHandler any more.