Java Doc for HttpResponseBase.java in  » Web-Server » Rimfaxe-Web-Server » org » apache » catalina » connector » 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 » Web Server » Rimfaxe Web Server » org.apache.catalina.connector 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.catalina.connector.ResponseBase
      org.apache.catalina.connector.HttpResponseBase

All known Subclasses:   org.apache.catalina.connector.http.HttpResponseImpl,  org.apache.catalina.connector.http10.HttpResponseImpl,
HttpResponseBase
public class HttpResponseBase extends ResponseBase implements HttpResponse,HttpServletResponse(Code)
Convenience base implementation of the HttpResponse interface, which can be used for the Response implementation required by most Connectors that deal with HTTP. Only the connector-specific methods need to be implemented.
author:
   Craig R. McClanahan
author:
   Remy Maucherat
version:
   $Revision: 1.54 $ $Date: 2002/04/05 18:43:12 $

Inner Class :protected class PrivilegedFlushBuffer implements PrivilegedExceptionAction

Field Summary
protected  ArrayListcookies
     The set of Cookies associated with this Response.
protected  HttpResponseFacadefacade
     The facade associated with this response.
final protected  SimpleDateFormatformat
     The date format we will use for creating date headers.
protected  HashMapheaders
     The HTTP headers explicitly added via addHeader(), but not including those to be added with setContentLength(), setContentType(), and so on.
final protected static  Stringinfo
     Descriptive information about this HttpResponse implementation.
protected  Stringmessage
     The error message set by sendError().
protected  intstatus
     The HTTP status code associated with this Response.
final protected static  TimeZonezone
     The time zone with which to construct date headers.

Constructor Summary
public  HttpResponseBase()
    

Method Summary
public  voidaddCookie(Cookie cookie)
     Add the specified Cookie to those that will be included with this Response.
public  voidaddDateHeader(String name, long value)
     Add the specified date header to the specified value.
public  voidaddHeader(String name, String value)
     Add the specified header to the specified value.
public  voidaddIntHeader(String name, int value)
     Add the specified integer header to the specified value.
public  booleancontainsHeader(String name)
    
public  StringencodeRedirectURL(String url)
     Encode the session identifier associated with this response into the specified redirect URL, if necessary.
public  StringencodeRedirectUrl(String url)
     Encode the session identifier associated with this response into the specified redirect URL, if necessary.
public  StringencodeURL(String url)
     Encode the session identifier associated with this response into the specified URL, if necessary.
public  StringencodeUrl(String url)
     Encode the session identifier associated with this response into the specified URL, if necessary.
public  voidfinishResponse()
     Perform whatever actions are required to flush and close the output stream or writer, in a single operation.
public  voidflushBuffer()
     Flush the buffer and commit this response.
public  Cookie[]getCookies()
     Return an array of all cookies set for this response, or a zero-length array if no cookies have been set.
public  StringgetHeader(String name)
     Return the value for the specified header, or null if this header has not been set.
public  String[]getHeaderNames()
     Return an array of all the header names set for this response, or a zero-length array if no headers have been set.
public  String[]getHeaderValues(String name)
     Return an array of all the header values associated with the specified header name, or an zero-length array if there are no such header values.
public  StringgetMessage()
     Return the error message that was set with sendError() for this Response.
protected  StringgetProtocol()
     Return the HTTP protocol version implemented by this response object.
public  ServletResponsegetResponse()
     Return the ServletResponse for which this object is the facade.
public  intgetStatus()
     Return the HTTP status code associated with this Response.
protected  StringgetStatusMessage(int status)
     Returns a default status message for the specified HTTP status code.
public  voidrecycle()
     Release all object references, and initialize instance variables, in preparation for reuse of this object.
public  voidreset(int status, String message)
     Reset this response, and specify the values for the HTTP status code and corresponding message.
public  voidreset()
     Clear any content written to the buffer.
public  voidsendAcknowledgement()
     Send an acknowledgment of a request.
