com.caucho.server.http
Class CauchoRequestWrapper

java.lang.Object
  extended by com.caucho.server.http.CauchoRequestWrapper
All Implemented Interfaces:
CauchoRequest, HttpServletRequest, ServletRequest
Direct Known Subclasses:
AsyncRequest, AsyncRequest

public class CauchoRequestWrapper
extends java.lang.Object
implements CauchoRequest


Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
CauchoRequestWrapper()
           
CauchoRequestWrapper(HttpServletRequest request)
           
 
Method Summary
 boolean authenticate(HttpServletResponse response)
           
 AbstractHttpRequest getAbstractHttpRequest()
           
 AsyncContext getAsyncContext()
          Returns the async context for the request
 java.lang.Object getAttribute(java.lang.String name)
          Returns an attribute value.
 java.util.Enumeration<java.lang.String> getAttributeNames()
          Enumerates all attribute names in the request.
 java.lang.String getAuthType()
          Returns the auth type, i.e.
 java.lang.String getCharacterEncoding()
          Returns the character encoding of the POSTed data.
 int getContentLength()
          Returns the content length of the data.
 java.lang.String getContentType()
          Returns the request's mime-type.
 java.lang.String getContextPath()
          Returns the part of the URI corresponding to the application's prefix.
 Cookie getCookie(java.lang.String name)
           
 Cookie[] getCookies()
          Returns an array of all cookies sent by the client.
 long getDateHeader(java.lang.String name)
          Converts a date header to milliseconds since the epoch.
 DispatcherType getDispatcherType()
          Returns DispatcherType
 boolean getHasCookie()
           
 java.lang.String getHeader(java.lang.String name)
          Returns the first value for a request header.
 java.util.Enumeration<java.lang.String> getHeaderNames()
          Returns an enumeration of all headers sent by the client.
 java.util.Enumeration<java.lang.String> getHeaders(java.lang.String name)
          Returns all the values for a request header.
 ServletInputStream getInputStream()
          Returns an InputStream to retrieve POST data from the request.
 int getIntHeader(java.lang.String name)
          Converts a header value to an integer.
 java.lang.String getLocalAddr()
          This call returns the ip of the host actually used to connect to the Resin server, which means that if ipchains, load balancing, or proxying is involved this call does not return the correct host for forming urls.
 java.util.Locale getLocale()
          Returns the request's preferred locale, based on the Accept-Language header.
 java.util.Enumeration<java.util.Locale> getLocales()
          Returns an enumeration of all locales acceptable by the client.
 java.lang.String getLocalName()
          Returns the IP address of the local host, i.e.
 int getLocalPort()
          Returns the port of the local host.
 HttpSession getMemorySession()
           
 java.lang.String getMethod()
          Returns the HTTP method, e.g.
 java.lang.String getPageContextPath()
           
 java.lang.String getPagePathInfo()
           
 java.lang.String getPageQueryString()
           
 java.lang.String getPageServletPath()
           
 java.lang.String getPageURI()
           
 java.lang.String getParameter(java.lang.String name)
          Returns a form parameter.
 java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
          Returns a Map of the form parameters.
 java.util.Enumeration<java.lang.String> getParameterNames()
          Returns an enumeration of all form parameter names.
 java.lang.String[] getParameterValues(java.lang.String name)
          Returns all values of a form parameter.
 Part getPart(java.lang.String name)
           
 java.util.Collection<Part> getParts()
           
 java.lang.String getPathInfo()
          Returns the URI part after the selected servlet and null if there is no suffix.
 java.lang.String getPathTranslated()
          Returns the real path of pathInfo.
 java.lang.String getProtocol()
          Returns the prococol, e.g.
 java.lang.String getQueryString()
          Returns the request's query string.
 java.io.BufferedReader getReader()
          Returns a reader to read POSTed data.
 java.lang.String getRealPath(java.lang.String uri)
          Returns the path of the URI.
 java.lang.String getRemoteAddr()
          Returns the IP address of the remote host, i.e.
 java.lang.String getRemoteHost()
          Returns the DNS hostname of the remote host, i.e.
 int getRemotePort()
          Returns the port of the remote host, i.e.
 java.lang.String getRemoteUser()
          Returns the remote user if authenticated.
 HttpServletRequest getRequest()
           
 int getRequestDepth(int depth)
           
 RequestDispatcher getRequestDispatcher(java.lang.String path)
          Returns a request dispatcher for later inclusion or forwarding.
 java.lang.String getRequestedSessionId()
          Returns the session id.
 java.lang.String getRequestURI()
          Returns the entire request URI
 java.lang.StringBuffer getRequestURL()
          Returns the URL for the request
 CauchoResponse getResponse()
           
 java.lang.String getScheme()
          Returns the request scheme, e.g.
 java.lang.String getServerName()
          Returns the server name handling the request.
 int getServerPort()
          Returns the server port used by the client, e.g.
 ServletContext getServletContext()
          Returns the servlet context for the request
 java.lang.String getServletPath()
          Returns the URI part corresponding to the selected servlet.
 ServletResponse getServletResponse()
           
 HttpSession getSession()
          Returns the current session, creating one if necessary.
 HttpSession getSession(boolean create)
          Returns a session.
 java.lang.String getSessionId()
           
 SocketLink getSocketLink()
           
 ReadStream getStream()
           
 java.security.Principal getUserPrincipal()
          Returns the equivalent principal object for the authenticated user.
 boolean getVaryCookies()
           
 WebApp getWebApp()
           
 boolean hasRequest()
           
 boolean isAsyncStarted()
          Returns true if the request is in async.
 boolean isAsyncSupported()
          Returns true if the request supports async
 boolean isComet()
           
 boolean isConnectionClosed()
           
 boolean isDuplex()
           
 boolean isLoginRequested()
           
 boolean isMultipartEnabled()
           
 boolean isRequestedSessionIdFromCookie()
          Returns true if the session came from a cookie.
 boolean isRequestedSessionIdFromUrl()
           
 boolean isRequestedSessionIdFromURL()
          Returns true if the session came URL-encoding.
 boolean isRequestedSessionIdValid()
          Returns true if the session is valid.
 boolean isSecure()
          Returns true if the connection is secure, e.g.
 boolean isSessionIdFromCookie()
           
 boolean isSuspend()
           
 boolean isSyntheticCacheHeader()
           
 boolean isTop()
           
 boolean isUserInRole(java.lang.String role)
          Returns true if the user is in the given role.
 boolean isWrapperFor(java.lang.Class<?> wrappedType)
           
 boolean isWrapperFor(ServletRequest wrapped)
           
 void killKeepalive(java.lang.String reason)
           
 boolean login(boolean isFail)
           
 void login(java.lang.String username, java.lang.String password)
           
 void logout()
           
 void removeAttribute(java.lang.String name)
          Removes the given attribute.
 void requestLogin()
           
 void setAttribute(java.lang.String name, java.lang.Object o)
          Sets an attribute value.
 void setCharacterEncoding(java.lang.String encoding)
          Overrides the character encoding specified in the request.
 void setHasCookie()
           
 void setHeader(java.lang.String key, java.lang.String value)
           
 void setRequest(HttpServletRequest request)
           
 void setResponse(CauchoResponse response)
           
 void setSessionId(java.lang.String sessionId)
           
 void setSyntheticCacheHeader(boolean isSynthetic)
           
 void setVaryCookie(java.lang.String cookie)
           
 AsyncContext startAsync()
          Starts an async/comet mode
 AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse)
          Starts an async mode
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CauchoRequestWrapper

public CauchoRequestWrapper()

CauchoRequestWrapper

public CauchoRequestWrapper(HttpServletRequest request)
Method Detail

setRequest

public void setRequest(HttpServletRequest request)

getRequest

public HttpServletRequest getRequest()

setResponse

public void setResponse(CauchoResponse response)

getResponse

public CauchoResponse getResponse()

getProtocol

public java.lang.String getProtocol()
Description copied from interface: ServletRequest
Returns the prococol, e.g. "HTTP/1.1"

Specified by:
getProtocol in interface ServletRequest

getScheme

public java.lang.String getScheme()
Description copied from interface: ServletRequest
Returns the request scheme, e.g. "http"

Specified by:
getScheme in interface ServletRequest

getServerName

public java.lang.String getServerName()
Description copied from interface: ServletRequest
Returns the server name handling the request. When using virtual hosts, this returns the virtual host name, e.g. "vhost1.caucho.com". This call returns the host name as the client sees it, which means that if ipchains, load balancing, or proxying is involved this call returns the correct call for forming urls, but may not contain the host that Resin is actually listening on.

Specified by:
getServerName in interface ServletRequest

getServerPort

public int getServerPort()
Description copied from interface: ServletRequest
Returns the server port used by the client, e.g. 80. This call returns the port number as the client sees it, which means that if ipchains, load balancing, or proxying is involved this call returns the correct call for forming urls, but may not return the actual port that Resin is listening on. This call should not be used to test for an ssl connection (getServerPort() == 443), ServletRequest.isSecure() is provided for that purpose.

Specified by:
getServerPort in interface ServletRequest

getRemoteAddr

public java.lang.String getRemoteAddr()
Description copied from interface: ServletRequest
Returns the IP address of the remote host, i.e. the client browser.

Specified by:
getRemoteAddr in interface ServletRequest

getRemoteHost

public java.lang.String getRemoteHost()
Description copied from interface: ServletRequest
Returns the DNS hostname of the remote host, i.e. the client browser.

Specified by:
getRemoteHost in interface ServletRequest

getRemotePort

public int getRemotePort()
Description copied from interface: ServletRequest
Returns the port of the remote host, i.e. the client browser.

Specified by:
getRemotePort in interface ServletRequest

getLocalAddr

public java.lang.String getLocalAddr()
Description copied from interface: ServletRequest
This call returns the ip of the host actually used to connect to the Resin server, which means that if ipchains, load balancing, or proxying is involved this call does not return the correct host for forming urls.

Specified by:
getLocalAddr in interface ServletRequest

getLocalName

public java.lang.String getLocalName()
Description copied from interface: ServletRequest
Returns the IP address of the local host, i.e. the server. This call returns the name of the host actaully used to connect to the Resin server, which means that if ipchains, load balancing, or proxying is involved this call does not return the correct host for forming urls.

Specified by:
getLocalName in interface ServletRequest

getLocalPort

public int getLocalPort()
Description copied from interface: ServletRequest
Returns the port of the local host. This call returns the port number actually used to connect to the Resin server, which means that if ipchains, load balancing, or proxying is involved this call does not return the correct port for forming urls. This call should not be used to test for an ssl connection (getServerPort() == 443), ServletRequest.isSecure() is provided for that purpose.

Specified by:
getLocalPort in interface ServletRequest

getParameter

public java.lang.String getParameter(java.lang.String name)
Description copied from interface: ServletRequest
Returns a form parameter. When the form contains several parameters of the same name, getParameter returns the first.

For example, calling getParameter("a") with the the query string a=1&a=2 will return "1".

Specified by:
getParameter in interface ServletRequest
Parameters:
name - the form parameter to return
Returns:
the form value or null if none matches.

getParameterMap

public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
Description copied from interface: ServletRequest
Returns a Map of the form parameters. The map is immutable. The keys are the form keys as returned by getParameterNames and the values are String arrays as returned by getParameterValues.

Specified by:
getParameterMap in interface ServletRequest

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
Description copied from interface: ServletRequest
Returns all values of a form parameter.

For example, calling getParameterValues("a") with the the query string a=1&a=2 will return ["1", "2"].

Specified by:
getParameterValues in interface ServletRequest
Parameters:
name - the form parameter to return
Returns:
an array of matching form values or null if none matches.

getParameterNames

public java.util.Enumeration<java.lang.String> getParameterNames()
Description copied from interface: ServletRequest
Returns an enumeration of all form parameter names.
 Enumeration e = request.getParameterNames();
 while (e.hasMoreElements()) {
   String name = (String) e.nextElement();
   out.println(name + ": " + request.getParameter(name));
 }
 

Specified by:
getParameterNames in interface ServletRequest

getInputStream

public ServletInputStream getInputStream()
                                  throws java.io.IOException
Description copied from interface: ServletRequest
Returns an InputStream to retrieve POST data from the request. The stream will automatically end when the end of the POST data is complete.

Specified by:
getInputStream in interface ServletRequest
Throws:
java.io.IOException

getReader

