com.caucho.server.http
Class Request

java.lang.Object
  |
  +--com.caucho.server.http.AbstractRequest
        |
        +--com.caucho.server.http.Request
All Implemented Interfaces:
CauchoRequest, HttpServletRequest, SecurityContextProvider, com.caucho.server.ServerRequest, ServletRequest
Direct Known Subclasses:
HttpRequest, RunnerRequest

public abstract class Request
extends AbstractRequest
implements com.caucho.server.ServerRequest

Base class for top-level requests. Request drives the request and also stores information about the request.


Field Summary
protected  boolean bogusSecure
           
protected  CharBuffer cb
           
protected  java.util.ArrayList closeOnExit
           
protected  com.caucho.server.Connection conn
           
protected  TransactionImpl currentTransaction
           
protected  ReadStream filterStream
           
protected  boolean hasInputStream
           
protected  com.caucho.server.http.InvocationKey invocationKey
           
protected  boolean isSecure
           
protected  ReadStream rawStream
           
protected  Response response
           
protected  ServletServer server
           
protected  int sessionGroup
           
protected  int version
           
 
Fields inherited from class com.caucho.server.http.AbstractRequest
cache, calendar, CONTEXT_PATH, ERROR_URI, EXCEPTION, invocation, JSP_EXCEPTION, MESSAGE, PATH_INFO, QUERY_STRING, REQUEST_URI, SERVLET_PATH, STATUS_CODE
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
protected Request(ServletServer server)
          Create a new Request.
 
Method Summary
 java.lang.String findSessionIdFromConnection()
          For SSL connections, use the SSL identifier.
protected  void finish()
          Cleans up at the end of the request
protected  void finishSession()
           
 Application getApplication()
          Returns the request's Application.
 java.lang.Object getAttribute(java.lang.String name)
          Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.
 java.util.Enumeration getAttributeNames()
          Returns an Enumeration containing the names of the attributes available to this request.
 java.lang.String getChain(java.lang.String contentType)
          Returns a servlet filter based on the content type.
 java.lang.String getCharacterEncoding()
          Returns the character encoding of a post.
 int getContentLength()
          Returns the content length of a post.
 java.lang.String getContentType()
          Returns the content-length of a post.
 java.lang.String getContextPath()
          Returns the context part of the uri.
 Cookie getCookie(java.lang.String name)
          Returns the cookies from the browser
 Cookie[] getCookies()
          Returns the cookies from the browser
 long getDate()
          Returns the date for the current request.
 java.lang.String getHeader(java.lang.String key)
          Returns the value of the specified request header as a String.
abstract  CharSegment getHeaderBuffer(char[] cb, int length)
           
abstract  CharSegment getHeaderBuffer(java.lang.String key)
           
abstract  void getHeaderBuffers(java.util.ArrayList values, java.lang.String key)
           
abstract  java.util.Enumeration getHeaderNames()
          Enumerates the header keys
 java.util.Enumeration getHeaders(java.lang.String name)
          Returns all the values of the specified request header as an Enumeration of String objects.
 ServletInputStream getInputStream()
          Returns a stream for reading POST data.
 java.util.Locale getLocale()
          Returns the preferred Locale that the client will accept content in, based on the Accept-Language header.
 java.util.Enumeration getLocales()
          Returns an Enumeration of Locale objects indicating, in decreasing order starting with the preferred locale, the locales that are acceptable to the client based on the Accept-Language header.
 java.lang.String getMethod()
          Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.
abstract  CharSegment getMethodBuffer()
           
 java.lang.String getPageContextPath()
          Returns the context part of the uri.
 java.lang.String getPagePathInfo()
          Returns the portion of the uri after the servlet path for the current page.
 java.lang.String getPageQueryString()
          Returns the current page's query string.
 java.lang.String getPageServletPath()
          Returns the portion of the uri mapped to the servlet for the current page.
 java.lang.String getPageURI()
          Returns the URI for the page.
 java.lang.String getParameter(java.lang.String name)
          Returns the form primary value for the given name.
 java.util.Map getParameterMap()
          Returns a map of the form.
 java.util.Enumeration getParameterNames()
          Returns an enumeration of the form names.
 java.lang.String[] getParameterValues(java.lang.String name)
          Returns the form's values for the given name.
 java.lang.String getPathInfo()
          Returns the portion of the uri after the servlet path for the original request.
 java.lang.String getPathTranslated()
          Returns the real path of pathInfo.
 java.lang.String getProtocol()
          Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1.