public  voidsendError(int status)
     Send an error response with the specified status and a default message.
public  voidsendError(int status, String message)
     Send an error response with the specified status and message.
protected  voidsendHeaders()
     Send the HTTP response headers, if this has not already occurred.
public  voidsendRedirect(String location)
     Send a temporary redirect to the specified redirect location URL.
public  voidsetContentLength(int length)
     Set the content length (in bytes) for this Response.
public  voidsetContentType(String type)
     Set the content type for this Response.
public  voidsetDateHeader(String name, long value)
     Set the specified date header to the specified value.
public  voidsetHeader(String name, String value)
     Set the specified header to the specified value.
public  voidsetIntHeader(String name, int value)
     Set the specified integer header to the specified value.
public  voidsetLocale(Locale locale)
     Set the Locale that is appropriate for this response, including setting the appropriate character encoding.
public  voidsetStatus(int status)
     Set the HTTP status to be returned with this response.
public  voidsetStatus(int status, String message)
     Set the HTTP status and message to be returned with this response.

Field Detail
cookies
protected ArrayList cookies(Code)
The set of Cookies associated with this Response.



facade
protected HttpResponseFacade facade(Code)
The facade associated with this response.



format
final protected SimpleDateFormat format(Code)
The date format we will use for creating date headers.



headers
protected HashMap headers(Code)
The HTTP headers explicitly added via addHeader(), but not including those to be added with setContentLength(), setContentType(), and so on. This collection is keyed by the header name, and the elements are ArrayLists containing the associated values that have been set.



info
final protected static String info(Code)
Descriptive information about this HttpResponse implementation.



message
protected String message(Code)
The error message set by sendError().



status
protected int status(Code)
The HTTP status code associated with this Response.



zone
final protected static TimeZone zone(Code)
The time zone with which to construct date headers.




Constructor Detail
HttpResponseBase
public HttpResponseBase()(Code)




Method Detail
addCookie
public void addCookie(Cookie cookie)(Code)
Add the specified Cookie to those that will be included with this Response.
Parameters:
  cookie - Cookie to be added



addDateHeader
public void addDateHeader(String name, long value)(Code)
Add the specified date header to the specified value.
Parameters:
  name - Name of the header to set
Parameters:
  value - Date value to be set



addHeader
public void addHeader(String name, String value)(Code)
Add the specified header to the specified value.
Parameters:
  name - Name of the header to set
Parameters:
  value - Value to be set



addIntHeader
public void addIntHeader(String name, int value)(Code)
Add the specified integer header to the specified value.
Parameters:
  name - Name of the header to set
Parameters:
  value - Integer value to be set



containsHeader
public boolean containsHeader(String name)(Code)
Has the specified header been set already in this response?
Parameters:
  name - Name of the header to check



encodeRedirectURL
public String encodeRedirectURL(String url)(Code)
Encode the session identifier associated with this response into the specified redirect URL, if necessary.
Parameters:
  url - URL to be encoded



encodeRedirectUrl
public String encodeRedirectUrl(String url)(Code)
Encode the session identifier associated with this response into the specified redirect URL, if necessary.
Parameters:
  url - URL to be encoded



encodeURL
public String encodeURL(String url)(Code)
Encode the session identifier associated with this response into the specified URL, if necessary.
Parameters:
  url - URL to be encoded



encodeUrl
public String encodeUrl(String url)(Code)
Encode the session identifier associated with this response into the specified URL, if necessary.
Parameters:
  url - URL to be encoded



finishResponse
public void finishResponse() throws IOException(Code)
Perform whatever actions are required to flush and close the output stream or writer, in a single operation.
exception:
  IOException - if an input/output error occurs



flushBuffer
public void flushBuffer() throws IOException(Code)
Flush the buffer and commit this response. If this is the first output, send the HTTP headers prior to the user data.
exception:
  IOException - if an input/output error occurs