public java.io.BufferedReader getReader()
                                 throws java.io.IOException,
                                        java.lang.IllegalStateException
Description copied from interface: ServletRequest
Returns a reader to read POSTed data. Character encoding is based on the request data and is the same as getCharacterEncoding()

Specified by:
getReader in interface ServletRequest
Throws:
java.io.IOException
java.lang.IllegalStateException

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Description copied from interface: ServletRequest
Returns the character encoding of the POSTed data.

Specified by:
getCharacterEncoding in interface ServletRequest

setCharacterEncoding

public void setCharacterEncoding(java.lang.String encoding)
                          throws java.io.UnsupportedEncodingException
Description copied from interface: ServletRequest
Overrides the character encoding specified in the request. setCharacterEncoding must be called before calling getReader or reading any parameters.

Specified by:
setCharacterEncoding in interface ServletRequest
Throws:
java.io.UnsupportedEncodingException

getContentLength

public int getContentLength()
Description copied from interface: ServletRequest
Returns the content length of the data. This value may differ from the actual length of the data. Newer browsers supporting HTTP/1.1 may use "chunked" encoding which does not make the content length available.

The upshot is, rely on the input stream to end when the data completes.

Specified by:
getContentLength in interface ServletRequest

getContentType

public java.lang.String getContentType()
Description copied from interface: ServletRequest
Returns the request's mime-type.

Specified by:
getContentType in interface ServletRequest

getLocale

public java.util.Locale getLocale()
Description copied from interface: ServletRequest
Returns the request's preferred locale, based on the Accept-Language header. If unspecified, returns the server's default locale.

Specified by:
getLocale in interface ServletRequest

getLocales

public java.util.Enumeration<java.util.Locale> getLocales()
Description copied from interface: ServletRequest
Returns an enumeration of all locales acceptable by the client.

Specified by:
getLocales in interface ServletRequest

isSecure

public boolean isSecure()
Description copied from interface: ServletRequest
Returns true if the connection is secure, e.g. it uses SSL.

Specified by:
isSecure in interface ServletRequest

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Description copied from interface: ServletRequest
Returns an attribute value.

Specified by:
getAttribute in interface ServletRequest
Parameters:
name - the attribute name
Returns:
the attribute value

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object o)
Description copied from interface: ServletRequest
Sets an attribute value.

Specified by:
setAttribute in interface ServletRequest
Parameters:
name - the attribute name
o - the attribute value

getAttributeNames

public java.util.Enumeration<java.lang.String> getAttributeNames()
Description copied from interface: ServletRequest
Enumerates all attribute names in the request.

Specified by:
getAttributeNames in interface ServletRequest

removeAttribute

public void removeAttribute(java.lang.String name)
Description copied from interface: ServletRequest
Removes the given attribute.

Specified by:
removeAttribute in interface ServletRequest
Parameters:
name - the attribute name

getRequestDispatcher

public RequestDispatcher getRequestDispatcher(java.lang.String path)
Description copied from interface: ServletRequest
Returns a request dispatcher for later inclusion or forwarding. This is the servlet API equivalent to SSI includes. uri is relative to the request URI. Absolute URIs are relative to the application prefix (getContextPath()).

If getRequestURI() is /myapp/dir/test.jsp and the uri is "inc.jsp", the resulting page is /myapp/dir/inc.jsp.

   RequestDispatcher disp;
   disp = getRequestDispatcher("inc.jsp?a=b");
   disp.include(request, response);
 

Specified by:
getRequestDispatcher in interface ServletRequest
Parameters:
path - path relative to getRequestURI() (including query string) for the included file.
Returns:
RequestDispatcher for later inclusion or forwarding.

getServletContext

public ServletContext getServletContext()
Description copied from interface: ServletRequest
Returns the servlet context for the request

Specified by:
getServletContext in interface ServletRequest

startAsync

public AsyncContext startAsync()
                        throws java.lang.IllegalStateException
Description copied from interface: ServletRequest
Starts an async/comet mode

Specified by:
startAsync in interface ServletRequest
Throws:
java.lang.IllegalStateException

startAsync

public AsyncContext startAsync(ServletRequest servletRequest,
                               ServletResponse servletResponse)
                        throws java.lang.IllegalStateException
