|
EAF 7.4 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HttpPresentationResponse
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(javax.servlet.http.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. |
org.enhydra.xml.io.OutputOptions |
createOutputOptions(org.enhydra.xml.xmlc.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. |
javax.servlet.http.HttpServletResponse |
getHttpServletResponse()
Returns the original HttpServletResponse. |
HttpPresentationOutputStream |
getOutputStream()
Returns an output stream for writing response data. |
com.lutris.appserver.server.ResponsePostProcessingManager |
getPostProcessingManager()
Returns the response post processing manager. |
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 |
setPostProcessingManager(com.lutris.appserver.server.ResponsePostProcessingManager processingManager)
Sets the response post processing manager. |
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(org.w3c.dom.Node document)
Output an an XML document object (DOM). |
void |
writeDOM(org.enhydra.xml.io.OutputOptions outputOptions,
org.w3c.dom.Node document)
Output an an XML document object (DOM). |
void |
writeHTML(org.w3c.dom.html.HTMLDocument doc)
Deprecated. use writeDOM |
void |
writeHTML(java.lang.String html)
Utility method to output an HTML page. |
Field Detail |
---|
static final int SC_OK
static final int SC_CREATED
static final int SC_ACCEPTED
static final int SC_NO_CONTENT
static final int SC_MOVED_PERMANENTLY
static final int SC_MOVED_TEMPORARILY
static final int SC_NOT_MODIFIED
static final int SC_BAD_REQUEST
static final int SC_UNAUTHORIZED
static final int SC_FORBIDDEN
static final int SC_NOT_FOUND
static final int SC_INTERNAL_SERVER_ERROR
static final int SC_NOT_IMPLEMENTED
static final int SC_BAD_GATEWAY
static final int SC_SERVICE_UNAVAILABLE
Method Detail |
---|
javax.servlet.http.HttpServletResponse getHttpServletResponse()
void setContentLength(int len) throws HttpPresentationException
len
- the content length
HttpPresentationException
void setContentType(java.lang.String type) throws HttpPresentationException
type
- the content's MIME type
HttpPresentationException
org.enhydra.xml.io.OutputOptions createOutputOptions(org.enhydra.xml.xmlc.XMLObject document) throws HttpPresentationException
The following attributes are set in the object:
HttpPresentationException
HttpPresentationOutputStream getOutputStream() throws HttpPresentationException
HttpPresentationException
void addCookie(javax.servlet.http.Cookie cookie) throws HttpPresentationException
cookie
- - The Cookie to return to the client.
HttpPresentationException
boolean containsHeader(java.lang.String name) throws HttpPresentationException
name
- the header field name
HttpPresentationException
void setStatus(int sc, java.lang.String sm) throws HttpPresentationException
sc
- the status codesm
- the status message
HttpPresentationException
void setStatus(int sc) throws HttpPresentationException
sc
- the status code
HttpPresentationException
void setHeader(java.lang.String name, java.lang.String value) throws HttpPresentationException
name
- the header field namevalue
- the header field value
HttpPresentationException
void setIntHeader(java.lang.String name, int value) throws HttpPresentationException
name
- the header field namevalue
- the header field integer value
HttpPresentationException
void setDateHeader(java.lang.String name, long date) throws HttpPresentationException
name
- the header field namevalue
- the header field date value
HttpPresentationException
void sendError(int sc, java.lang.String msg) throws HttpPresentationException
sc
- the status codemsg
- the detail message
HttpPresentationException
void sendError(int sc) throws HttpPresentationException
sc
- the status code
HttpPresentationException
void flush() throws HttpPresentationException
HttpPresentationException
void writeDOM(org.enhydra.xml.io.OutputOptions outputOptions, org.w3c.dom.Node document) throws HttpPresentationException
outputFormat
- Object use to specify options controling formatting
of the document.doc
- The DOM object to be returned as response.
HttpPresentationException
void writeDOM(org.w3c.dom.Node document) throws HttpPresentationException
doc
- The DOM object to be returned as response.
HttpPresentationException
void writeHTML(java.lang.String html) throws HttpPresentationException
HttpPresentationException
void writeHTML(org.w3c.dom.html.HTMLDocument doc) throws HttpPresentationException
doc
- The DOM object to be returned as response
HttpPresentationException
writeDOM(org.enhydra.xml.io.OutputOptions, org.w3c.dom.Node)
void setEncoding(java.lang.String enc)
enc
- character encodingjava.lang.String getEncoding()
void setSessionKey(java.lang.String sessionKey)
sessionKey
- The current sessionKeyvoid setSessionManager(SessionManager sessionManager)
appName
- The current application nameboolean isSessionIdCookieRequired() throws HttpPresentationException
HttpPresentationException
void setSessionIdCookieRequired(boolean sessionIdCookie) throws HttpPresentationException
HttpPresentationException
boolean isSessionIdEncodeUrlRequired() throws HttpPresentationException
HttpPresentationException
void setSessionIdEncodeUrlRequired(boolean sessionIdUrl) throws HttpPresentationException
HttpPresentationException
void setPostProcessingManager(com.lutris.appserver.server.ResponsePostProcessingManager processingManager)
processingManager
- com.lutris.appserver.server.ResponsePostProcessingManager getPostProcessingManager()
|
EAF 7.4 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |