org.apache.catalina.connector
クラス RequestBase

java.lang.Object
  |
  +--org.apache.catalina.connector.RequestBase
すべての実装インタフェース:
Request, javax.servlet.ServletRequest
直系の既知のサブクラス:
HttpRequestBase

public abstract class RequestBase
extends java.lang.Object
implements javax.servlet.ServletRequest, Request

Convenience base implementation of the Request interface, which can be used for the Request implementation required by most Connectors. Only the connector-specific methods need to be implemented.

バージョン:
$Revision: 1.17 $ $Date: 2001/08/01 03:04:04 $
作成者:
Craig R. McClanahan

フィールドの概要
protected  java.util.HashMap attributes
          The attributes associated with this Request, keyed by attribute name.
protected  java.lang.String authorization
          The authorization credentials sent with this Request.
protected  java.lang.String characterEncoding
          The character encoding for this Request.
protected  Connector connector
          The Connector through which this Request was received.
protected  int contentLength
          The content length associated with this request.
protected  java.lang.String contentType
          The content type associated with this request.
protected  Context context
          The Context within which this Request is being processed.
protected static java.util.Locale defaultLocale
          The default Locale if none are specified.
protected  RequestFacade facade
          The facade associated with this request.
protected static java.lang.String info
          Descriptive information about this Request implementation.
protected  java.io.InputStream input
          The input stream associated with this Request.
protected  java.util.ArrayList locales
          The preferred Locales assocaited with this Request.
protected  java.lang.String protocol
          The protocol name and version associated with this Request.
protected  java.io.BufferedReader reader
          The reader that has been returned by getReader, if any.
protected  java.lang.String remoteAddr
          The remote address associated with this request.
protected  java.lang.String remoteHost
          The fully qualified name of the remote host.
protected  Response response
          The response with which this request is associated.
protected  java.lang.String scheme
          The scheme associated with this Request.
protected  boolean secure
          Was this request received on a secure connection?
protected  java.lang.String serverName
          The server name associated with this Request.
protected  int serverPort
          The server port associated with this Request.
protected static StringManager sm
          The string manager for this package.
protected  java.net.Socket socket
          The socket through which this Request was received.
protected  javax.servlet.ServletInputStream stream
          The ServletInputStream that has been returned by getInputStream(), if any.
protected  Wrapper wrapper
          The Wrapper within which this Request is being processed.
 
コンストラクタの概要
RequestBase()
           
 
メソッドの概要
 void addLocale(java.util.Locale locale)
          Add a Locale to the set of preferred Locales for this Request.
 javax.servlet.ServletInputStream createInputStream()
          Create and return a ServletInputStream to read the content associated with this Request.
 void finishRequest()
          Perform whatever actions are required to flush and close the input stream or reader, in a single operation.
 java.lang.Object getAttribute(java.lang.String name)
          Return the specified request attribute if it exists; otherwise, return null.
 java.util.Enumeration getAttributeNames()
          Return the names of all request attributes for this Request, or an empty Enumeration if there are none.
 java.lang.String getAuthorization()
          Return the authorization credentials sent with this request.
 java.lang.String getCharacterEncoding()
          Return the character encoding for this Request.
 Connector getConnector()
          Return the Connector through which this Request was received.
 int getContentLength()
          Return the content length for this Request.
 java.lang.String getContentType()
          Return the content type for this Request.
 Context getContext()
          Return the Context within which this Request is being processed.
 java.lang.String getInfo()
          Return descriptive information about this Request implementation and the corresponding version number, in the format <description>/<version>.
 javax.servlet.ServletInputStream getInputStream()
          Return the servlet input stream for this Request.
 java.util.Locale getLocale()
          Return the preferred Locale that the client will accept content in, based on the value for the first Accept-Language header that was encountered.
 java.util.Enumeration getLocales()
          Return the set of preferred Locales that the client will accept content in, based on the values for any Accept-Language headers that were encountered.
 java.lang.Object getNote(java.lang.String name)
          Return the object bound with the specified name to the internal notes for this request, or null if no such binding exists.
 java.util.Iterator getNoteNames()
          Return an Iterator containing the String names of all notes bindings that exist for this request.
abstract  java.lang.String getParameter(java.lang.String name)
          Return the value of the specified request parameter, if any; otherwise, return null.
abstract  java.util.Map getParameterMap()
          Returns a Map of the parameters of this request.
abstract  java.util.Enumeration getParameterNames()
          Return the names of all defined request parameters for this request.
abstract  java.lang.String[] getParameterValues(java.lang.String name)
          Return the defined values for the specified request parameter, if any; otherwise, return null.
 java.lang.String getProtocol()
          Return the protocol and version used to make this Request.
 java.io.BufferedReader getReader()
          Read the Reader wrapping the input stream for this Request.
 java.lang.String getRealPath(java.lang.String path)
          推奨されていません。 As of version 2.1 of the Java Servlet API, use ServletContext.getRealPath().
 java.lang.String getRemoteAddr()
          Return the remote IP address making this Request.
 java.lang.String getRemoteHost()
          Return the remote host name making this Request.
 javax.servlet.ServletRequest getRequest()
          Return the ServletRequest for which this object is the facade.
abstract  javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
          Return a RequestDispatcher that wraps the resource at the specified path, which may be interpreted as relative to the current request path.
 Response getResponse()
          Return the Response with which this Request is associated.
 java.lang.String getScheme()
          Return the scheme used to make this Request.
 java.lang.String getServerName()
          Return the server name responding to this Request.
 int getServerPort()
          Return the server port responding to this Request.
 java.net.Socket getSocket()
          Return the Socket (if any) through which this Request was received.
 java.io.InputStream getStream()
          Return the input stream associated with this Request.
 Wrapper getWrapper()
          Return the Wrapper within which this Request is being processed.
 boolean isSecure()
          Was this request received on a secure connection?
 void recycle()
          Release all object references, and initialize instance variables, in preparation for reuse of this object.
 void removeAttribute(java.lang.String name)
          Remove the specified request attribute if it exists.
 void removeNote(java.lang.String name)
          Remove any object bound to the specified name in the internal notes for this request.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Set the specified request attribute to the specified value.
 void setAuthorization(java.lang.String authorization)
          Set the authorization credentials sent with this request.
 void setCharacterEncoding(java.lang.String enc)
          Overrides the name of the character encoding used in the body of this request.
 void setConnector(Connector connector)
          Set the Connector through which this Request was received.
 void setContentLength(int length)
          Set the content length associated with this Request.
 void setContentType(java.lang.String type)
          Set the content type (and optionally the character encoding) associated with this Request.
 void setContext(Context context)
          Set the Context within which this Request is being processed.
 void setNote(java.lang.String name, java.lang.Object value)
          Bind an object to a specified name in the internal notes associated with this request, replacing any existing binding for this name.
 void setProtocol(java.lang.String protocol)
          Set the protocol name and version associated with this Request.
 void setRemoteAddr(java.lang.String remoteAddr)
          Set the IP address of the remote client associated with this Request.
 void setRemoteHost(java.lang.String remoteHost)
          Set the fully qualified name of the remote client associated with this Request.
 void setResponse(Response response)
          Set the Response with which this Request is associated.
 void setScheme(java.lang.String scheme)
          Set the name of the scheme associated with this request.
 void setSecure(boolean secure)
          Set the value to be returned by isSecure() for this Request.
 void setServerName(java.lang.String name)
          Set the name of the server (virtual host) to process this request.
 void setServerPort(int port)
          Set the port number of the server to process this request.
 void setSocket(java.net.Socket socket)
          Set the Socket (if any) through which this Request was received.
 void setStream(java.io.InputStream input)
          Set the input stream associated with this Request.
 void setWrapper(Wrapper wrapper)
          Set the Wrapper within which this Request is being processed.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

attributes

protected java.util.HashMap attributes
The attributes associated with this Request, keyed by attribute name.

authorization

protected java.lang.String authorization
The authorization credentials sent with this Request.

characterEncoding

protected java.lang.String characterEncoding
The character encoding for this Request.

connector

protected Connector connector
The Connector through which this Request was received.

contentLength

protected int contentLength
The content length associated with this request.

contentType

protected java.lang.String contentType
The content type associated with this request.

context

protected Context context
The Context within which this Request is being processed.

defaultLocale

protected static java.util.Locale defaultLocale
The default Locale if none are specified.

facade

protected RequestFacade facade
The facade associated with this request.

info

protected static final java.lang.String info
Descriptive information about this Request implementation.

input

protected java.io.InputStream input
The input stream associated with this Request.

locales

protected java.util.ArrayList locales
The preferred Locales assocaited with this Request.

protocol

protected java.lang.String protocol
The protocol name and version associated with this Request.

reader

protected java.io.BufferedReader reader
The reader that has been returned by getReader, if any.

remoteAddr

protected java.lang.String remoteAddr
The remote address associated with this request.

remoteHost

protected java.lang.String remoteHost
The fully qualified name of the remote host.

response

protected Response response
The response with which this request is associated.

scheme

protected java.lang.String scheme
The scheme associated with this Request.

secure

protected boolean secure
Was this request received on a secure connection?

serverName

protected java.lang.String serverName
The server name associated with this Request.

serverPort

protected int serverPort
The server port associated with this Request.

sm

protected static StringManager sm
The string manager for this package.

socket

protected java.net.Socket socket
The socket through which this Request was received.

stream

protected javax.servlet.ServletInputStream stream
The ServletInputStream that has been returned by getInputStream(), if any.

wrapper

protected Wrapper wrapper
The Wrapper within which this Request is being processed.
コンストラクタの詳細

RequestBase

public RequestBase()
メソッドの詳細

getAuthorization

public java.lang.String getAuthorization()
Return the authorization credentials sent with this request.
定義:
インタフェース Request 内の getAuthorization

setAuthorization

public void setAuthorization(java.lang.String authorization)
Set the authorization credentials sent with this request.
定義:
インタフェース Request 内の setAuthorization
パラメータ:
authorization - The new authorization credentials

getConnector

public Connector getConnector()
Return the Connector through which this Request was received.
定義:
インタフェース Request 内の getConnector

setConnector

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

getContext

public Context getContext()
Return the Context within which this Request is being processed.
定義:
インタフェース Request 内の getContext

setContext

public void setContext(Context context)
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.
定義:
インタフェース Request 内の setContext
パラメータ:
context - The newly associated Context

getInfo

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

getRequest

public javax.servlet.ServletRequest getRequest()
Return the ServletRequest for which this object is the facade. This method must be implemented by a subclass.
定義:
インタフェース Request 内の getRequest

getResponse

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

setResponse

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

getSocket

public java.net.Socket getSocket()
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.
定義:
インタフェース Request 内の getSocket

setSocket

public void setSocket(java.net.Socket socket)
Set the Socket (if any) through which this Request was received.
定義:
インタフェース Request 内の setSocket
パラメータ:
socket - The socket through which this request was received

getStream

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

setStream

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

getWrapper

public Wrapper getWrapper()
Return the Wrapper within which this Request is being processed.
定義:
インタフェース Request 内の getWrapper

setWrapper

public void setWrapper(Wrapper wrapper)
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.
定義:
インタフェース Request 内の setWrapper
パラメータ:
wrapper - The newly associated Wrapper

addLocale

public void addLocale(java.util.Locale locale)
Add a Locale to the set of preferred Locales for this Request. The first added Locale will be the first one returned by getLocales().
パラメータ:
locale - The new preferred Locale

createInputStream

public javax.servlet.ServletInputStream createInputStream()
                                                   throws java.io.IOException
Create and return a ServletInputStream to read the content associated with this Request. The default implementation creates an instance of RequestStream associated with this request, but this can be overridden if necessary.
定義:
インタフェース Request 内の createInputStream
例外:
java.io.IOException - if an input/output error occurs

finishRequest

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

getNote

public java.lang.Object getNote(java.lang.String name)
Return the object bound with the specified name to the internal notes for this request, or null if no such binding exists.
定義:
インタフェース Request 内の getNote
パラメータ:
name - Name of the note to be returned

getNoteNames

public java.util.Iterator getNoteNames()
Return an Iterator containing the String names of all notes bindings that exist for this request.
定義:
インタフェース Request 内の getNoteNames

recycle

public void recycle()
Release all object references, and initialize instance variables, in preparation for reuse of this object.
定義:
インタフェース Request 内の recycle

removeNote

public void removeNote(java.lang.String name)
Remove any object bound to the specified name in the internal notes for this request.
定義:
インタフェース Request 内の removeNote
パラメータ:
name - Name of the note to be removed

setContentLength

public void setContentLength(int length)
Set the content length associated with this Request.
定義:
インタフェース Request 内の setContentLength
パラメータ:
length - The new content length

setContentType

public void setContentType(java.lang.String type)
Set the content type (and optionally the character encoding) associated with this Request. For example, text/html; charset=ISO-8859-4.
定義:
インタフェース Request 内の setContentType
パラメータ:
type - The new content type

setNote

public void setNote(java.lang.String name,
                    java.lang.Object value)
Bind an object to a specified name in the internal notes associated with this request, replacing any existing binding for this name.
定義:
インタフェース Request 内の setNote
パラメータ:
name - Name to which the object should be bound
value - Object to be bound to the specified name

setProtocol

public void setProtocol(java.lang.String protocol)
Set the protocol name and version associated with this Request.
定義:
インタフェース Request 内の setProtocol
パラメータ:
protocol - Protocol name and version

setRemoteAddr

public void setRemoteAddr(java.lang.String remoteAddr)
Set the IP address of the remote client associated with this Request.
定義:
インタフェース Request 内の setRemoteAddr
パラメータ:
remoteAddr - The remote IP address

setRemoteHost

public void setRemoteHost(java.lang.String remoteHost)
Set the fully qualified name of the remote client associated with this Request.
パラメータ:
remoteHost - The remote host name

setScheme

public void setScheme(java.lang.String scheme)
Set the name of the scheme associated with this request. Typical values are http, https, and ftp.
定義:
インタフェース Request 内の setScheme
パラメータ:
scheme - The scheme

setSecure

public void setSecure(boolean secure)
Set the value to be returned by isSecure() for this Request.
定義:
インタフェース Request 内の setSecure
パラメータ:
secure - The new isSecure value

setServerName

public void setServerName(java.lang.String name)
Set the name of the server (virtual host) to process this request.
定義:
インタフェース Request 内の setServerName
パラメータ:
name - The server name

setServerPort

public void setServerPort(int port)
Set the port number of the server to process this request.
定義:
インタフェース Request 内の setServerPort
パラメータ:
port - The server port

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Return the specified request attribute if it exists; otherwise, return null.
定義:
インタフェース javax.servlet.ServletRequest 内の getAttribute
パラメータ:
name - Name of the request attribute to return

getAttributeNames

public java.util.Enumeration getAttributeNames()
Return the names of all request attributes for this Request, or an empty Enumeration if there are none.
定義:
インタフェース javax.servlet.ServletRequest 内の getAttributeNames

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Return the character encoding for this Request.
定義:
インタフェース javax.servlet.ServletRequest 内の getCharacterEncoding

getContentLength

public int getContentLength()
Return the content length for this Request.
定義:
インタフェース javax.servlet.ServletRequest 内の getContentLength

getContentType

public java.lang.String getContentType()
Return the content type for this Request.
定義:
インタフェース javax.servlet.ServletRequest 内の getContentType

getInputStream

public javax.servlet.ServletInputStream getInputStream()
                                                throws java.io.IOException
Return the servlet input stream for this Request. The default implementation returns a servlet input stream created by createInputStream().
定義:
インタフェース javax.servlet.ServletRequest 内の getInputStream
例外:
java.lang.IllegalStateException - if getReader() has already been called for this request
java.io.IOException - if an input/output error occurs

getLocale

public java.util.Locale getLocale()
Return the preferred Locale that the client will accept content in, based on the value for the first Accept-Language header that was encountered. If the request did not specify a preferred language, the server's default Locale is returned.
定義:
インタフェース javax.servlet.ServletRequest 内の getLocale

getLocales

public java.util.Enumeration getLocales()
Return the set of preferred Locales that the client will accept content in, based on the values for any Accept-Language headers that were encountered. If the request did not specify a preferred language, the server's default Locale is returned.
定義:
インタフェース javax.servlet.ServletRequest 内の getLocales

getParameter

public abstract java.lang.String getParameter(java.lang.String name)
Return the value of the specified request parameter, if any; otherwise, return null. If there is more than one value defined, return only the first one.
定義:
インタフェース javax.servlet.ServletRequest 内の getParameter
パラメータ:
name - Name of the desired request parameter

getParameterMap

public abstract java.util.Map getParameterMap()
Returns a Map of the parameters of this request. Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained in the query string or posted form data.
定義:
インタフェース javax.servlet.ServletRequest 内の getParameterMap
戻り値:
A Map containing parameter names as keys and parameter values as map values.

getParameterNames

public abstract java.util.Enumeration getParameterNames()
Return the names of all defined request parameters for this request.
定義:
インタフェース javax.servlet.ServletRequest 内の getParameterNames

getParameterValues

public abstract java.lang.String[] getParameterValues(java.lang.String name)
Return the defined values for the specified request parameter, if any; otherwise, return null.
定義:
インタフェース javax.servlet.ServletRequest 内の getParameterValues
パラメータ:
name - Name of the desired request parameter

getProtocol

public java.lang.String getProtocol()
Return the protocol and version used to make this Request.
定義:
インタフェース javax.servlet.ServletRequest 内の getProtocol

getReader

public java.io.BufferedReader getReader()
                                 throws java.io.IOException
Read the Reader wrapping the input stream for this Request. The default implementation wraps a BufferedReader around the servlet input stream returned by createInputStream().
定義:
インタフェース javax.servlet.ServletRequest 内の getReader
例外:
java.lang.IllegalStateException - if getInputStream() has already been called for this request
java.io.IOException - if an input/output error occurs

getRealPath

public java.lang.String getRealPath(java.lang.String path)
推奨されていません。 As of version 2.1 of the Java Servlet API, use ServletContext.getRealPath().

Return the real path of the specified virtual path.
定義:
インタフェース javax.servlet.ServletRequest 内の getRealPath
パラメータ:
path - Path to be translated

getRemoteAddr

public java.lang.String getRemoteAddr()
Return the remote IP address making this Request.
定義:
インタフェース javax.servlet.ServletRequest 内の getRemoteAddr

getRemoteHost

public java.lang.String getRemoteHost()
Return the remote host name making this Request.
定義:
インタフェース javax.servlet.ServletRequest 内の getRemoteHost

getRequestDispatcher

public abstract javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
Return a RequestDispatcher that wraps the resource at the specified path, which may be interpreted as relative to the current request path.
定義:
インタフェース javax.servlet.ServletRequest 内の getRequestDispatcher
パラメータ:
path - Path of the resource to be wrapped

getScheme

public java.lang.String getScheme()
Return the scheme used to make this Request.
定義:
インタフェース javax.servlet.ServletRequest 内の getScheme

getServerName

public java.lang.String getServerName()
Return the server name responding to this Request.
定義:
インタフェース javax.servlet.ServletRequest 内の getServerName

getServerPort

public int getServerPort()
Return the server port responding to this Request.
定義:
インタフェース javax.servlet.ServletRequest 内の getServerPort

isSecure

public boolean isSecure()
Was this request received on a secure connection?
定義:
インタフェース javax.servlet.ServletRequest 内の isSecure

removeAttribute

public void removeAttribute(java.lang.String name)
Remove the specified request attribute if it exists.
定義:
インタフェース javax.servlet.ServletRequest 内の removeAttribute
パラメータ:
name - Name of the request attribute to remove

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Set the specified request attribute to the specified value.
定義:
インタフェース javax.servlet.ServletRequest 内の setAttribute
パラメータ:
name - Name of the request attribute to set
value - The associated value

setCharacterEncoding

public void setCharacterEncoding(java.lang.String enc)
                          throws java.io.UnsupportedEncodingException
Overrides the name of the character encoding used in the body of this request. This method must be called prior to reading request parameters or reading input using getReader().
定義:
インタフェース javax.servlet.ServletRequest 内の setCharacterEncoding
パラメータ:
enc - The character encoding to be used
例外:
java.io.UnsupportedEncodingException - if the specified encoding is not supported
導入されたバージョン:
Servlet 2.3


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