Description copied from interface: ServletRequest
Starts an async mode

Specified by:
startAsync in interface ServletRequest
Throws:
java.lang.IllegalStateException

getAsyncContext

public AsyncContext getAsyncContext()
Description copied from interface: ServletRequest
Returns the async context for the request

Specified by:
getAsyncContext in interface ServletRequest

isAsyncStarted

public boolean isAsyncStarted()
Description copied from interface: ServletRequest
Returns true if the request is in async.

Specified by:
isAsyncStarted in interface ServletRequest

isAsyncSupported

public boolean isAsyncSupported()
Description copied from interface: ServletRequest
Returns true if the request supports async

Specified by:
isAsyncSupported in interface ServletRequest

isWrapperFor

public boolean isWrapperFor(ServletRequest wrapped)

isWrapperFor

public boolean isWrapperFor(java.lang.Class<?> wrappedType)

getDispatcherType

public DispatcherType getDispatcherType()
Description copied from interface: ServletRequest
Returns DispatcherType

Specified by:
getDispatcherType in interface ServletRequest
Returns:

getMethod

public java.lang.String getMethod()
Description copied from interface: HttpServletRequest
Returns the HTTP method, e.g. "GET" or "POST"

Equivalent to CGI's REQUEST_METHOD

Specified by:
getMethod in interface HttpServletRequest

getRequestURI

public java.lang.String getRequestURI()
Description copied from interface: HttpServletRequest
Returns the entire request URI

Specified by:
getRequestURI in interface HttpServletRequest

getRequestURL

public java.lang.StringBuffer getRequestURL()
Returns the URL for the request

Specified by:
getRequestURL in interface HttpServletRequest

getContextPath

public java.lang.String getContextPath()
Description copied from interface: HttpServletRequest
Returns the part of the URI corresponding to the application's prefix. The first part of the URI selects applications (ServletContexts).

getContextPath() is /myapp for the uri /myapp/servlet/Hello,

Specified by:
getContextPath in interface HttpServletRequest

getServletPath