getCookies
public Cookie[] getCookies()(Code)
Return an array of all cookies set for this response, or a zero-length array if no cookies have been set.



getHeader
public String getHeader(String name)(Code)
Return the value for the specified header, or null if this header has not been set. If more than one value was added for this name, only the first is returned; use getHeaderValues() to retrieve all of them.
Parameters:
  name - Header name to look up



getHeaderNames
public String[] getHeaderNames()(Code)
Return an array of all the header names set for this response, or a zero-length array if no headers have been set.



getHeaderValues
public String[] getHeaderValues(String name)(Code)
Return an array of all the header values associated with the specified header name, or an zero-length array if there are no such header values.
Parameters:
  name - Header name to look up



getMessage
public String getMessage()(Code)
Return the error message that was set with sendError() for this Response.



getProtocol
protected String getProtocol()(Code)
Return the HTTP protocol version implemented by this response object. (This method must be overridden by subclasses of this as to correctly return the highest HTTP version number supported as specified in Section 3.1 of RFC-2616). A string in the form of "HTTP/1.0" ...



getResponse
public ServletResponse getResponse()(Code)
Return the ServletResponse for which this object is the facade.



getStatus
public int getStatus()(Code)
Return the HTTP status code associated with this Response.



getStatusMessage
protected String getStatusMessage(int status)(Code)
Returns a default status message for the specified HTTP status code.
Parameters:
  status - The status code for which a message is desired



recycle
public void recycle()(Code)
Release all object references, and initialize instance variables, in preparation for reuse of this object.



reset
public void reset(int status, String message)(Code)
Reset this response, and specify the values for the HTTP status code and corresponding message.
exception:
  IllegalStateException - if this response has already beencommitted



reset
public void reset()(Code)
Clear any content written to the buffer. In addition, all cookies and headers are cleared, and the status is reset.
exception:
  IllegalStateException - if this response has alreadybeen committed



sendAcknowledgement
public void sendAcknowledgement() throws IOException(Code)
Send an acknowledgment of a request.
exception:
  IOException - if an input/output error occurs



sendError
public void sendError(int status) throws IOException(Code)
Send an error response with the specified status and a default message.
Parameters:
  status - HTTP status code to send
exception:
  IllegalStateException - if this response hasalready been committed
exception:
  IOException - if an input/output error occurs



sendError
public void sendError(int status, String message) throws IOException(Code)
Send an error response with the specified status and message.
Parameters:
  status - HTTP status code to send
Parameters:
  message - Corresponding message to send
exception:
  IllegalStateException - if this response hasalready been committed
exception:
  IOException - if an input/output error occurs



sendHeaders
protected void sendHeaders() throws IOException(Code)
Send the HTTP response headers, if this has not already occurred.



sendRedirect
public void sendRedirect(String location) throws IOException(Code)
Send a temporary redirect to the specified redirect location URL.
Parameters:
  location - Location URL to redirect to
exception:
  IllegalStateException - if this response hasalready been committed
exception:
  IOException - if an input/output error occurs



setContentLength
public void setContentLength(int length)(Code)
Set the content length (in bytes) for this Response.
Parameters:
  length - The new content length



setContentType
public void setContentType(String type)(Code)
Set the content type for this Response.
Parameters:
  type - The new content type



setDateHeader
public void setDateHeader(String name, long value)(Code)
Set the specified date header to the specified value.
Parameters:
  name - Name of the header to set
Parameters:
  value - Date value to be set



setHeader
public void setHeader(String name, String value)(Code)
Set the specified header to the specified value.
Parameters:
  name - Name of the header to set
Parameters:
  value - Value to be set



setIntHeader
public void setIntHeader(String name, int value)(Code)
Set the specified integer header to the specified value.
Parameters:
  name - Name of the header to set
Parameters:
  value - Integer value to be set



setLocale
public void setLocale(Locale locale)(Code)
Set the Locale that is appropriate for this response, including setting the appropriate character encoding.
Parameters:
  locale - The new locale



