Java Doc for HttpPresentationResponse.java in  » J2EE » Enhydra-Application-Framework » com » lutris » appserver » server » httpPresentation » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Enhydra Application Framework » com.lutris.appserver.server.httpPresentation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.lutris.appserver.server.httpPresentation.HttpPresentationResponse

All known Subclasses:   com.lutris.appserver.server.httpPresentation.servlet.ServletHttpPresentationResponse,
HttpPresentationResponse
public interface HttpPresentationResponse (Code)
Object passed to presentation objects that is used to generate HTTP responses.
author:
   Mark Diekhans
version:
   $Revision: 1.3 $


Field Summary
final public static  intSC_ACCEPTED
     Status code (202) indicating that a request was accepted for processing, but was not completed.
final public static  intSC_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.
final public static  intSC_BAD_REQUEST
     Status code (400) indicating the request sent by the client was syntactically incorrect.
final public static  intSC_CREATED
     Status code (201) indicating the request succeeded and created a new resource on the server.
final public static  intSC_FORBIDDEN
     Status code (403) indicating the server understood the request but refused to fulfill it.
final public static  intSC_INTERNAL_SERVER_ERROR
     Status code (500) indicating an error inside the HTTP service which prevented it from fulfilling the request.
final public static  intSC_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.
final public static  intSC_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.
final public static  intSC_NOT_FOUND
     Status code (404) indicating that the requested resource is not available.
final public static  intSC_NOT_IMPLEMENTED
     Status code (501) indicating the HTTP service does not support the functionality needed to fulfill the request.
final public static  intSC_NOT_MODIFIED
     Status code (304) indicating that a conditional GET operation found that the resource was available and not modified.
final public static  intSC_NO_CONTENT
     Status code (204) indicating that the request succeeded but that there was no new information to return.
final public static  intSC_OK
     Status code (200) indicating the request succeeded normally.
final public static  intSC_SERVICE_UNAVAILABLE
     Status code (503) indicating that the HTTP service is temporarily overloaded, and unable to handle the request.
final public static  intSC_UNAUTHORIZED
     Status code (401) indicating that the request requires HTTP authentication.


Method Summary
public  voidaddCookie(Cookie cookie)
     Adds the specified cookie to the response.
public  booleancontainsHeader(String name)
     Returns true if the response message header has a field with the specified name.
public  OutputOptionscreateOutputOptions(XMLObject document)
     Create an OutputOptions object for a document.
public  voidflush()
     Called at the end of processing a response to force any cached headers to be written and buffers flushed.
public  StringgetEncoding()
     Get the output character encoding.
public  HttpServletResponsegetHttpServletResponse()
     Returns the original HttpServletResponse.
public  HttpPresentationOutputStreamgetOutputStream()
     Returns an output stream for writing response data.
public  ResponsePostProcessingManagergetPostProcessingManager()
     Returns the response post processing manager.
public  booleanisSessionIdCookieRequired()
    
public  booleanisSessionIdEncodeUrlRequired()
    
public  voidsendError(int sc, String msg)
     Sends an error response to the client using the specified status code and descriptive message.
public  voidsendError(int sc)
     Sends an error response to the client using the specified status code and a default message.
public  voidsetContentLength(int len)
     Sets the content length for this response.
public  voidsetContentType(String type)
     Sets the content type for this response.
public  voidsetDateHeader(String name, long date)
     Adds a field to the response header with a given name and date-valued field.
public  voidsetEncoding(String enc)
     Set the output character encoding.
public  voidsetHeader(String name, String value)
     Adds a field to the response header with a given name and value.
public  voidsetIntHeader(String name, int value)
     Adds a field to the response header with a given name and integer value.
public  voidsetPostProcessingManager(ResponsePostProcessingManager processingManager)
     Sets the response post processing manager.
public  voidsetSessionIdCookieRequired(boolean sessionIdCookie)
    
public  voidsetSessionIdEncodeUrlRequired(boolean sessionIdUrl)
    
public  voidsetSessionKey(String sessionKey)
    
public  voidsetSessionManager(SessionManager sessionManager)
    
public  voidsetStatus(int sc, String sm)
     Sets the status code and message for this response.
