|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.j2ep.responsehandlers.ResponseHandlerBase
public abstract class ResponseHandlerBase
Basic implementation of a Response Handler. This class can write the headers and process the output stream.
| Field Summary | |
|---|---|
protected org.apache.commons.httpclient.HttpMethod |
method
Method we are using for this request. |
| Constructor Summary | |
|---|---|
ResponseHandlerBase(org.apache.commons.httpclient.HttpMethod method)
Basic constructor only setting the method. |
|
| Method Summary | |
|---|---|
void |
close()
Will release the connection for the method. |
int |
getStatusCode()
Returns the HTTP status code we received from the server |
abstract void |
process(HttpServletResponse response)
Will process the response to set headers and streams for it. |
protected void |
sendStreamToClient(ServletResponse response)
Writes the entire stream from the method to the response stream. |
protected void |
setHeaders(HttpServletResponse response)
Will write all response headers received in the method to the response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.commons.httpclient.HttpMethod method
| Constructor Detail |
|---|
public ResponseHandlerBase(org.apache.commons.httpclient.HttpMethod method)
method - The method we are using| Method Detail |
|---|
public abstract void process(HttpServletResponse response)
throws java.io.IOException
ResponseHandler
process in interface ResponseHandlerresponse - The response to process
java.io.IOException - An exception is thrown when there is a problem with writing the outputnet.sf.j2ep.model.ResponseHandler#process(javax.servlet.http.HttpServletResponse)public void close()
close in interface ResponseHandlerResponseHandler.close()public int getStatusCode()
ResponseHandler
getStatusCode in interface ResponseHandlerResponseHandler.getStatusCode()
protected void sendStreamToClient(ServletResponse response)
throws java.io.IOException
response - Response to send data to
java.io.IOException - An IOException is thrown when we are having problems with reading the streamsprotected void setHeaders(HttpServletResponse response)
response - The response that will have headers written to it
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||