|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HttpResponse
This interface takes care of HTTP Responses. It sends data back to the browser.
Method Summary | |
---|---|
int |
getCode()
gets the HTTP response code |
java.lang.String |
getContentType()
gets the content type that will be sent to the browser |
java.lang.String |
getHeader(java.lang.String name)
Gets a header based on the name passed in |
java.io.OutputStream |
getOutputStream()
gets the OutputStream to send data to the browser |
java.io.PrintWriter |
getPrintWriter()
Gets the PrintWriter to send data to the browser |
java.lang.String |
getServerName()
gets the name of the server being used |
void |
reset()
resets the data to be sent to the browser |
void |
reset(int code,
java.lang.String responseString)
resets the data to be sent to the browser with the response code and response string |
void |
setCode(int code)
sets the HTTP response code to be sent to the browser. |
void |
setContentType(java.lang.String type)
sets the content type to be sent back to the browser |
void |
setHeader(java.lang.String name,
java.lang.String value)
sets a header to be sent back to the browser |
void |
setResponseString(java.lang.String responseString)
Sets the response string to be sent to the browser |
Method Detail |
---|
void setHeader(java.lang.String name, java.lang.String value)
name
- the name of the headervalue
- the value of the headerjava.lang.String getHeader(java.lang.String name)
name
- The name of the header
java.io.PrintWriter getPrintWriter()
java.io.OutputStream getOutputStream()
void setCode(int code)
code
- the code to be sent to the browserint getCode()
void setContentType(java.lang.String type)
type
- the type to be sent to the browser (i.e. "text/html")java.lang.String getContentType()
void setResponseString(java.lang.String responseString)
responseString
- the response stringvoid reset()
void reset(int code, java.lang.String responseString)
code
- the code to be sent to the browserresponseString
- the response string to be sent to the browserjava.lang.String getServerName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |