Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.connector
Class HttpResponseWrapper

    java.lang.Object
      |
      +--org.apache.catalina.connector.ResponseWrapper
            |
            +--org.apache.catalina.connector.HttpResponseWrapper

All Implemented Interfaces:
  HttpResponse, Response

public abstract class HttpResponseWrapper
extends ResponseWrapper
implements HttpResponse

Abstract convenience class that wraps a Catalina-internal HttpResponse object. By default, all methods are delegated to the wrapped response, but subclasses can override individual methods as required to provide the functionality that they require.

Version:
  $Revision: 1.3 $ $Date: 2001/07/22 20:25:06 $
Author:
  Craig R. McClanahan

Field Summary

Fields inherited from class org.apache.catalina.connector.ResponseWrapper
`response`

Constructor Summary
`HttpResponseWrapper(HttpResponse response)` Construct a wrapper for the specified response.

Method Summary
`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 class org.apache.catalina.connector.ResponseWrapper
`createOutputStream, finishResponse, getConnector, getContentCount, getContentLength, getContentType, getContext, getIncluded, getInfo, getReporter, getRequest, getResponse, getStream, getWrappedResponse, recycle, resetBuffer, setConnector, setContext, setIncluded, setRequest, setStream`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.catalina.HttpResponse
`getCookies`

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`

Constructor Detail

### HttpResponseWrapper

    public HttpResponseWrapper(HttpResponse response)

  Construct a wrapper for the specified response.

Parameters:
  `response` - The response to be wrapped

Method Detail

### 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.

  Specified by:
    `getHeader` in interface `HttpResponse`
  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.

  Specified by:
    `getHeaderNames` in interface `HttpResponse`

### 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.

  Specified by:
    `getHeaderValues` in interface `HttpResponse`
  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.

  Specified by:
    `getMessage` in interface `HttpResponse`

### getStatus

    public int getStatus()

  Return the HTTP status code associated with this Response.

  Specified by:
    `getStatus` in interface `HttpResponse`

### 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.

  Specified by:
    `reset` in interface `HttpResponse`
  Throws:
    `java.lang.IllegalStateException` - if this response has already been committed

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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