ResponseWrapper (Catalina Internal API Documentation)

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 ResponseWrapper

    java.lang.Object
      org.apache.catalina.connector.ResponseWrapper

All Implemented Interfaces:
  Response

Direct Known Subclasses:
  HttpResponseWrapper

public abstract class ResponseWrapper
extends java.lang.Object
implements Response

Abstract convenience class that wraps a Catalina-internal Response 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.4 $ $Date: 2004/08/26 21:30:19 $
Author:
  Craig R. McClanahan

Field Summary
`protected Response` | `response` Deprecated. The wrapped response.

Constructor Summary
`ResponseWrapper(Response response)` Deprecated. Construct a wrapper for the specified response.

Method Summary
`javax.servlet.ServletOutputStream` | `createOutputStream()` Deprecated. Create and return a ServletOutputStream to write the content associated with this Response.
`void` | `finishResponse()` Deprecated. Perform whatever actions are required to flush and close the output stream or writer, in a single operation.
`Connector` | `getConnector()` Deprecated. Return the Connector through which this Response is returned.
`int` | `getContentCount()` Deprecated. Return the number of bytes actually written to the output stream.
`int` | `getContentLength()` Deprecated. Return the content length that was set or calculated for this Response.
`java.lang.String` | `getContentType()` Deprecated. Return the content type that was set or calculated for this response, or `null` if no content type was set.
`Context` | `getContext()` Deprecated. Return the Context with which this Response is associated.
`boolean` | `getIncluded()` Deprecated. Return the "processing inside an include" flag.
`java.lang.String` | `getInfo()` Deprecated. Return descriptive information about this Response implementation and the corresponding version number, in the format `<description>/<version>`.
`java.io.PrintWriter` | `getReporter()` Deprecated. Return a PrintWriter that can be used to render error messages, regardless of whether a stream or writer has already been acquired.
`Request` | `getRequest()` Deprecated. Return the Request with which this Response is associated.
`javax.servlet.ServletResponse` | `getResponse()` Deprecated. Return the `ServletResponse` for which this object is the facade.
`java.io.OutputStream` | `getStream()` Deprecated. Return the output stream associated with this Response.
`Response` | `getWrappedResponse()` Deprecated. Return the wrapped response.
`void` | `recycle()` Deprecated. Release all object references, and initialize instance variables, in preparation for reuse of this object.
`void` | `resetBuffer()` Deprecated. Reset the data buffer but not any status or header information.
`void` | `setConnector(Connector connector)` Deprecated. Set the Connector through which this Response is returned.
`void` | `setContext(Context context)` Deprecated. Set the Context with which this Response is associated.
`void` | `setIncluded(boolean included)` Deprecated. Set the "processing inside an include" flag.
`void` | `setRequest(Request request)` Deprecated. Set the Request with which this Response is associated.
`void` | `setStream(java.io.OutputStream stream)` Deprecated. Set the output stream associated with this Response.

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.Response
`isAppCommitted, isError, isSuspended, sendAcknowledgement, setAppCommitted, setError, setSuspended`

Field Detail

### response

    protected Response response

  Deprecated.
  The wrapped response.

Constructor Detail

### ResponseWrapper

    public ResponseWrapper(Response response)

  Deprecated.
  Construct a wrapper for the specified response.

Parameters:
  `response` - The response to be wrapped

Method Detail

### getWrappedResponse

    public Response getWrappedResponse()

  Deprecated.
  Return the wrapped response.

### getConnector

    public Connector getConnector()

  Deprecated.
  Return the Connector through which this Response is returned.

  Specified by:
    `getConnector` in interface `Response`

### setConnector

    public void setConnector(Connector connector)

  Deprecated.
  Set the Connector through which this Response is returned.

  Specified by:
    `setConnector` in interface `Response`
  Parameters:
    `connector` - The new connector

### getContentCount

    public int getContentCount()

  Deprecated.
  Return the number of bytes actually written to the output stream.

  Specified by:
    `getContentCount` in interface `Response`