abstract  CharSegment getProtocolBuffer()
           
 java.lang.String getQueryString()
          Returns the current page's query string.
 java.io.BufferedReader getReader()
          Returns a Reader for the POST contents
 java.lang.String getRealPath(java.lang.String path)
          Deprecated. As of JSDK 2.1
abstract  java.lang.String getRemoteAddr()
          Returns the Internet Protocol (IP) address of the client that sent the request.
abstract  java.lang.String getRemoteHost()
          Returns the fully qualified name of the client that sent the request, or the IP address of the client if the name cannot be determined.
 Application getRequestApplication()
           
 int getRequestDepth()
           
 java.lang.String getRequestedSessionId()
          Returns the session id in the HTTP request.
 java.lang.String getRequestURI()
          Returns the URI for the request
abstract  java.lang.String getScheme()
          Returns the name of the scheme used to make this request, for example, http, https, or ftp.
abstract  java.lang.String getServerName()
          Returns the host name of the server that received the request.
abstract  int getServerPort()
          Returns the port number on which this request was received.
 java.lang.String getServletPath()
          Returns the portion of the uri mapped to the servlet for the original request.
 HttpSession getSession(boolean create)
          Returns the current session.
 int getSessionGroup()
           
 ReadStream getStream()
           
static Request getThreadRequest()
          Returns the request associated with the current thread.
abstract  byte[] getUriBuffer()
           
abstract  int getUriLength()
           
 void init()
          Initialize thread-specific data.
 boolean isRequestedSessionIdFromCookie()
          Returns true if the current sessionId came from a cookie.
 boolean isRequestedSessionIdFromUrl()
          Deprecated.  
 boolean isRequestedSessionIdFromURL()
          Returns true if the current sessionId came from the url.
 boolean isRequestedSessionIdValid()
          Returns true if the HTTP request's session id refers to a valid session.
 boolean isSecure()
          Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.
 boolean isTesting()
           
 int printRemoteAddr(byte[] buffer, int offset)
           
 void removeAttribute(java.lang.String name)
          Removes an attribute from this request.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Stores an attribute in this request.
 void setCharacterEncoding(java.lang.String encoding)
          Sets the character encoding of a post.
abstract  void setHeader(java.lang.String key, java.lang.String value)
           
protected  void setVaryCookie(java.lang.String cookie)
          If true, detects when a page depends on a cookie.
protected  void start(ReadStream s)
          Prepare the Request object for a new request.
 
Methods inherited from class com.caucho.server.http.AbstractRequest
authenticate, createSession, getAuthType, getCauchoApplication, getDateHeader, getIntHeader, getMedia, getRemoteUser, getRemoteUser, getRequestDepth, getRequestDispatcher, getRequestURL, getSession, getUserPrincipal, isUserInRole, logoutUserPrincipal, setHasCookie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.caucho.server.ServerRequest
handleConnection
 

Field Detail

server

protected ServletServer server

conn

protected com.caucho.server.Connection conn

version

protected int version

invocationKey

protected com.caucho.server.http.InvocationKey invocationKey

sessionGroup

protected int sessionGroup

rawStream

protected ReadStream rawStream

filterStream

protected ReadStream filterStream

hasInputStream

protected boolean hasInputStream

response

protected Response response

cb

protected CharBuffer cb

isSecure

protected boolean isSecure

bogusSecure

protected boolean bogusSecure

currentTransaction

protected TransactionImpl currentTransaction

closeOnExit

protected java.util.ArrayList closeOnExit
Constructor Detail

Request

protected Request(ServletServer server)
Create a new Request. Because the actual initialization occurs with the start() method, this just allocates statics.
Parameters:
server - the parent server
Method Detail

init

public void init()
Initialize thread-specific data.
Specified by:
init in interface com.caucho.server.ServerRequest

start

protected void start(ReadStream s)
              throws java.io.IOException
Prepare the Request object for a new request.
Parameters:
s - the raw connection stream

getChain

public java.lang.String getChain(java.lang.String contentType)
Returns a servlet filter based on the content type.
Overrides:
getChain in class AbstractRequest
Parameters:
contentType - mime-type selecting the filter.
Returns:
servlet-name of the filter.

setHeader

public abstract void setHeader(java.lang.String key,
                               java.lang.String value)
Overrides:
setHeader in class AbstractRequest

finishSession

protected void finishSession()
                      throws java.io.IOException
Overrides:
finishSession in class AbstractRequest

finish

protected void finish()
               throws java.io.IOException
Cleans up at the end of the request
Overrides:
finish in class AbstractRequest

getInputStream

public ServletInputStream getInputStream()
                                  throws java.io.IOException
Returns a stream for reading POST data.
Overrides:
getInputStream in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
a ServletInputStream object containing the body of the request
Throws:
java.lang.IllegalStateException - if the ServletRequest.getReader() method has already been called for this request
java.io.IOException - if an input or output exception occurred

getStream

public ReadStream getStream()
                     throws java.io.IOException
Overrides:
getStream in class AbstractRequest

getRequestDepth

public int getRequestDepth()

getReader

public java.io.BufferedReader getReader()
                                 throws java.io.IOException
Returns a Reader for the POST contents
Overrides:
getReader in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
a BufferedReader containing the body of the request
Throws:
java.io.UnsupportedEncodingException - if the character set encoding used is not supported and the text cannot be decoded
java.lang.IllegalStateException - if ServletRequest.getInputStream() method has been called on this request
java.io.IOException - if an input or output exception occurred
See Also:
ServletRequest.getInputStream()

getServerName

public abstract java.lang.String getServerName()
Description copied from interface: ServletRequest
Returns the host name of the server that received the request. For HTTP servlets, same as the value of the CGI variable SERVER_NAME.
Overrides:
getServerName in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
a String containing the name of the server to which the request was sent

getServerPort

public abstract int getServerPort()
Description copied from interface: ServletRequest
Returns the port number on which this request was received. For HTTP servlets, same as the value of the CGI variable SERVER_PORT.
Overrides:
getServerPort in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
an integer specifying the port number

getRemoteAddr

public abstract java.lang.String getRemoteAddr()
Description copied from interface: ServletRequest
Returns the Internet Protocol (IP) address of the client that sent the request. For HTTP servlets, same as the value of the CGI variable REMOTE_ADDR.
Overrides:
getRemoteAddr in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
a String containing the IP address of the client that sent the request

printRemoteAddr

public int printRemoteAddr(byte[] buffer,
                           int offset)
                    throws java.io.IOException

getRemoteHost

public abstract java.lang.String getRemoteHost()
Description copied from interface: ServletRequest
Returns the fully qualified name of the client that sent the request, or the IP address of the client if the name cannot be determined. For HTTP servlets, same as the value of the CGI variable REMOTE_HOST.
Overrides:
getRemoteHost in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
a String containing the fully qualified name of the client

getScheme

public abstract java.lang.String getScheme()
Description copied from interface: ServletRequest
Returns the name of the scheme used to make this request, for example, http, https, or ftp. Different schemes have different rules for constructing URLs, as noted in RFC 1738.
Overrides:
getScheme in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
a String containing the name of the scheme used to make this request

getMethodBuffer

public abstract CharSegment getMethodBuffer()
Overrides:
getMethodBuffer in class AbstractRequest

getMethod

