com.caucho.server.webapp
Class AsyncRequest

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

public class AsyncRequest
extends CauchoRequestWrapper


Nested Class Summary
 
Nested classes/interfaces inherited from class com.caucho.server.http.AbstractCauchoRequest
AbstractCauchoRequest.PartImpl
 
Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
AsyncRequest(HttpServletRequestImpl request, HttpServletResponseImpl response, Invocation invocation)
           
 
Method Summary
protected  java.lang.String calculateQueryString()
           
 java.lang.Object getAttribute(java.lang.String name)
          Returns an attribute value.
 java.lang.String getContextPath()
          Returns the part of the URI corresponding to the application's prefix.
 DispatcherType getDispatcherType()
          Returns DispatcherType
protected  Invocation getInvocation()
           
 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 the form primary value for the given name.
 java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
          Returns a map of the form.
 java.util.Enumeration<java.lang.String> 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 URI part after the selected servlet and null if there is no suffix.
 java.lang.String getQueryString()
          Returns the request's query string.
 java.lang.String getRequestURI()
          Returns the entire request URI
 ServletContext getServletContext()
          Returns the servlet context for the request
 java.lang.String getServletName()
           
 java.lang.String getServletPath()
          Returns the URI part corresponding to the selected servlet.
 WebApp getWebApp()
           
 boolean isAsyncSupported()
          Returns true if the request supports async
 AsyncContext startAsync()
          Starts an async/comet mode
 
Methods inherited from class com.caucho.server.http.CauchoRequestWrapper
getAbstractHttpRequest, getAsyncContext, getAttributeNames, getAuthType, getCharacterEncoding, getContentLength, getContentType, getCookie, getCookies, getDateHeader, getHasCookie, getHeader, getHeaderNames, getHeaders, getInputStream, getIntHeader, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getMemorySession, getMethod, getPart, getParts, getPathTranslated, getProtocol, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getRemoteUser, getRequest, getRequestDepth, getRequestDispatcher, getRequestedSessionId, getRequestURL, getResponse, getScheme, getServerName, getServerPort, getServletResponse, getSessionId, getStream, getVaryCookies, hasRequest, isAsyncStarted, isComet, isConnectionClosed, isDelegateMultipartEnabled, isDuplex, isLoginRequested, isMultipartEnabled, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isSecure, isSessionIdFromCookie, isSuspend, isSyntheticCacheHeader, isTop, isWrapperFor, isWrapperFor, killKeepalive, logout, removeAttribute, requestLogin, setAttribute, setCharacterEncoding, setHasCookie, setHeader, setRequest, setResponse, setSessionId, setSyntheticCacheHeader, setVaryCookie, startAsync, toString
 
Methods inherited from class com.caucho.server.http.AbstractCauchoRequest
addCloseOnExit, authenticate, finishRequest, getLoadedSession, getParameterImpl, getParameterMapImpl, getParameterNamesImpl, getParameterValuesImpl, getRealPath, getRunAs, getServer, getSession, getSession, getSessionCookie, getSessionGroup, getSessionManager, getSocketLink, getStream, getUserPrincipal, isUserInRole, login, login, mergeParameters, parseGetQueryImpl, parsePostQueryImpl, parseQueryImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AsyncRequest

public AsyncRequest(HttpServletRequestImpl request,
                    HttpServletResponseImpl response,
                    Invocation invocation)
Method Detail

getInvocation

protected Invocation getInvocation()
Overrides:
getInvocation in class AbstractCauchoRequest

getServletContext

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

Specified by:
getServletContext in interface ServletRequest
Overrides:
getServletContext in class CauchoRequestWrapper

getDispatcherType

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

Specified by:
getDispatcherType in interface ServletRequest
Overrides:
getDispatcherType in class CauchoRequestWrapper
Returns:

getRequestURI

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

Specified by:
getRequestURI in interface HttpServletRequest
Overrides:
getRequestURI in class CauchoRequestWrapper

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
Overrides:
getContextPath in class CauchoRequestWrapper

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
Overrides:
getServletPath in class CauchoRequestWrapper

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
Overrides:
getPathInfo in class CauchoRequestWrapper

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
Overrides:
getQueryString in class CauchoRequestWrapper

calculateQueryString

protected java.lang.String calculateQueryString()

getPageURI

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

getPageContextPath

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

getPageServletPath

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

getPagePathInfo

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

getPageQueryString

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

getWebApp

public WebApp getWebApp()
Specified by:
getWebApp in interface CauchoRequest
Overrides:
getWebApp in class CauchoRequestWrapper

isAsyncSupported

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

Specified by:
isAsyncSupported in interface ServletRequest
Overrides:
isAsyncSupported in class CauchoRequestWrapper

startAsync

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

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

getServletName

public java.lang.String getServletName()

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
Overrides:
getAttribute in class CauchoRequestWrapper
Parameters:
name - the attribute name
Returns:
the attribute value

getParameterNames

public java.util.Enumeration<java.lang.String> getParameterNames()
Returns an enumeration of the form names.

Specified by:
getParameterNames in interface ServletRequest
Overrides:
getParameterNames in class CauchoRequestWrapper

getParameterMap

public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
Returns a map of the form.

Specified by:
getParameterMap in interface ServletRequest
Overrides:
getParameterMap in class CauchoRequestWrapper

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
Returns the form's values for the given name.

Specified by:
getParameterValues in interface ServletRequest
Overrides:
getParameterValues in class CauchoRequestWrapper
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.

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