org.apache.catalina.connector
Class RequestWrapper

java.lang.Object
  extended byorg.apache.catalina.connector.RequestWrapper
All Implemented Interfaces:
Request
Direct Known Subclasses:
HttpRequestWrapper

public abstract class RequestWrapper
extends java.lang.Object
implements Request

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

Version:
$Revision: 466595 $ $Date: 2006-10-21 23:24:41 +0100 (Sat, 21 Oct 2006) $
Author:
Craig R. McClanahan

Field Summary
protected  Request request
          Deprecated. The wrapped request.
 
Constructor Summary
RequestWrapper(Request request)
          Deprecated. Construct a wrapper for the specified request.
 
Method Summary
 javax.servlet.ServletInputStream createInputStream()
          Deprecated. Create and return a ServletInputStream to read the content associated with this Request.
 void finishRequest()
          Deprecated. Perform whatever actions are required to flush and close the input stream or reader, in a single operation.
 java.lang.String getAuthorization()
          Deprecated. Return the authorization credentials sent with this request.
 Connector getConnector()
          Deprecated. Return the Connector through which this Request was received.
 Context getContext()
          Deprecated. Return the Context within which this Request is being processed.
 java.lang.String getInfo()
          Deprecated. Return descriptive information about this Request implementation and the corresponding version number, in the format <description>/<version>.
 javax.servlet.ServletRequest getRequest()
          Deprecated. Return the ServletRequest for which this object is the facade.
 Response getResponse()
          Deprecated. Return the Response with which this Request is associated.
 java.net.Socket getSocket()
          Deprecated. Return the Socket (if any) through which this Request was received.
 java.io.InputStream getStream()
          Deprecated. Return the input stream associated with this Request.
 Request getWrappedRequest()
          Deprecated. Return the wrapped request.
 Wrapper getWrapper()
          Deprecated. Return the Wrapper within which this Request is being processed.
 void recycle()
          Deprecated. Release all object references, and initialize instance variables, in preparation for reuse of this object.
 void setAuthorization(java.lang.String authorization)
          Deprecated. Set the authorization credentials sent with this request.
 void setConnector(Connector connector)
          Deprecated. Set the Connector through which this Request was received.
 void setContentLength(int length)
          Deprecated. Set the content length associated with this Request.
 void setContentType(java.lang.String type)
          Deprecated. Set the content type (and optionally the character encoding) associated with this Request.
 void setContext(Context context)
          Deprecated. Set the Context within which this Request is being processed.
 void setProtocol(java.lang.String protocol)
          Deprecated. Set the protocol name and version associated with this Request.
 void setRemoteAddr(java.lang.String remote)
          Deprecated. Set the remote IP address associated with this Request.
 void setResponse(Response response)
          Deprecated. Set the Response with which this Request is associated.
 void setScheme(java.lang.String scheme)
          Deprecated. Set the name of the scheme associated with this request.
 void setSecure(boolean secure)
          Deprecated. Set the value to be returned by isSecure() for this Request.
 void setServerName(java.lang.String name)
          Deprecated. Set the name of the server (virtual host) to process this request.
 void setServerPort(int port)
          Deprecated. Set the port number of the server to process this request.
 void setSocket(java.net.Socket socket)
          Deprecated. Set the Socket (if any) through which this Request was received.
 void setStream(java.io.InputStream stream)
          Deprecated. Set the input stream associated with this Request.
 void setWrapper(Wrapper wrapper)
          Deprecated. Set the Wrapper within which this Request is being processed.
 
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.Request
getNote, getNoteNames, removeNote, setNote
 

Field Detail

request

protected Request request
Deprecated. 
The wrapped request.

Constructor Detail

RequestWrapper

public RequestWrapper(Request request)
Deprecated. 
Construct a wrapper for the specified request.

Parameters:
request - The request to be wrapped
Method Detail

getWrappedRequest

public Request getWrappedRequest()
Deprecated. 
Return the wrapped request.


getAuthorization

public java.lang.String getAuthorization()
Deprecated. 
Return the authorization credentials sent with this request.

Specified by:
getAuthorization in interface Request

setAuthorization

public void setAuthorization(java.lang.String authorization)
Deprecated. 
Set the authorization credentials sent with this request.

Specified by:
setAuthorization in interface Request
Parameters:
authorization - The new authorization credentials

getConnector

public Connector getConnector()
Deprecated. 
Return the Connector through which this Request was received.

Specified by:
getConnector in interface Request

setConnector

public void setConnector(Connector connector)
Deprecated. 
Set the Connector through which this Request was received.

Specified by:
setConnector in interface Request
Parameters:
connector - The new connector

getContext

public Context getContext()
Deprecated. 
Return the Context within which this Request is being processed.