public  voidsetStatus(int sc)
     Sets the status code and a default message for this response.
public  voidwriteDOM(OutputOptions outputOptions, Node document)
     Output an an XML document object (DOM).
public  voidwriteDOM(Node document)
     Output an an XML document object (DOM).
public  voidwriteHTML(String html)
     Utility method to output an HTML page.
public  voidwriteHTML(HTMLDocument doc)
     Utility method to output an HTML page from a DOM object.

Field Detail
SC_ACCEPTED
final public static int SC_ACCEPTED(Code)
Status code (202) indicating that a request was accepted for processing, but was not completed.



SC_BAD_GATEWAY
final public static int SC_BAD_GATEWAY(Code)
Status code (502) indicating that the HTTP server received an invalid response from a server it consulted when acting as a proxy or gateway.



SC_BAD_REQUEST
final public static int SC_BAD_REQUEST(Code)
Status code (400) indicating the request sent by the client was syntactically incorrect.



SC_CREATED
final public static int SC_CREATED(Code)
Status code (201) indicating the request succeeded and created a new resource on the server.



SC_FORBIDDEN
final public static int SC_FORBIDDEN(Code)
Status code (403) indicating the server understood the request but refused to fulfill it.



SC_INTERNAL_SERVER_ERROR
final public static int SC_INTERNAL_SERVER_ERROR(Code)
Status code (500) indicating an error inside the HTTP service which prevented it from fulfilling the request.



SC_MOVED_PERMANENTLY
final public static int SC_MOVED_PERMANENTLY(Code)
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.



SC_MOVED_TEMPORARILY
final public static int SC_MOVED_TEMPORARILY(Code)
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.



SC_NOT_FOUND
final public static int SC_NOT_FOUND(Code)
Status code (404) indicating that the requested resource is not available.



SC_NOT_IMPLEMENTED
final public static int SC_NOT_IMPLEMENTED(Code)
Status code (501) indicating the HTTP service does not support the functionality needed to fulfill the request.



SC_NOT_MODIFIED
final public static int SC_NOT_MODIFIED(Code)
Status code (304) indicating that a conditional GET operation found that the resource was available and not modified.



SC_NO_CONTENT
final public static int SC_NO_CONTENT(Code)
Status code (204) indicating that the request succeeded but that there was no new information to return.



SC_OK
final public static int SC_OK(Code)
Status code (200) indicating the request succeeded normally.



SC_SERVICE_UNAVAILABLE
final public static int SC_SERVICE_UNAVAILABLE(Code)
Status code (503) indicating that the HTTP service is temporarily overloaded, and unable to handle the request.



SC_UNAUTHORIZED
final public static int SC_UNAUTHORIZED(Code)
Status code (401) indicating that the request requires HTTP authentication.





Method Detail
addCookie
public void addCookie(Cookie cookie) throws HttpPresentationException(Code)
Adds the specified cookie to the response. It can be called multiple times to set more than one cookie.
Parameters:
  cookie - - The Cookie to return to the client.



containsHeader
public boolean containsHeader(String name) throws HttpPresentationException(Code)
Returns true if the response message header has a field with the specified name.
Parameters:
  name - the header field name



createOutputOptions
public OutputOptions createOutputOptions(XMLObject document) throws HttpPresentationException(Code)
Create an OutputOptions object for a document. Options are default for the specified document. The object maybe then modified as needed to override the default values.

The following attributes are set in the object:

  • encoding
  • MIME type - Defaults for document.
  • URLRewriter - Set if URL encoding of sessions is enabled.



flush
public void flush() throws HttpPresentationException(Code)
Called at the end of processing a response to force any cached headers to be written and buffers flushed. This maybe a no-op if no buffering is implemented. This is normally not called by a client.



getEncoding
public String getEncoding()(Code)
Get the output character encoding. the current encoding



getHttpServletResponse
public HttpServletResponse getHttpServletResponse()(Code)
Returns the original HttpServletResponse.



getOutputStream
public HttpPresentationOutputStream getOutputStream() throws HttpPresentationException(Code)
Returns an output stream for writing response data.



getPostProcessingManager
public ResponsePostProcessingManager getPostProcessingManager()(Code)
Returns the response post processing manager.