public java.lang.String getMethod()
Description copied from interface: HttpServletRequest
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT. Same as the value of the CGI variable REQUEST_METHOD.
Overrides:
getMethod in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
a String specifying the name of the method with which this request was made

getProtocol

public java.lang.String getProtocol()
Description copied from interface: ServletRequest
Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1. For HTTP servlets, the value returned is the same as the value of the CGI variable SERVER_PROTOCOL.
Overrides:
getProtocol in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
a String containing the protocol name and version number

getProtocolBuffer

public abstract CharSegment getProtocolBuffer()

getRequestURI

public java.lang.String getRequestURI()
Returns the URI for the request
Overrides:
getRequestURI in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
a String containing the part of the URL from the protocol name up to the query string
See Also:
HttpUtils.getRequestURL(javax.servlet.http.HttpServletRequest)

getPageURI

public java.lang.String getPageURI()
Returns the URI for the page. getPageURI and getRequestURI differ for included files. getPageURI gets the URI for the included page. getRequestURI returns the original URI.
Overrides:
getPageURI in class AbstractRequest

getUriBuffer

public abstract byte[] getUriBuffer()

getUriLength

public abstract int getUriLength()

getContextPath

public java.lang.String getContextPath()
Returns the context part of the uri. The context part is the part that maps to an application.
Overrides:
getContextPath in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
a String specifying the portion of the request URI that indicates the context of the request

getPageContextPath

public java.lang.String getPageContextPath()
Returns the context part of the uri. For included files, this will return the included context-path.
Overrides:
getPageContextPath in class AbstractRequest

getServletPath

public java.lang.String getServletPath()
Returns the portion of the uri mapped to the servlet for the original request.
Overrides:
getServletPath in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
a String containing the name or path of the servlet being called, as specified in the request URL, decoded.

getPageServletPath

public java.lang.String getPageServletPath()
Returns the portion of the uri mapped to the servlet for the current page.
Overrides:
getPageServletPath in class AbstractRequest

getPathInfo

public java.lang.String getPathInfo()
Returns the portion of the uri after the servlet path for the original request.
Overrides:
getPathInfo in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
a String, decoded by the web container, specifying extra path information that comes after the servlet path but before the query string in the request URL; or null if the URL does not have any extra path information

getPagePathInfo

public java.lang.String getPagePathInfo()
Returns the portion of the uri after the servlet path for the current page.
Overrides:
getPagePathInfo in class AbstractRequest

getRealPath

public java.lang.String getRealPath(java.lang.String path)
Deprecated. As of JSDK 2.1

Overrides:
getRealPath in class AbstractRequest

getPathTranslated

public java.lang.String getPathTranslated()
Returns the real path of pathInfo.
Overrides:
getPathTranslated in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
a String specifying the real path, or null if the URL does not have any extra path information

getQueryString

public java.lang.String getQueryString()
Returns the current page's query string.
Overrides:
getQueryString in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
a String containing the query string or null if the URL contains no query string. The value is not decoded by the container.

getPageQueryString

public java.lang.String getPageQueryString()
Returns the current page's query string.
Overrides:
getPageQueryString in class AbstractRequest

getHeader

public java.lang.String getHeader(java.lang.String key)
Description copied from interface: HttpServletRequest
Returns the value of the specified request header as a String. If the request did not include a header of the specified name, this method returns null. The header name is case insensitive. You can use this method with any request header.
Overrides:
getHeader in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Parameters:
name - a String specifying the header name
Returns:
a String containing the value of the requested header, or null if the request does not have a header of that name

getHeaderBuffer

public abstract CharSegment getHeaderBuffer(java.lang.String key)

getHeaderBuffer

public abstract CharSegment getHeaderBuffer(char[] cb,
                                            int length)

getHeaderBuffers

public abstract void getHeaderBuffers(java.util.ArrayList values,
                                      java.lang.String key)

getHeaderNames

public abstract java.util.Enumeration getHeaderNames()
Enumerates the header keys
Overrides:
getHeaderNames in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
an enumeration of all the header names sent with this request; if the request has no headers, an empty enumeration; if the servlet container does not allow servlets to use this method, null

