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.1 $ $Date: 2000/08/11 22:40:19 $
- Author:
- Craig R. McClanahan
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. |
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.Response |
createOutputStream, finishResponse, getConnector, getContentCount, getContentLength, getContentType, getContext, getIncluded, getInfo, getReporter, getRequest, getResponse, getStream, recycle, resetBuffer, setConnector, setContext, setIncluded, setRequest, setStream |
HttpResponseWrapper
public HttpResponseWrapper(HttpResponse response)
- Construct a wrapper for the specified response.
- Parameters:
response
- The response to be wrapped
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
Copyright © 2000 Apache Software Foundation. All Rights Reserved.