isSessionIdCookieRequired
public boolean isSessionIdCookieRequired() throws HttpPresentationException(Code)
Indicates whether client response requires a sessionId cookie true if client response requires a sessionId cookiefalse otherwise



isSessionIdEncodeUrlRequired
public boolean isSessionIdEncodeUrlRequired() throws HttpPresentationException(Code)
Indicates whether client response requires url encoding for sessionId true if client response requires url encoding forsessionId; false otherwise



sendError
public void sendError(int sc, String msg) throws HttpPresentationException(Code)
Sends an error response to the client using the specified status code and descriptive message.
Parameters:
  sc - the status code
Parameters:
  msg - the detail message



sendError
public void sendError(int sc) throws HttpPresentationException(Code)
Sends an error response to the client using the specified status code and a default message.
Parameters:
  sc - the status code



setContentLength
public void setContentLength(int len) throws HttpPresentationException(Code)
Sets the content length for this response.
Parameters:
  len - the content length



setContentType
public void setContentType(String type) throws HttpPresentationException(Code)
Sets the content type for this response.
Parameters:
  type - the content's MIME type



setDateHeader
public void setDateHeader(String name, long date) throws HttpPresentationException(Code)
Adds a field to the response header with a given name and date-valued field. The date is specified in terms of milliseconds since the epoch. If the date field had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.
Parameters:
  name - the header field name
Parameters:
  value - the header field date value



setEncoding
public void setEncoding(String enc)(Code)
Set the output character encoding.
Parameters:
  enc - character encoding



setHeader
public void setHeader(String name, String value) throws HttpPresentationException(Code)
Adds a field to the response header with a given name and value. If the field had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.
Parameters:
  name - the header field name
Parameters:
  value - the header field value



setIntHeader
public void setIntHeader(String name, int value) throws HttpPresentationException(Code)
Adds a field to the response header with a given name and integer value. If the field had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.
Parameters:
  name - the header field name
Parameters:
  value - the header field integer value



setPostProcessingManager
public void setPostProcessingManager(ResponsePostProcessingManager processingManager)(Code)
Sets the response post processing manager.
Parameters:
  processingManager -



setSessionIdCookieRequired
public void setSessionIdCookieRequired(boolean sessionIdCookie) throws HttpPresentationException(Code)



setSessionIdEncodeUrlRequired
public void setSessionIdEncodeUrlRequired(boolean sessionIdUrl) throws HttpPresentationException(Code)



setSessionKey
public void setSessionKey(String sessionKey)(Code)
Sets the current session key for this response
Parameters:
  sessionKey - The current sessionKey



setSessionManager
public void setSessionManager(SessionManager sessionManager)(Code)
Sets the current application name for this response
Parameters:
  appName - The current application name



setStatus
public void setStatus(int sc, String sm) throws HttpPresentationException(Code)
Sets the status code and message for this response.
Parameters:
  sc - the status code
Parameters:
  sm - the status message



setStatus
public void setStatus(int sc) throws HttpPresentationException(Code)
Sets the status code and a default message for this response.
Parameters:
  sc - the status code



writeDOM
public void writeDOM(OutputOptions outputOptions, Node document) throws HttpPresentationException(Code)
Output an an XML document object (DOM). The document is formatted according to it's type. The MIME type of the response is automatically set.
Parameters:
  outputFormat - Object use to specify options controling formattingof the document.
Parameters:
  doc - The DOM object to be returned as response.



writeDOM
public void writeDOM(Node document) throws HttpPresentationException(Code)
Output an an XML document object (DOM). The document is formatted according to it's type. The MIME type of the response is automatically set.
Parameters:
  doc - The DOM object to be returned as response.



writeHTML
public void writeHTML(String html) throws HttpPresentationException(Code)
Utility method to output an HTML page. The appropriate headers are set for MIME type and to disable caching of the HTML by the broswer.



writeHTML
public void writeHTML(HTMLDocument doc) throws HttpPresentationException(Code)
Utility method to output an HTML page from a DOM object. The appropriate headers are set for MIME type and to disable caching of the HTML by the broswer.
Parameters:
  doc - The DOM object to be returned as response
See Also:   HttpPresentationResponse.writeDOM



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.