### getContext

    public Context getContext()

  Deprecated.
  Return the Context with which this Response is associated.

  Specified by:
    `getContext` in interface `Response`

### setContext

    public void setContext(Context context)

  Deprecated.
  Set the Context with which this Response is associated. This should be called as soon as the appropriate Context is identified.

  Specified by:
    `setContext` in interface `Response`
  Parameters:
    `context` - The associated Context

### getIncluded

    public boolean getIncluded()

  Deprecated.
  Return the "processing inside an include" flag.

  Specified by:
    `getIncluded` in interface `Response`

### setIncluded

    public void setIncluded(boolean included)

  Deprecated.
  Set the "processing inside an include" flag.

  Specified by:
    `setIncluded` in interface `Response`
  Parameters:
    `included` - `true` if we are currently inside a RequestDispatcher.include(), else `false`

### getInfo

    public java.lang.String getInfo()

  Deprecated.
  Return descriptive information about this Response implementation and the corresponding version number, in the format `<description>/<version>`.

  Specified by:
    `getInfo` in interface `Response`

### getRequest

    public Request getRequest()

  Deprecated.
  Return the Request with which this Response is associated.

  Specified by:
    `getRequest` in interface `Response`

### setRequest

    public void setRequest(Request request)

  Deprecated.
  Set the Request with which this Response is associated.

  Specified by:
    `setRequest` in interface `Response`
  Parameters:
    `request` - The new associated request

### getResponse

    public javax.servlet.ServletResponse getResponse()

  Deprecated.
  Return the `ServletResponse` for which this object is the facade.

  Specified by:
    `getResponse` in interface `Response`

### getStream

    public java.io.OutputStream getStream()

  Deprecated.
  Return the output stream associated with this Response.

  Specified by:
    `getStream` in interface `Response`

### setStream

    public void setStream(java.io.OutputStream stream)

  Deprecated.
  Set the output stream associated with this Response.

  Specified by:
    `setStream` in interface `Response`
  Parameters:
    `stream` - The new output stream

### createOutputStream

    public javax.servlet.ServletOutputStream createOutputStream()
                                                         throws java.io.IOException

  Deprecated.
  Create and return a ServletOutputStream to write the content associated with this Response.

  Specified by:
    `createOutputStream` in interface `Response`
  Throws:
    `java.io.IOException` - if an input/output error occurs

### finishResponse

    public void finishResponse()
                        throws java.io.IOException

  Deprecated.
  Perform whatever actions are required to flush and close the output stream or writer, in a single operation.

  Specified by:
    `finishResponse` in interface `Response`
  Throws:
    `java.io.IOException` - if an input/output error occurs

### getContentLength

    public int getContentLength()

  Deprecated.
  Return the content length that was set or calculated for this Response.

  Specified by:
    `getContentLength` in interface `Response`

### getContentType

    public java.lang.String getContentType()

  Deprecated.
  Return the content type that was set or calculated for this response, or `null` if no content type was set.

  Specified by:
    `getContentType` in interface `Response`

### getReporter

    public java.io.PrintWriter getReporter()

  Deprecated.
  Return a PrintWriter that can be used to render error messages, regardless of whether a stream or writer has already been acquired.

  Specified by:
    `getReporter` in interface `Response`
  Returns:
    Writer which can be used for error reports. If the response is not an error report returned using sendError or triggered by an unexpected exception thrown during the servlet processing (and only in that case), null will be returned if the response stream has already been used.

### recycle

    public void recycle()

  Deprecated.
  Release all object references, and initialize instance variables, in preparation for reuse of this object.

  Specified by:
    `recycle` in interface `Response`

### resetBuffer

    public void resetBuffer()

  Deprecated.
  Reset the data buffer but not any status or header information.

  Specified by:
    `resetBuffer` in interface `Response`

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-2002 Apache Software Foundation. All Rights Reserved.