HttpResponse (Catalina Internal API Documentation)

org.apache.catalina
Interface HttpResponse

All Superinterfaces:
Response
All Known Implementing Classes:
HttpResponseBase, HttpResponseWrapper

public interface HttpResponse
extends Response

An HttpResponse is the Catalina-internal facade for an HttpServletResponse that is to be produced, based on the processing of a corresponding HttpRequest.

Version:
$Revision: 1.5 $ $Date: 2001/07/22 20:13:30 $
Author:
Craig R. McClanahan

Method Summary
 javax.servlet.http.Cookie[] getCookies()
          Return an array of all cookies set for this response, or a zero-length array if no cookies have been set.
 java.lang.String getHeader(java.lang.String name)
          Return the value for the specified header, or null if this header has not been set.
 java.lang.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.
 java.lang.String[] getHeaderValues(java.lang.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.
 java.lang.String getMessage()
          Return the error message that was set with sendError() for this Response.
 int getStatus()
          Return the HTTP status code associated with this Response.
 void reset(int status, java.lang.String message)
          Reset this response, and specify the values for the HTTP status code and corresponding message.
 
Methods inherited from interface org.apache.catalina.Response
createOutputStream, finishResponse, getConnector, getContentCount, getContentLength, getContentType, getContext, getIncluded, getInfo, getReporter, getRequest, getResponse, getStream, isAppCommitted, isError, isSuspended, recycle, resetBuffer, setAppCommitted, setConnector, setContext, setError, setIncluded, setRequest, setStream, setSuspended
 

Method Detail

getCookies


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


getHeader


public java.lang.String getHeader(java.lang.String name)
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 java.lang.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.


getHeaderValues


public java.lang.String[] getHeaderValues(java.lang.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.

Parameters:
name - Header name to look up

getMessage


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


getStatus


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


reset


public void reset(int status,
                  java.lang.String message)
Reset this response, and specify the values for the HTTP status code and corresponding message.

Throws:
java.lang.IllegalStateException - if this response has already been committed


Copyright © 2000-2001 Apache Software Foundation. All Rights Reserved.