setStatus
public void setStatus(int status)(Code)
Set the HTTP status to be returned with this response.
Parameters:
  status - The new HTTP status



setStatus
public void setStatus(int status, String message)(Code)
Set the HTTP status and message to be returned with this response.
Parameters:
  status - The new HTTP status
Parameters:
  message - The associated text message



Fields inherited from org.apache.catalina.connector.ResponseBase
protected boolean appCommitted(Code)(Java Doc)
protected byte[] buffer(Code)(Java Doc)
protected int bufferCount(Code)(Java Doc)
protected boolean committed(Code)(Java Doc)
protected Connector connector(Code)(Java Doc)
protected int contentCount(Code)(Java Doc)
protected int contentLength(Code)(Java Doc)
protected String contentType(Code)(Java Doc)
protected Context context(Code)(Java Doc)
protected String encoding(Code)(Java Doc)
protected boolean error(Code)(Java Doc)
protected ResponseFacade facade(Code)(Java Doc)
protected boolean included(Code)(Java Doc)
final protected static String info(Code)(Java Doc)
protected Locale locale(Code)(Java Doc)
protected OutputStream output(Code)(Java Doc)
protected Request request(Code)(Java Doc)
protected static StringManager sm(Code)(Java Doc)
protected ServletOutputStream stream(Code)(Java Doc)
protected boolean suspended(Code)(Java Doc)
protected PrintWriter writer(Code)(Java Doc)

Methods inherited from org.apache.catalina.connector.ResponseBase
public ServletOutputStream createOutputStream() throws IOException(Code)(Java Doc)
public void finishResponse() throws IOException(Code)(Java Doc)
public void flushBuffer() throws IOException(Code)(Java Doc)
public int getBufferSize()(Code)(Java Doc)
public String getCharacterEncoding()(Code)(Java Doc)
public Connector getConnector()(Code)(Java Doc)
public int getContentCount()(Code)(Java Doc)
public int getContentLength()(Code)(Java Doc)
public String getContentType()(Code)(Java Doc)
public Context getContext()(Code)(Java Doc)
public boolean getIncluded()(Code)(Java Doc)
public String getInfo()(Code)(Java Doc)
public Locale getLocale()(Code)(Java Doc)
public ServletOutputStream getOutputStream() throws IOException(Code)(Java Doc)
public PrintWriter getReporter()(Code)(Java Doc)
public Request getRequest()(Code)(Java Doc)
public ServletResponse getResponse()(Code)(Java Doc)
public OutputStream getStream()(Code)(Java Doc)
public PrintWriter getWriter() throws IOException(Code)(Java Doc)
public boolean isAppCommitted()(Code)(Java Doc)
public boolean isCommitted()(Code)(Java Doc)
public boolean isError()(Code)(Java Doc)
public boolean isSuspended()(Code)(Java Doc)
public void recycle()(Code)(Java Doc)
public void reset()(Code)(Java Doc)
public void resetBuffer()(Code)(Java Doc)
public void setAppCommitted(boolean appCommitted)(Code)(Java Doc)
public void setBufferSize(int size)(Code)(Java Doc)
public void setConnector(Connector connector)(Code)(Java Doc)
public void setContentLength(int length)(Code)(Java Doc)
public void setContentType(String type)(Code)(Java Doc)
public void setContext(Context context)(Code)(Java Doc)
public void setError()(Code)(Java Doc)
public void setIncluded(boolean included)(Code)(Java Doc)
public void setLocale(Locale locale)(Code)(Java Doc)
public void setRequest(Request request)(Code)(Java Doc)
public void setStream(OutputStream stream)(Code)(Java Doc)
public void setSuspended(boolean suspended)(Code)(Java Doc)
public void write(int b) throws IOException(Code)(Java Doc)
public void write(byte b) throws IOException(Code)(Java Doc)
public void write(byte b, int off, int len) throws IOException(Code)(Java Doc)

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.