|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object passed to presentation objects that is used to generate HTTP responses.
Field Summary | |
static int |
SC_ACCEPTED
Status code (202) indicating that a request was accepted for processing, but was not completed. |
static int |
SC_BAD_GATEWAY
Status code (502) indicating that the HTTP server received an invalid response from a server it consulted when acting as a proxy or gateway. |
static int |
SC_BAD_REQUEST
Status code (400) indicating the request sent by the client was syntactically incorrect. |
static int |
SC_CREATED
Status code (201) indicating the request succeeded and created a new resource on the server. |
static int |
SC_FORBIDDEN
Status code (403) indicating the server understood the request but refused to fulfill it. |
static int |
SC_INTERNAL_SERVER_ERROR
Status code (500) indicating an error inside the HTTP service which prevented it from fulfilling the request. |
static int |
SC_MOVED_PERMANENTLY
Status code (301) indicating that the resource has permanently moved to a new location, and that future references should use a new URI with their requests. |
static int |
SC_MOVED_TEMPORARILY
Status code (302) indicating that the resource has temporarily moved to another location, but that future references should still use the original URI to access the resource. |
static int |
SC_NO_CONTENT
Status code (204) indicating that the request succeeded but that there was no new information to return. |
static int |
SC_NOT_FOUND
Status code (404) indicating that the requested resource is not available. |
static int |
SC_NOT_IMPLEMENTED
Status code (501) indicating the HTTP service does not support the functionality needed to fulfill the request. |
static int |
SC_NOT_MODIFIED
Status code (304) indicating that a conditional GET operation found that the resource was available and not modified. |
static int |
SC_OK
Status code (200) indicating the request succeeded normally. |
static int |
SC_SERVICE_UNAVAILABLE
Status code (503) indicating that the HTTP service is temporarily overloaded, and unable to handle the request. |
static int |
SC_UNAUTHORIZED
Status code (401) indicating that the request requires HTTP authentication. |
Method Summary | |
void |
addCookie(Cookie cookie)
Adds the specified cookie to the response. |
boolean |
containsHeader(java.lang.String name)
Returns true if the response message header has a field with the specified name. |
OutputOptions |
createOutputOptions(XMLObject document)
Create an OutputOptions object for a document. |
void |
flush()
Called at the end of processing a response to force any cached headers to be written and buffers flushed. |
java.lang.String |
getEncoding()
Get the output character encoding. |
HttpServletResponse |
getHttpServletResponse()
Returns the original HttpServletResponse. |
HttpPresentationOutputStream |
getOutputStream()
Returns an output stream for writing response data. |
boolean |
isSessionIdCookieRequired()
Indicates whether client response requires a sessionId cookie |
boolean |
isSessionIdEncodeUrlRequired()
Indicates whether client response requires url encoding for sessionId |
void |
sendError(int sc)
Sends an error response to the client using the specified status code and a default message. |
void |
sendError(int sc,
java.lang.String msg)
Sends an error response to the client using the specified status code and descriptive message. |
void |
setContentLength(int len)
Sets the content length for this response. |
void |
setContentType(java.lang.String type)
Sets the content type for this response. |
void |
setDateHeader(java.lang.String name,
long date)
Adds a field to the response header with a given name and date-valued field. |
void |
setEncoding(java.lang.String enc)
Set the output character encoding. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Adds a field to the response header with a given name and value. |
void |
setIntHeader(java.lang.String name,
int value)
Adds a field to the response header with a given name and integer value. |
void |
setSessionIdCookieRequired(boolean sessionIdCookie)
|
void |
setSessionIdEncodeUrlRequired(boolean sessionIdUrl)
|
void |
setSessionKey(java.lang.String sessionKey)
Sets the current session key for this response |
void |
setSessionManager(SessionManager sessionManager)
Sets the current application name for this response |
void |
setStatus(int sc)
Sets the status code and a default message for this response. |
void |
setStatus(int sc,
java.lang.String sm)
Sets the status code and message for this response. |
void |
writeDOM(OutputOptions outputOptions,
XMLObject document)
Output an an XMLC document object (DOM). |
void |
writeDOM(XMLObject document)
Output an an XMLC document object (DOM). |
void |
writeHTML(HTMLDocument doc)
Deprecated. use writeDOM |
void |
writeHTML(java.lang.String html)
Utility method to output an HTML page. |
Field Detail |
public static final int SC_OK
public static final int SC_CREATED
public static final int SC_ACCEPTED
public static final int SC_NO_CONTENT
public static final int SC_MOVED_PERMANENTLY
public static final int SC_MOVED_TEMPORARILY
public static final int SC_NOT_MODIFIED
public static final int SC_BAD_REQUEST
public static final int SC_UNAUTHORIZED
public static final int SC_FORBIDDEN
public static final int SC_NOT_FOUND
public static final int SC_INTERNAL_SERVER_ERROR
public static final int SC_NOT_IMPLEMENTED
public static final int SC_BAD_GATEWAY
public static final int SC_SERVICE_UNAVAILABLE
Method Detail |
public HttpServletResponse getHttpServletResponse()
public void setContentLength(int len) throws HttpPresentationException
len
- the content lengthpublic void setContentType(java.lang.String type) throws HttpPresentationException
type
- the content's MIME typepublic OutputOptions createOutputOptions(XMLObject document) throws HttpPresentationException
The following attributes are set in the object:
public HttpPresentationOutputStream getOutputStream() throws HttpPresentationException
public void addCookie(Cookie cookie) throws HttpPresentationException
cookie
- - The Cookie to return to the client.public boolean containsHeader(java.lang.String name) throws HttpPresentationException
name
- the header field namepublic void setStatus(int sc, java.lang.String sm) throws HttpPresentationException
sc
- the status codesm
- the status messagepublic void setStatus(int sc) throws HttpPresentationException
sc
- the status codepublic void setHeader(java.lang.String name, java.lang.String value) throws HttpPresentationException
name
- the header field namevalue
- the header field valuepublic void setIntHeader(java.lang.String name, int value) throws HttpPresentationException
name
- the header field namevalue
- the header field integer valuepublic void setDateHeader(java.lang.String name, long date) throws HttpPresentationException
name
- the header field namevalue
- the header field date valuepublic void sendError(int sc, java.lang.String msg) throws HttpPresentationException
sc
- the status codemsg
- the detail messagepublic void sendError(int sc) throws HttpPresentationException
sc
- the status codepublic void flush() throws HttpPresentationException
public void writeDOM(OutputOptions outputOptions, XMLObject document) throws HttpPresentationException
outputFormat
- Object use to specify options controling formatting
of the document.doc
- The DOM object to be returned as response.public void writeDOM(XMLObject document) throws HttpPresentationException
doc
- The DOM object to be returned as response.public void writeHTML(java.lang.String html) throws HttpPresentationException
public void writeHTML(HTMLDocument doc) throws HttpPresentationException
doc
- The DOM object to be returned as responsewriteDOM(org.enhydra.xml.io.OutputOptions, org.enhydra.xml.xmlc.XMLObject)
public void setEncoding(java.lang.String enc)
enc
- character encodingpublic java.lang.String getEncoding()
public void setSessionKey(java.lang.String sessionKey)
sessionKey
- The current sessionKeypublic void setSessionManager(SessionManager sessionManager)
appName
- The current application namepublic boolean isSessionIdCookieRequired() throws HttpPresentationException
public void setSessionIdCookieRequired(boolean sessionIdCookie) throws HttpPresentationException
public boolean isSessionIdEncodeUrlRequired() throws HttpPresentationException
public void setSessionIdEncodeUrlRequired(boolean sessionIdUrl) throws HttpPresentationException
|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |