org.apache.catalina.connector
クラス ResponseWrapper

java.lang.Object
  |
  +--org.apache.catalina.connector.ResponseWrapper
すべての実装インタフェース:
Response
直系の既知のサブクラス:
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.

バージョン:
$Revision: 1.2 $ $Date: 2001/07/22 20:25:06 $
作成者:
Craig R. McClanahan

フィールドの概要
protected  Response response
          The wrapped response.
 
コンストラクタの概要
ResponseWrapper(Response response)
          Construct a wrapper for the specified response.
 
メソッドの概要
 javax.servlet.ServletOutputStream createOutputStream()
          Create and return a ServletOutputStream to write the content associated with this Response.
 void finishResponse()
          Perform whatever actions are required to flush and close the output stream or writer, in a single operation.
 Connector getConnector()
          Return the Connector through which this Response is returned.
 int getContentCount()
          Return the number of bytes actually written to the output stream.
 int getContentLength()
          Return the content length that was set or calculated for this Response.
 java.lang.String getContentType()
          Return the content type that was set or calculated for this response, or null if no content type was set.
 Context getContext()
          Return the Context with which this Response is associated.
 boolean getIncluded()
          Return the "processing inside an include" flag.
 java.lang.String getInfo()
          Return descriptive information about this Response implementation and the corresponding version number, in the format <description>/<version>.
 java.io.PrintWriter getReporter()
          Return a PrintWriter that can be used to render error messages, regardless of whether a stream or writer has already been acquired.
 Request getRequest()
          Return the Request with which this Response is associated.
 javax.servlet.ServletResponse getResponse()
          Return the ServletResponse for which this object is the facade.
 java.io.OutputStream getStream()
          Return the output stream associated with this Response.
 Response getWrappedResponse()
          Return the wrapped response.
 void recycle()
          Release all object references, and initialize instance variables, in preparation for reuse of this object.
 void resetBuffer()
          Reset the data buffer but not any status or header information.
 void setConnector(Connector connector)
          Set the Connector through which this Response is returned.
 void setContext(Context context)
          Set the Context with which this Response is associated.
 void setIncluded(boolean included)
          Set the "processing inside an include" flag.
 void setRequest(Request request)
          Set the Request with which this Response is associated.
 void setStream(java.io.OutputStream stream)
          Set the output stream associated with this Response.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース org.apache.catalina.Response から継承したメソッド
isAppCommitted, isError, isSuspended, setAppCommitted, setError, setSuspended
 

フィールドの詳細

response

protected Response response
The wrapped response.
コンストラクタの詳細

ResponseWrapper

public ResponseWrapper(Response response)
Construct a wrapper for the specified response.
パラメータ:
response - The response to be wrapped
メソッドの詳細

getWrappedResponse

public Response getWrappedResponse()
Return the wrapped response.

getConnector

public Connector getConnector()
Return the Connector through which this Response is returned.
定義:
インタフェース Response 内の getConnector

setConnector

public void setConnector(Connector connector)
Set the Connector through which this Response is returned.
定義:
インタフェース Response 内の setConnector
パラメータ:
connector - The new connector

getContentCount

public int getContentCount()
Return the number of bytes actually written to the output stream.
定義:
インタフェース Response 内の getContentCount

getContext

public Context getContext()
Return the Context with which this Response is associated.
定義:
インタフェース Response 内の getContext

setContext

public void setContext(Context context)
Set the Context with which this Response is associated. This should be called as soon as the appropriate Context is identified.
定義:
インタフェース Response 内の setContext
パラメータ:
context - The associated Context

getIncluded

public boolean getIncluded()
Return the "processing inside an include" flag.
定義:
インタフェース Response 内の getIncluded

setIncluded

public void setIncluded(boolean included)
Set the "processing inside an include" flag.
定義:
インタフェース Response 内の setIncluded
パラメータ:
included - true if we are currently inside a RequestDispatcher.include(), else false

getInfo

public java.lang.String getInfo()
Return descriptive information about this Response implementation and the corresponding version number, in the format <description>/<version>.
定義:
インタフェース Response 内の getInfo

getRequest

public Request getRequest()
Return the Request with which this Response is associated.
定義:
インタフェース Response 内の getRequest

setRequest

public void setRequest(Request request)
Set the Request with which this Response is associated.
定義:
インタフェース Response 内の setRequest
パラメータ:
request - The new associated request

getResponse

public javax.servlet.ServletResponse getResponse()
Return the ServletResponse for which this object is the facade.
定義:
インタフェース Response 内の getResponse

getStream

public java.io.OutputStream getStream()
Return the output stream associated with this Response.
定義:
インタフェース Response 内の getStream

setStream

public void setStream(java.io.OutputStream stream)
Set the output stream associated with this Response.
定義:
インタフェース Response 内の setStream
パラメータ:
stream - The new output stream

createOutputStream

public javax.servlet.ServletOutputStream createOutputStream()
                                                     throws java.io.IOException
Create and return a ServletOutputStream to write the content associated with this Response.
定義:
インタフェース Response 内の createOutputStream
例外:
java.io.IOException - if an input/output error occurs

finishResponse

public void finishResponse()
                    throws java.io.IOException
Perform whatever actions are required to flush and close the output stream or writer, in a single operation.
定義:
インタフェース Response 内の finishResponse
例外:
java.io.IOException - if an input/output error occurs

getContentLength

public int getContentLength()
Return the content length that was set or calculated for this Response.
定義:
インタフェース Response 内の getContentLength

getContentType

public java.lang.String getContentType()
Return the content type that was set or calculated for this response, or null if no content type was set.
定義:
インタフェース Response 内の getContentType

getReporter

public java.io.PrintWriter getReporter()
Return a PrintWriter that can be used to render error messages, regardless of whether a stream or writer has already been acquired.
定義:
インタフェース Response 内の getReporter
インタフェース org.apache.catalina.Response からコピーされたタグ:
戻り値:
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()
Release all object references, and initialize instance variables, in preparation for reuse of this object.
定義:
インタフェース Response 内の recycle

resetBuffer

public void resetBuffer()
Reset the data buffer but not any status or header information.
定義:
インタフェース Response 内の resetBuffer


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