Specified by:
getContext in interface Request

setContext

public void setContext(Context context)
Deprecated. 
Set the Context within which this Request is being processed. This must be called as soon as the appropriate Context is identified, because it identifies the value to be returned by getContextPath(), and thus enables parsing of the request URI.

Specified by:
setContext in interface Request
Parameters:
context - The newly associated Context

getInfo

public java.lang.String getInfo()
Deprecated. 
Return descriptive information about this Request implementation and the corresponding version number, in the format <description>/<version>.

Specified by:
getInfo in interface Request

getRequest

public javax.servlet.ServletRequest getRequest()
Deprecated. 
Return the ServletRequest for which this object is the facade.

Specified by:
getRequest in interface Request

getResponse

public Response getResponse()
Deprecated. 
Return the Response with which this Request is associated.

Specified by:
getResponse in interface Request

setResponse

public void setResponse(Response response)
Deprecated. 
Set the Response with which this Request is associated.

Specified by:
setResponse in interface Request
Parameters:
response - The new associated response

getSocket

public java.net.Socket getSocket()
Deprecated. 
Return the Socket (if any) through which this Request was received. This should only be used to access underlying state information about this Socket, such as the SSLSession associated with an SSLSocket.

Specified by:
getSocket in interface Request

setSocket

public void setSocket(java.net.Socket socket)
Deprecated. 
Set the Socket (if any) through which this Request was received.

Specified by:
setSocket in interface Request
Parameters:
socket - The socket through which this request was received

getStream

public java.io.InputStream getStream()
Deprecated. 
Return the input stream associated with this Request.

Specified by:
getStream in interface Request

setStream

public void setStream(java.io.InputStream stream)
Deprecated. 
Set the input stream associated with this Request.

Specified by:
setStream in interface Request
Parameters:
stream - The new input stream

getWrapper

public Wrapper getWrapper()
Deprecated. 
Return the Wrapper within which this Request is being processed.

Specified by:
getWrapper in interface Request

setWrapper

public void setWrapper(Wrapper wrapper)
Deprecated. 
Set the Wrapper within which this Request is being processed. This must be called as soon as the appropriate Wrapper is identified, and before the Request is ultimately passed to an application servlet.

Specified by:
setWrapper in interface Request
Parameters:
wrapper - The newly associated Wrapper

createInputStream

public javax.servlet.ServletInputStream createInputStream()
                                                   throws java.io.IOException
Deprecated. 
Create and return a ServletInputStream to read the content associated with this Request.

Specified by:
createInputStream in interface Request
Throws:
java.io.IOException - if an input/output error occurs

finishRequest

public void finishRequest()
                   throws java.io.IOException
Deprecated. 
Perform whatever actions are required to flush and close the input stream or reader, in a single operation.

Specified by:
finishRequest in interface Request
Throws:
java.io.IOException - if an input/output error occurs

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 Request

setContentLength

public void setContentLength(int length)
Deprecated. 
Set the content length associated with this Request.

Specified by:
setContentLength in interface Request
Parameters:
length - The new content length

setContentType

public void setContentType(java.lang.String type)
Deprecated. 
Set the content type (and optionally the character encoding) associated with this Request. For example, text/html; charset=ISO-8859-4.

Specified by:
setContentType in interface Request
Parameters:
type - The new content type

setProtocol

public void setProtocol(java.lang.String protocol)
Deprecated. 
Set the protocol name and version associated with this Request.

Specified by:
setProtocol in interface Request
Parameters:
protocol - Protocol name and version

setRemoteAddr

public void setRemoteAddr(java.lang.String remote)
Deprecated. 
Set the remote IP address associated with this Request. NOTE: This value will be used to resolve the value for getRemoteHost() if that method is called.

Specified by:
setRemoteAddr in interface Request
Parameters:
remote - The remote IP address

setScheme

public void setScheme(java.lang.String scheme)
Deprecated. 
Set the name of the scheme associated with this request. Typical values are http, https, and ftp.

Specified by:
setScheme in interface Request
Parameters:
scheme - The scheme

setSecure

public void setSecure(boolean secure)
Deprecated. 
Set the value to be returned by isSecure() for this Request.

Specified by:
setSecure in interface Request
Parameters:
secure - The new isSecure value

setServerName

public void setServerName(java.lang.String name)
Deprecated. 
Set the name of the server (virtual host) to process this request.

Specified by:
setServerName in interface Request
Parameters:
name - The server name

setServerPort

public void setServerPort(int port)
Deprecated. 
Set the port number of the server to process this request.

Specified by:
setServerPort in interface Request
Parameters:
port - The server port


Copyright 2000-2002 Apache Software Foundation. All Rights Reserved.