Java Doc for ServletHttpPresentationResponse.java in  » J2EE » Enhydra-Application-Framework » com » lutris » appserver » server » httpPresentation » servlet » 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.servlet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.lutris.appserver.server.httpPresentation.servlet.ServletHttpPresentationResponse

ServletHttpPresentationResponse
public class ServletHttpPresentationResponse implements HttpPresentationResponse(Code)
Object passed to presentation objects that is used to generate HTTP responses.



Constructor Summary
protected  ServletHttpPresentationResponse(HttpServletResponse response, PrintWriter domStatsLogWriter)
     Construct an object associated with a servlet response.

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  StringencodeRedirectUrl(String url)
     Encodes a url with session id for sendRedirect for use with cookieless browsers.
Parameters:
  url - the url to be encoded.
public  StringencodeUrl(String url)
     Encodes a url with session id for use with cookieless browsers.
Parameters:
  url - the url to be encoded.
public  voidflush()
     Called at the end of processing a response to force any cached headers to be written and buffers flushed.
public  intgetContentLength()
     Returns the size of the request entity data, or -1 if not available.
public  StringgetContentType()
     Returns the Internet Media Type of the response, or null if not known This is necessary to support the DebugResponse interface.
public  Cookie[]getCookies()
     Returns an array of cookies to be set by this response, or a 0 length array if the information is not available.
public  StringgetEncoding()
     Get the output character encoding.
public  StringgetHeader(String name)
     Returns the values of the specified header for the response as an array of strings, or a 0 length array if the named header does not exist.
public  EnumerationgetHeaderNames()
     Returns an array of strings representing the header names for this response.
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  StringgetResponseData()
     Returns null.
public  intgetStatusCode()
     Returns the status code for the response, or -1 if not available.
public  StringgetStatusMessage()
     Returns the status message for the response, or null if not available.
public  intgetTotalBytes()
     Returns the total number of bytes that make up this response.
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)
     Sets the session manager.
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 XMLC document object (DOM).
public  voidwriteDOM(Node document)
     Output an an XMLC 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.


Constructor Detail
ServletHttpPresentationResponse
protected ServletHttpPresentationResponse(HttpServletResponse response, PrintWriter domStatsLogWriter)(Code)
Construct an object associated with a servlet response.
Parameters:
  response - Servlet response object that this object will front-end.




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.



encodeRedirectUrl
public String encodeRedirectUrl(String url)(Code)
Encodes a url with session id for sendRedirect for use with cookieless browsers.
Parameters:
  url - the url to be encoded. the encoded URL if encoding is needed; the unchanged URLotherwise.
See Also:   ServletHttpPresentationResponse.sendRedirect
See Also:   ServletHttpPresentationResponse.encodeUrl



encodeUrl
public String encodeUrl(String url)(Code)
Encodes a url with session id for use with cookieless browsers.
Parameters:
  url - the url to be encoded. the encoded URL if encoding is needed; the unchanged URLotherwise.



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.



getContentLength
public int getContentLength()(Code)
Returns the size of the request entity data, or -1 if not available. This is necessary to support the DebugResponse interface.
See Also:   com.lutris.http.debug.DebugResponse the content length.



getContentType
public String getContentType()(Code)
Returns the Internet Media Type of the response, or null if not known This is necessary to support the DebugResponse interface.
See Also:   com.lutris.http.debug.DebugResponse the content type.



getCookies
public Cookie[] getCookies()(Code)
Returns an array of cookies to be set by this response, or a 0 length array if the information is not available. This is necessary to support the DebugResponse interface.
See Also:   com.lutris.http.debug.DebugResponse The array of cookies found in this response.



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



getHeader
public String getHeader(String name)(Code)
Returns the values of the specified header for the response as an array of strings, or a 0 length array if the named header does not exist. This is necessary to support the DebugResponse interface.
See Also:   com.lutris.http.debug.DebugResponse
Parameters:
  name - the case-insensitive header field name the value of the supplied header.



getHeaderNames
public Enumeration getHeaderNames()(Code)
Returns an array of strings representing the header names for this response. This does not have return cookies - use getCookies().
See Also:   com.lutris.http.debug.DebugResponse name the case-insensitive header field name



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.



getResponseData
public String getResponseData()(Code)
Returns null. Normally this function returns the data written to the output stream associated with this request.



getStatusCode
public int getStatusCode()(Code)
Returns the status code for the response, or -1 if not available. This is necessary to support the DebugResponse interface.
See Also:   com.lutris.http.debug.DebugResponse the status code.



getStatusMessage
public String getStatusMessage()(Code)
Returns the status message for the response, or null if not available. This is necessary to support the DebugResponse interface.
See Also:   com.lutris.http.debug.DebugResponse the status message.



getTotalBytes
public int getTotalBytes()(Code)
Returns the total number of bytes that make up this response. This is not supported for Jolt Presentations and is necessary to support the DebugResponse interface.
See Also:   com.lutris.http.debug.DebugResponse the total number of bytes in the response.



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 session manager.



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 XMLC 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 controlling formatting of thedocument.
Parameters:
  doc - The DOM object to be returned as response.



writeDOM
public void writeDOM(Node document) throws HttpPresentationException(Code)
Output an an XMLC 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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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