getContentLength

public int getContentLength()
Returns the content length of a post.
Overrides:
getContentLength in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
an integer containing the length of the request body or -1 if the length is not known

getContentType

public java.lang.String getContentType()
Returns the content-length of a post.
Overrides:
getContentType in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
a String containing the name of the MIME type of the request, or -1 if the type is not known

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Returns the character encoding of a post.
Overrides:
getCharacterEncoding in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
a String containing the name of the chararacter encoding, or null if the request does not specify a character encoding

setCharacterEncoding

public void setCharacterEncoding(java.lang.String encoding)
Sets the character encoding of a post.
Following copied from interface: javax.servlet.ServletRequest
Parameters:
a - String containing the name of the chararacter encoding.
Throws:
java.io.UnsupportedEncodingException - if this is not a valid encoding

getCookies

public Cookie[] getCookies()
Returns the cookies from the browser
Overrides:
getCookies in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
an array of all the Cookies included with this request, or null if the request has no cookies

getCookie

public Cookie getCookie(java.lang.String name)
Returns the cookies from the browser
Overrides:
getCookie in class AbstractRequest

setVaryCookie

protected void setVaryCookie(java.lang.String cookie)
If true, detects when a page depends on a cookie.
Overrides:
setVaryCookie in class AbstractRequest
Following copied from class: com.caucho.server.http.AbstractRequest
Parameters:
cookie - the cookie the page depends on.

getSession

public HttpSession getSession(boolean create)
Returns the current session.
Overrides:
getSession in class AbstractRequest
Parameters:
create - true if a new session should be created
Returns:
the current session

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()
Returns true if the HTTP request's session id refers to a valid session.
Overrides:
isRequestedSessionIdValid in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
true if this request has an id for a valid session in the current session context; false otherwise
See Also:
HttpServletRequest.getRequestedSessionId(), HttpServletRequest.getSession(boolean), HttpSessionContext

isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()
Returns true if the current sessionId came from a cookie.
Overrides:
isRequestedSessionIdFromCookie in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
true if the session ID came in as a cookie; otherwise, false
See Also:
HttpServletRequest.getSession(boolean)

isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()
Returns true if the current sessionId came from the url.
Overrides:
isRequestedSessionIdFromURL in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
true if the session ID came in as part of a URL; otherwise, false
See Also:
HttpServletRequest.getSession(boolean)

isRequestedSessionIdFromUrl

public boolean isRequestedSessionIdFromUrl()
Deprecated.  

Overrides:
isRequestedSessionIdFromUrl in class AbstractRequest

getRequestedSessionId

public java.lang.String getRequestedSessionId()
Returns the session id in the HTTP request. The cookie has priority over the URL. Because the application might be using the cookie to change the page contents, the caching sets vary: JSESSIONID.
Overrides:
getRequestedSessionId in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Returns:
a String specifying the session ID, or null if the request did not specify a session ID
See Also:
HttpServletRequest.isRequestedSessionIdValid()

findSessionIdFromConnection

public java.lang.String findSessionIdFromConnection()
For SSL connections, use the SSL identifier.

getSessionGroup

public int getSessionGroup()
Overrides:
getSessionGroup in class AbstractRequest

getParameterNames

public java.util.Enumeration getParameterNames()
Returns an enumeration of the form names.
Overrides:
getParameterNames in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
an Enumeration of String objects, each String containing the name of a request parameter; or an empty Enumeration if the request has no parameters

getParameterMap

public java.util.Map getParameterMap()
Returns a map of the form.
Following copied from interface: javax.servlet.ServletRequest
Returns:
an immutable java.util.Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
Returns the form's values for the given name.
Overrides:
getParameterValues in class AbstractRequest
Parameters:
name - key in the form
Returns:
value matching the key

getParameter

public java.lang.String getParameter(java.lang.String name)
Returns the form primary value for the given name.
Overrides:
getParameter in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Parameters:
name - a String specifying the name of the parameter
Returns:
a String representing the single value of the parameter
See Also:
ServletRequest.getParameterValues(java.lang.String)

getAttributeNames

public java.util.Enumeration getAttributeNames()
Description copied from interface: ServletRequest
Returns an Enumeration containing the names of the attributes available to this request. This method returns an empty Enumeration if the request has no attributes available to it.
Overrides:
getAttributeNames in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
an Enumeration of strings containing the names of the request's attributes

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Description copied from interface: ServletRequest
Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.

Attributes can be set two ways. The servlet container may set attributes to make available custom information about a request. For example, for requests made using HTTPS, the attribute javax.servlet.request.X509Certificate can be used to retrieve information on the certificate of the client. Attributes can also be set programatically using ServletRequest.setAttribute(java.lang.String, java.lang.Object). This allows information to be embedded into a request before a RequestDispatcher call.

Attribute names should follow the same conventions as package names. This specification reserves names matching java.*, javax.*, and sun.*.

Overrides:
getAttribute in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Parameters:
name - a String specifying the name of the attribute
Returns:
an Object containing the value of the attribute, or null if the attribute does not exist

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Description copied from interface: ServletRequest
Stores an attribute in this request. Attributes are reset between requests. This method is most often used in conjunction with RequestDispatcher.

Attribute names should follow the same conventions as package names. Names beginning with java.*, javax.*, and com.sun.*, are reserved for use by Sun Microsystems.

Overrides:
setAttribute in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Parameters:
name - a String specifying the name of the attribute
o - the Object to be stored

removeAttribute

public void removeAttribute(java.lang.String name)
Description copied from interface: ServletRequest
Removes an attribute from this request. This method is not generally needed as attributes only persist as long as the request is being handled.

Attribute names should follow the same conventions as package names. Names beginning with java.*, javax.*, and com.sun.*, are reserved for use by Sun Microsystems.

Overrides:
removeAttribute in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Parameters:
name - a String specifying the name of the attribute to remove

getHeaders

public java.util.Enumeration getHeaders(java.lang.String name)
Description copied from interface: HttpServletRequest
Returns all the values of the specified request header as an Enumeration of String objects.

Some headers, such as Accept-Language can be sent by clients as several headers each with a different value rather than sending the header as a comma separated list.

If the request did not include any headers of the specified name, this method returns an empty Enumeration. The header name is case insensitive. You can use this method with any request header.

Overrides:
getHeaders in class AbstractRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Parameters:
name - a String specifying the header name
Returns:
an Enumeration containing the values of the requested header. If the request does not have any headers of that name return an empty enumeration. If the container does not allow access to header information, return null

getLocale

public java.util.Locale getLocale()
Description copied from interface: ServletRequest
Returns the preferred Locale that the client will accept content in, based on the Accept-Language header. If the client request doesn't provide an Accept-Language header, this method returns the default locale for the server.
Overrides:
getLocale in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
the preferred Locale for the client

getLocales

public java.util.Enumeration getLocales()
Description copied from interface: ServletRequest
Returns an Enumeration of Locale objects indicating, in decreasing order starting with the preferred locale, the locales that are acceptable to the client based on the Accept-Language header. If the client request doesn't provide an Accept-Language header, this method returns an Enumeration containing one Locale, the default locale for the server.
Overrides:
getLocales in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
an Enumeration of preferred Locale objects for the client

isSecure

public boolean isSecure()
Description copied from interface: ServletRequest
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.
Overrides:
isSecure in class AbstractRequest
Following copied from interface: javax.servlet.ServletRequest
Returns:
a boolean indicating if the request was made using a secure channel

getApplication

public Application getApplication()
Returns the request's Application.

getRequestApplication

public Application getRequestApplication()

getThreadRequest

public static Request getThreadRequest()
Returns the request associated with the current thread.

getDate

public long getDate()
Returns the date for the current request.
Overrides:
getDate in class AbstractRequest

isTesting

public boolean isTesting()