public java.lang.String getServletPath()
Description copied from interface: HttpServletRequest
Returns the URI part corresponding to the selected servlet. The URI is relative to the application. Returns an emtpy string for a servlet matched on /*

Corresponds to CGI's SCRIPT_NAME getServletPath() is /servlet/Hello for the uri /myapp/servlet/Hello/foo. getServletPath() is /dir/hello.jsp for the uri /myapp/dir/hello.jsp/foo,

Specified by:
getServletPath in interface HttpServletRequest

getPathInfo

public java.lang.String getPathInfo()
Description copied from interface: HttpServletRequest
Returns the URI part after the selected servlet and null if there is no suffix.

Corresponds to CGI's PATH_INFO

getPathInfo() is /foo for the uri /myapp/servlet/Hello/foo. getPathInfo() is /hello.jsp for for the uri /myapp/dir/hello.jsp/foo.

Specified by:
getPathInfo in interface HttpServletRequest

getPathTranslated

public java.lang.String getPathTranslated()
Returns the real path of pathInfo.

Specified by:
getPathTranslated in interface HttpServletRequest
Returns:
null if there is no path info.

getQueryString

public java.lang.String getQueryString()
Description copied from interface: HttpServletRequest
Returns the request's query string. Form based servlets will use ServletRequest.getParameter() to decode the form values.

Corresponds to CGI's PATH_TRANSLATED

Specified by:
getQueryString in interface HttpServletRequest

getHeader

public java.lang.String getHeader(java.lang.String name)
Description copied from interface: HttpServletRequest
Returns the first value for a request header.

Corresponds to CGI's HTTP_*

 String userAgent = request.getHeader("User-Agent");
 

Specified by:
getHeader in interface HttpServletRequest
Parameters:
name - the header name
Returns:
the header value

getHeaders

public java.util.Enumeration<java.lang.String> getHeaders(java.lang.String name)
Description copied from interface: HttpServletRequest
Returns all the values for a request header. In some rare cases, like cookies, browsers may return multiple headers.

Specified by:
getHeaders in interface HttpServletRequest
Parameters:
name - the header name
Returns:
an enumeration of the header values.

getHeaderNames

public java.util.Enumeration<java.lang.String> getHeaderNames()
Description copied from interface: HttpServletRequest
Returns an enumeration of all headers sent by the client.

Specified by:
getHeaderNames in interface HttpServletRequest

getIntHeader

public int getIntHeader(java.lang.String name)
Description copied from interface: HttpServletRequest
Converts a header value to an integer.

Specified by:
getIntHeader in interface HttpServletRequest
Parameters:
name - the header name
Returns:
the header value converted to an integer

getDateHeader

public long getDateHeader(java.lang.String name)
Description copied from interface: HttpServletRequest
Converts a date header to milliseconds since the epoch.

 long mod = request.getDateHeader("If-Modified-Since");
 

Specified by:
getDateHeader in interface HttpServletRequest
Parameters:
name - the header name
Returns:
the header value converted to an date

getCookies

public Cookie[] getCookies()
Description copied from interface: HttpServletRequest
Returns an array of all cookies sent by the client.

Specified by:
getCookies in interface HttpServletRequest

getRequestedSessionId

public java.lang.String getRequestedSessionId()
Description copied from interface: HttpServletRequest
Returns the session id. Sessions are a convenience for keeping user state across requests.

The session id is the value of the JSESSION cookie.

Specified by:
getRequestedSessionId in interface HttpServletRequest

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()
Description copied from interface: HttpServletRequest
Returns true if the session is valid.

Specified by:
isRequestedSessionIdValid in interface HttpServletRequest

isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()
Description copied from interface: HttpServletRequest
Returns true if the session came from a cookie.

Specified by:
isRequestedSessionIdFromCookie in interface HttpServletRequest

isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()
Description copied from interface: HttpServletRequest
Returns true if the session came URL-encoding.

Specified by:
isRequestedSessionIdFromURL in interface HttpServletRequest

setSessionId

public void setSessionId(java.lang.String sessionId)
Specified by:
setSessionId in interface CauchoRequest

getSessionId

public java.lang.String getSessionId()
Specified by:
getSessionId in interface CauchoRequest

isSessionIdFromCookie

public boolean isSessionIdFromCookie()
Specified by:
isSessionIdFromCookie in interface CauchoRequest

getAuthType

public java.lang.String getAuthType()
Description copied from interface: HttpServletRequest
Returns the auth type, i.e. BASIC, CLIENT-CERT, DIGEST, or FORM.

Specified by:
getAuthType in interface HttpServletRequest

getRemoteUser

public java.lang.String getRemoteUser()
Description copied from interface: HttpServletRequest
Returns the remote user if authenticated.

Specified by:
getRemoteUser in interface HttpServletRequest

isRequestedSessionIdFromUrl

public boolean isRequestedSessionIdFromUrl()
Specified by:
isRequestedSessionIdFromUrl in interface HttpServletRequest

getPart

public Part getPart(java.lang.String name)
             throws java.io.IOException,
                    ServletException
Specified by:
getPart in interface HttpServletRequest
Throws:
java.io.IOException
ServletException

getParts

public java.util.Collection<Part> getParts()
                                    throws java.io.IOException,
                                           ServletException
Specified by:
getParts in interface HttpServletRequest
Throws:
java.io.IOException
ServletException

isMultipartEnabled

public boolean isMultipartEnabled()
Specified by:
isMultipartEnabled in interface CauchoRequest

logout

public void logout()
            throws ServletException
Specified by:
logout in interface HttpServletRequest
Throws:
ServletException

getPageURI

public java.lang.String getPageURI()
Specified by:
getPageURI in interface CauchoRequest

getPageContextPath

public java.lang.String getPageContextPath()
Specified by:
getPageContextPath in interface CauchoRequest

getPageServletPath

public java.lang.String getPageServletPath()
Specified by:
getPageServletPath in interface CauchoRequest

getPagePathInfo

public java.lang.String getPagePathInfo()
Specified by:
getPagePathInfo in interface CauchoRequest

getPageQueryString

public java.lang.String getPageQueryString()
Specified by:
getPageQueryString in interface CauchoRequest

getWebApp

public WebApp getWebApp()
Specified by:
getWebApp in interface CauchoRequest

getStream

public ReadStream getStream()
                     throws java.io.IOException
Specified by:
getStream in interface CauchoRequest
Throws:
java.io.IOException

getRequestDepth

public int getRequestDepth(int depth)
Specified by:
getRequestDepth in interface CauchoRequest

setHeader

public void setHeader(java.lang.String key,
                      java.lang.String value)
Specified by:
setHeader in interface CauchoRequest

isSyntheticCacheHeader

public boolean isSyntheticCacheHeader()
Specified by:
isSyntheticCacheHeader in interface CauchoRequest

setSyntheticCacheHeader

public void setSyntheticCacheHeader(boolean isSynthetic)
Specified by:
setSyntheticCacheHeader in interface CauchoRequest

getVaryCookies

public boolean getVaryCookies()
Specified by:
getVaryCookies in interface CauchoRequest

setVaryCookie

public void setVaryCookie(java.lang.String cookie)
Specified by:
setVaryCookie in interface CauchoRequest

getHasCookie

public boolean getHasCookie()
Specified by:
getHasCookie in interface CauchoRequest

isTop

public boolean isTop()
Specified by:
isTop in interface CauchoRequest

hasRequest

public boolean hasRequest()
Specified by:
hasRequest in interface CauchoRequest

getMemorySession

public HttpSession getMemorySession()
Specified by:
getMemorySession in interface CauchoRequest

getCookie

public Cookie getCookie(java.lang.String name)
Specified by:
getCookie in interface CauchoRequest

setHasCookie

public void setHasCookie()
Specified by:
setHasCookie in interface CauchoRequest

killKeepalive

public void killKeepalive(java.lang.String reason)
Specified by:
killKeepalive in interface CauchoRequest

isSuspend

public boolean isSuspend()
Specified by:
isSuspend in interface CauchoRequest

isComet

public boolean isComet()
Specified by:
isComet in interface CauchoRequest

isDuplex

public boolean isDuplex()
Specified by:
isDuplex in interface CauchoRequest

isConnectionClosed

public boolean isConnectionClosed()
Specified by:
isConnectionClosed in interface CauchoRequest

isLoginRequested

public boolean isLoginRequested()
Specified by:
isLoginRequested in interface CauchoRequest

requestLogin

public void requestLogin()
Specified by:
requestLogin in interface CauchoRequest

getServletResponse

public ServletResponse getServletResponse()
Specified by:
getServletResponse in interface CauchoRequest

getAbstractHttpRequest

public AbstractHttpRequest getAbstractHttpRequest()
Specified by:
getAbstractHttpRequest in interface CauchoRequest

getSession

public HttpSession getSession(boolean create)
Description copied from interface: HttpServletRequest
Returns a session. If no session exists and create is true, then create a new session, otherwise return null.

Specified by:
getSession in interface HttpServletRequest
Parameters:
create - If true, then create a new session if none exists.

getSession

public HttpSession getSession()
Description copied from interface: HttpServletRequest
Returns the current session, creating one if necessary. Sessions are a convenience for keeping user state across requests.

Specified by:
getSession in interface HttpServletRequest

isUserInRole

public boolean isUserInRole(java.lang.String role)
Description copied from interface: HttpServletRequest
Returns true if the user is in the given role.

Specified by:
isUserInRole in interface HttpServletRequest

getUserPrincipal

public java.security.Principal getUserPrincipal()
Description copied from interface: HttpServletRequest
Returns the equivalent principal object for the authenticated user.

Specified by:
getUserPrincipal in interface HttpServletRequest

authenticate

public boolean authenticate(HttpServletResponse response)
                     throws java.io.IOException,
                            ServletException
Specified by:
authenticate in interface HttpServletRequest
Throws:
java.io.IOException
ServletException

login

public void login(java.lang.String username,
                  java.lang.String password)
           throws ServletException
Specified by:
login in interface HttpServletRequest
Throws:
ServletException

getRealPath

public java.lang.String getRealPath(java.lang.String uri)
Description copied from interface: ServletRequest
Returns the path of the URI.

Specified by:
getRealPath in interface ServletRequest

login

public boolean login(boolean isFail)
Specified by:
login in interface CauchoRequest

getSocketLink

public SocketLink getSocketLink()
Specified by:
getSocketLink in interface CauchoRequest

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object