|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Response
The Response interface is a very minimal version of a HTTP response. We use this to decouple the main parts of the proxy server from a given implementation.
Method Summary | |
---|---|
void |
addHeaderField(java.lang.String name,
java.lang.String value)
Add an HTTP header to the response. |
java.io.OutputStream |
getOutputStream()
Return outputstream response should be written to. |
int |
getStatus()
Get the status code from this response. |
void |
setStatus(int statusCode)
Set status code. |
void |
setStatus(int statusCode,
java.lang.String reason)
Set status code. |
Method Detail |
---|
java.io.OutputStream getOutputStream()
void setStatus(int statusCode)
statusCode
- should be valid http status ie. 200, 404,void setStatus(int statusCode, java.lang.String reason)
statusCode
- should be valid http status ie. 200, 404,reason
- text string explaining status ie. OK, not found,void addHeaderField(java.lang.String name, java.lang.String value)
name
- Name of the header, e.g. Last-Modified-Datevalue
- The value of the headerint getStatus()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |