|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.catalina.connector.RequestBase
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.
| Field Summary | |
protected java.util.HashMap |
attributes
Deprecated. The attributes associated with this Request, keyed by attribute name. |
protected java.lang.String |
authorization
Deprecated. The authorization credentials sent with this Request. |
protected java.lang.String |
characterEncoding
Deprecated. The character encoding for this Request. |
protected Connector |
connector
Deprecated. The Connector through which this Request was received. |
protected int |
contentLength
Deprecated. The content length associated with this request. |
protected java.lang.String |
contentType
Deprecated. The content type associated with this request. |
protected Context |
context
Deprecated. The Context within which this Request is being processed. |
protected static java.util.Locale |
defaultLocale
Deprecated. The default Locale if none are specified. |
protected RequestFacade |
facade
Deprecated. The facade associated with this request. |
protected static java.lang.String |
info
Deprecated. Descriptive information about this Request implementation. |
protected java.io.InputStream |
input
Deprecated. The input stream associated with this Request. |
protected java.util.ArrayList |
locales
Deprecated. The preferred Locales assocaited with this Request. |
protected java.lang.String |
protocol
Deprecated. The protocol name and version associated with this Request. |
protected java.io.BufferedReader |
reader
Deprecated. The reader that has been returned by getReader, if any. |
protected java.lang.String |
remoteAddr
Deprecated. The remote address associated with this request. |
protected java.lang.String |
remoteHost
Deprecated. The fully qualified name of the remote host. |
protected Response |
response
Deprecated. The response with which this request is associated. |
protected java.lang.String |
scheme
Deprecated. The scheme associated with this Request. |
protected boolean |
secure
Deprecated. Was this request received on a secure connection? |
protected java.lang.String |
serverName
Deprecated. The server name associated with this Request. |
protected int |
serverPort
Deprecated. The server port associated with this Request. |
protected static StringManager |
sm
Deprecated. The string manager for this package. |
protected java.net.Socket |
socket
Deprecated. The socket through which this Request was received. |
protected javax.servlet.ServletInputStream |
stream
Deprecated. The ServletInputStream that has been returned by getInputStream(), if any. |
protected Wrapper |
wrapper
Deprecated. The Wrapper within which this Request is being processed. |
| Constructor Summary | |
RequestBase()
Deprecated. |
|
| Method Summary | |
void |
addLocale(java.util.Locale locale)
Deprecated. Add a Locale to the set of preferred Locales for this Request. |
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.Object |
getAttribute(java.lang.String name)
Deprecated. Return the specified request attribute if it exists; otherwise, return null. |
java.util.Enumeration |
getAttributeNames()
Deprecated. Return the names of all request attributes for this Request, or an empty Enumeration if there are none. |
java.lang.String |
getAuthorization()
Deprecated. Return the authorization credentials sent with this request. |
java.lang.String |
getCharacterEncoding()
Deprecated. Return the character encoding for this Request. |
Connector |
getConnector()
Deprecated. Return the Connector through which this Request was received. |
int |
getContentLength()
Deprecated. Return the content length for this Request. |
java.lang.String |
getContentType()
Deprecated. Return the content type for this Request. |
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.ServletInputStream |
getInputStream()
Deprecated. Return the servlet input stream for this Request. |
java.util.Locale |
getLocale()
Deprecated. 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()
Deprecated. 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)
Deprecated. 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()
Deprecated. 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)
Deprecated. Return the value of the specified request parameter, if any; otherwise, return null. |
abstract java.util.Map |
getParameterMap()
Deprecated. Returns a Map of the parameters of this request.
|
abstract java.util.Enumeration |
getParameterNames()
Deprecated. Return the names of all defined request parameters for this request. |
abstract java.lang.String[] |
getParameterValues(java.lang.String name)
Deprecated. Return the defined values for the specified request parameter, if any; otherwise, return null. |
java.lang.String |
getProtocol()
Deprecated. Return the protocol and version used to make this Request. |
java.io.BufferedReader |
getReader()
Deprecated. Read the Reader wrapping the input stream for this Request. |
java.lang.String |
getRealPath(java.lang.String path)
Deprecated. As of version 2.1 of the Java Servlet API, use ServletContext.getRealPath(). |
java.lang.String |
getRemoteAddr()
Deprecated. Return the remote IP address making this Request. |
java.lang.String |
getRemoteHost()
Deprecated. Return the remote host name making this Request. |
javax.servlet.ServletRequest |
getRequest()
Deprecated. Return the ServletRequest for which this object
is the facade. |
abstract javax.servlet.RequestDispatcher |
getRequestDispatcher(java.lang.String path)
Deprecated. Return a RequestDispatcher that wraps the resource at the specified path, which may be interpreted as relative to the current request path. |
Response |
getResponse()
Deprecated. Return the Response with which this Request is associated. |
java.lang.String |
getScheme()
Deprecated. Return the scheme used to make this Request. |
java.lang.String |
getServerName()
Deprecated. Return the server name responding to this Request. |
int |
getServerPort()
Deprecated. Return the server port responding to this Request. |
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. |
Wrapper |
getWrapper()
Deprecated. Return the Wrapper within which this Request is being processed. |
boolean |
isSecure()
Deprecated. Was this request received on a secure connection? |
void |
recycle()
Deprecated. Release all object references, and initialize instance variables, in preparation for reuse of this object. |
void |
removeAttribute(java.lang.String name)
Deprecated. Remove the specified request attribute if it exists. |
void |
removeNote(java.lang.String name)
Deprecated. 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)
Deprecated. Set the specified request attribute to the specified value. |
void |
setAuthorization(java.lang.String authorization)
Deprecated. Set the authorization credentials sent with this request. |
void |
setCharacterEncoding(java.lang.String enc)
Deprecated. Overrides the name of the character encoding used in the body of 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 |
setNote(java.lang.String name,
java.lang.Object value)
Deprecated. 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)
Deprecated. Set the protocol name and version associated with this Request. |
void |
setRemoteAddr(java.lang.String remoteAddr)
Deprecated. Set the IP address of the remote client associated with this Request. |
void |
setRemoteHost(java.lang.String remoteHost)
Deprecated. Set the fully qualified name of the remote client 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 input)
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 |
| Field Detail |
protected java.util.HashMap attributes
protected java.lang.String authorization
protected java.lang.String characterEncoding
protected Connector connector
protected int contentLength
protected java.lang.String contentType
protected Context context
protected static java.util.Locale defaultLocale
protected RequestFacade facade
protected static final java.lang.String info
protected java.io.InputStream input
protected java.util.ArrayList locales
protected java.lang.String protocol
protected java.io.BufferedReader reader
getReader, if any.
protected java.lang.String remoteAddr
protected java.lang.String remoteHost
protected Response response
protected java.lang.String scheme
protected boolean secure
protected java.lang.String serverName
protected int serverPort
protected static StringManager sm
protected java.net.Socket socket
protected javax.servlet.ServletInputStream stream
getInputStream(), if any.
protected Wrapper wrapper
| Constructor Detail |
public RequestBase()
| Method Detail |
public java.lang.String getAuthorization()
getAuthorization in interface Requestpublic void setAuthorization(java.lang.String authorization)
setAuthorization in interface Requestauthorization - The new authorization credentialspublic Connector getConnector()
getConnector in interface Requestpublic void setConnector(Connector connector)
setConnector in interface Requestconnector - The new connectorpublic Context getContext()
getContext in interface Requestpublic void setContext(Context context)
getContextPath(),
and thus enables parsing of the request URI.
setContext in interface Requestcontext - The newly associated Contextpublic java.lang.String getInfo()
<description>/<version>.
getInfo in interface Requestpublic javax.servlet.ServletRequest getRequest()
ServletRequest for which this object
is the facade. This method must be implemented by a subclass.
getRequest in interface Requestpublic Response getResponse()
getResponse in interface Requestpublic void setResponse(Response response)
setResponse in interface Requestresponse - The new associated responsepublic java.net.Socket getSocket()
getSocket in interface Requestpublic void setSocket(java.net.Socket socket)
setSocket in interface Requestsocket - The socket through which this request was receivedpublic java.io.InputStream getStream()
getStream in interface Requestpublic void setStream(java.io.InputStream input)
setStream in interface Requestinput - The new input streampublic Wrapper getWrapper()
getWrapper in interface Requestpublic void setWrapper(Wrapper wrapper)
setWrapper in interface Requestwrapper - The newly associated Wrapperpublic void addLocale(java.util.Locale locale)
locale - The new preferred Locale
public javax.servlet.ServletInputStream createInputStream()
throws java.io.IOException
createInputStream in interface Requestjava.io.IOException - if an input/output error occurs
public void finishRequest()
throws java.io.IOException
finishRequest in interface Requestjava.io.IOException - if an input/output error occurspublic java.lang.Object getNote(java.lang.String name)
null if no such binding exists.
getNote in interface Requestname - Name of the note to be returnedpublic java.util.Iterator getNoteNames()
getNoteNames in interface Requestpublic void recycle()
recycle in interface Requestpublic void removeNote(java.lang.String name)
removeNote in interface Requestname - Name of the note to be removedpublic void setContentLength(int length)
setContentLength in interface Requestlength - The new content lengthpublic void setContentType(java.lang.String type)
text/html; charset=ISO-8859-4.
setContentType in interface Requesttype - The new content type
public void setNote(java.lang.String name,
java.lang.Object value)
setNote in interface Requestname - Name to which the object should be boundvalue - Object to be bound to the specified namepublic void setProtocol(java.lang.String protocol)
setProtocol in interface Requestprotocol - Protocol name and versionpublic void setRemoteAddr(java.lang.String remoteAddr)
setRemoteAddr in interface RequestremoteAddr - The remote IP addresspublic void setRemoteHost(java.lang.String remoteHost)
remoteHost - The remote host namepublic void setScheme(java.lang.String scheme)
http, https, and ftp.
setScheme in interface Requestscheme - The schemepublic void setSecure(boolean secure)
isSecure()
for this Request.
setSecure in interface Requestsecure - The new isSecure valuepublic void setServerName(java.lang.String name)
setServerName in interface Requestname - The server namepublic void setServerPort(int port)
setServerPort in interface Requestport - The server portpublic java.lang.Object getAttribute(java.lang.String name)
null.
getAttribute in interface javax.servlet.ServletRequestname - Name of the request attribute to returnpublic java.util.Enumeration getAttributeNames()
Enumeration if there are none.
getAttributeNames in interface javax.servlet.ServletRequestpublic java.lang.String getCharacterEncoding()
getCharacterEncoding in interface javax.servlet.ServletRequestpublic int getContentLength()
getContentLength in interface javax.servlet.ServletRequestpublic java.lang.String getContentType()
getContentType in interface javax.servlet.ServletRequest
public javax.servlet.ServletInputStream getInputStream()
throws java.io.IOException
createInputStream().
getInputStream in interface javax.servlet.ServletRequestjava.lang.IllegalStateException - if getReader() has
already been called for this request
java.io.IOException - if an input/output error occurspublic java.util.Locale getLocale()
Accept-Language header
that was encountered. If the request did not specify a preferred
language, the server's default Locale is returned.
getLocale in interface javax.servlet.ServletRequestpublic java.util.Enumeration getLocales()
Accept-Language
headers that were encountered. If the request did not specify a
preferred language, the server's default Locale is returned.
getLocales in interface javax.servlet.ServletRequestpublic abstract java.lang.String getParameter(java.lang.String name)
null. If there is more than one value defined,
return only the first one.
getParameter in interface javax.servlet.ServletRequestname - Name of the desired request parameterpublic abstract java.util.Map getParameterMap()
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.
getParameterMap in interface javax.servlet.ServletRequestMap containing parameter names as keys
and parameter values as map values.public abstract java.util.Enumeration getParameterNames()
getParameterNames in interface javax.servlet.ServletRequestpublic abstract java.lang.String[] getParameterValues(java.lang.String name)
null.
getParameterValues in interface javax.servlet.ServletRequestname - Name of the desired request parameterpublic java.lang.String getProtocol()
getProtocol in interface javax.servlet.ServletRequest
public java.io.BufferedReader getReader()
throws java.io.IOException
BufferedReader around the
servlet input stream returned by createInputStream().
getReader in interface javax.servlet.ServletRequestjava.lang.IllegalStateException - if getInputStream()
has already been called for this request
java.io.IOException - if an input/output error occurspublic java.lang.String getRealPath(java.lang.String path)
ServletContext.getRealPath().
getRealPath in interface javax.servlet.ServletRequestpath - Path to be translatedpublic java.lang.String getRemoteAddr()
getRemoteAddr in interface javax.servlet.ServletRequestpublic java.lang.String getRemoteHost()
getRemoteHost in interface javax.servlet.ServletRequestpublic abstract javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
getRequestDispatcher in interface javax.servlet.ServletRequestpath - Path of the resource to be wrappedpublic java.lang.String getScheme()
getScheme in interface javax.servlet.ServletRequestpublic java.lang.String getServerName()
getServerName in interface javax.servlet.ServletRequestpublic int getServerPort()
getServerPort in interface javax.servlet.ServletRequestpublic boolean isSecure()
isSecure in interface javax.servlet.ServletRequestpublic void removeAttribute(java.lang.String name)
removeAttribute in interface javax.servlet.ServletRequestname - Name of the request attribute to remove
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface javax.servlet.ServletRequestname - Name of the request attribute to setvalue - The associated value
public void setCharacterEncoding(java.lang.String enc)
throws java.io.UnsupportedEncodingException
getReader().
setCharacterEncoding in interface javax.servlet.ServletRequestenc - The character encoding to be used
java.io.UnsupportedEncodingException - if the specified encoding
is not supported
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||