com.caucho.server.http
Class HttpServletRequestImpl

java.lang.Object
  extended by com.caucho.server.http.AbstractCauchoRequest
      extended by com.caucho.server.http.HttpServletRequestImpl
All Implemented Interfaces:
CauchoRequest, WebSocketServletRequest, HttpServletRequest, ServletRequest

public final class HttpServletRequestImpl
extends AbstractCauchoRequest
implements CauchoRequest, WebSocketServletRequest

User facade for http requests.


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
HttpServletRequestImpl(AbstractHttpRequest request)
          Create a new Request.
 
Method Summary
 void addCloseOnExit(Path path)
          Adds a file to be removed at the end.
 void cleanup()
           
protected  java.lang.String findSessionIdFromCookie()
          Returns the session id in the HTTP request cookies.
 void finishInvocation()
           
protected  void finishRequest()
           
 AbstractHttpRequest getAbstractHttpRequest()
           
 AsyncContextImpl getAsyncContext()
          Returns the async context for the request
 java.lang.Object getAttribute(java.lang.String name)
          Returns the value of the named request attribute.
 java.util.Enumeration<java.lang.String> getAttributeNames()
          Returns an enumeration of the request attribute names.
 java.lang.String getAuthType()
          Gets the authorization type
 java.lang.String getCharacterEncoding()
          Returns the character encoding of the POSTed data.
 SocketLink getConnection()
           
 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 context part of the uri.
 Cookie getCookie(java.lang.String name)
          Returns the named cookie from the browser
 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()
          True if this page uses cookies.
 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.
 Invocation getInvocation()
           
 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.
protected  Login getLogin()
          Returns the login for the request.
 java.lang.String getMethod()
          Returns the HTTP method, e.g.
 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 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 prococol, e.g.
 java.lang.String getQueryString()
          Returns the current page's query string.
 java.io.BufferedReader getReader()
          Returns a reader to read POSTed data.
 java.lang.String getRealPath(java.lang.String path)
          Deprecated. As of JSDK 2.1
 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()
          Gets the remote user from the authorization type
 java.lang.String getRemoteUser(boolean create)
          Internal logging return to get the remote user.
 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 in the HTTP request.
 java.lang.String getRequestedSessionIdNoVary()
          Returns the session id in the HTTP request.
 java.lang.String getRequestURI()
          Returns the URI for the request
 java.lang.StringBuffer getRequestURL()
          Returns the URL for the request
 HttpServletResponseImpl getResponse()
           
protected  java.lang.String getRunAs()
           
 java.lang.String getScheme()
          Returns the request scheme, e.g.
 Server getServer()
           
 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 getServletName()
          Returns the servlet name.
 java.lang.String getServletPath()
          Returns the portion of the uri mapped to the servlet for the original request.
 ServletResponse getServletResponse()
          Returns the servlet response for the request
 java.lang.String getSessionId()
           
 long getStartTime()
           
 ReadStream getStream()
           
 ReadStream getStream(boolean isFlush)
           
 boolean getVaryCookies()
          Returns true if the page depends on cookies.
 WebApp getWebApp()
          Returns the invocation's webApp.
 boolean hasRequest()
           
 boolean isAsyncStarted()
          Returns true if the request is in async.
 boolean isAsyncSupported()
          Returns true if the request supports async
 boolean isClosed()
           
 boolean isComet()
           
 boolean isConnectionClosed()
           
 boolean isDuplex()
           
 boolean isLoginRequested()
          Returns true if any authentication is requested
 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 isSecure()
          Returns true if the connection is secure, e.g.
 boolean isSessionIdFromCookie()
           
 boolean isSuspend()
           
 boolean isSyntheticCacheHeader()
           
 boolean isTop()
           
 void killKeepalive(java.lang.String reason)
           
 void logout()
          Logs out the principal.
 void logoutUserPrincipal()
          Clear the principal from the request object.
 void removeAttribute(java.lang.String name)
          Removes the value of the named request attribute.
 void requestLogin()
           
 java.lang.String runAs(java.lang.String role)
          Sets the overriding role.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Sets the value of the named request attribute.
 void setCharacterEncoding(java.lang.String encoding)
          Overrides the character encoding specified in the request.
 void setHasCookie()
          Set when the page actually has a cookie.
 void setHeader(java.lang.String key, java.lang.String value)
           
 void setInvocation(Invocation invocation)
           
 void setSecure(java.lang.Boolean isSecure)
           
 void setSessionId(java.lang.String sessionId)
           
 void setSyntheticCacheHeader(boolean isSynthetic)
           
 void setVaryCookie(java.lang.String cookie)
          Called if the page depends on a cookie.
 AsyncContext startAsync()
          Starts an async mode
 AsyncContext startAsync(ServletRequest request, ServletResponse response)
          Starts an async mode
 WebSocketContext startWebSocket(WebSocketListener listener)
          Upgrade the current HTTP connection to a WebSocket connection
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.server.http.AbstractCauchoRequest
authenticate, getLoadedSession, getMemorySession, getParameter, getParameterImpl, getParameterMap, getParameterMapImpl, getParameterNames, getParameterNamesImpl, getParameterValues, getParameterValuesImpl, getPart, getParts, getRequest, getSession, getSession, getSessionCookie, getSessionGroup, getSessionManager, getSocketLink, getUserPrincipal, isMultipartEnabled, isRequestedSessionIdValid, isUserInRole, login, login, mergeParameters, parseGetQueryImpl, parsePostQueryImpl, parseQueryImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.server.http.CauchoRequest
getMemorySession, getSocketLink, isMultipartEnabled, login
 
Methods inherited from interface javax.servlet.http.HttpServletRequest
authenticate, getPart, getParts, getSession, getSession, getUserPrincipal, isRequestedSessionIdValid, isUserInRole, login
 
Methods inherited from interface javax.servlet.ServletRequest
getParameter, getParameterMap, getParameterNames, getParameterValues
 

Constructor Detail

HttpServletRequestImpl

public HttpServletRequestImpl(AbstractHttpRequest request)
Create a new Request. Because the actual initialization occurs with the start() method, this just allocates statics.

Parameters:
request -
Method Detail

getResponse

public HttpServletResponseImpl getResponse()
Specified by:
getResponse in class AbstractCauchoRequest

getProtocol

public java.lang.String getProtocol()
Returns the prococol, e.g. "HTTP/1.1"

Specified by:
getProtocol in interface ServletRequest

getScheme

public java.lang.String getScheme()
Returns the request scheme, e.g. "http"

Specified by:
getScheme in interface ServletRequest

getServerName

public java.lang.String getServerName()
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()
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), isSecure() is provided for that purpose.

Specified by:
getServerPort in interface ServletRequest

getRemoteAddr

public java.lang.String getRemoteAddr()
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()
Returns the DNS hostname of the remote host, i.e. the client browser.

Specified by:
getRemoteHost in interface ServletRequest

getRemotePort

public int getRemotePort()
Returns the port of the remote host, i.e. the client browser.

Specified by:
getRemotePort in interface ServletRequest
Since:
2.4

getLocalAddr

public 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.

Specified by:
getLocalAddr in interface ServletRequest
Since:
2.4

getLocalName

public java.lang.String getLocalName()
Returns the IP address of the local host, i.e. the server. This call returns the name 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:
getLocalName in interface ServletRequest
Since:
2.4

getLocalPort

public int getLocalPort()
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), isSecure() is provided for that purpose.

Specified by:
getLocalPort in interface ServletRequest
Since:
2.4

setCharacterEncoding

public void setCharacterEncoding(java.lang.String encoding)
                          throws java.io.UnsupportedEncodingException
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

getInputStream

public ServletInputStream getInputStream()
                                  throws java.io.IOException
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
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()
Returns the character encoding of the POSTed data.

Specified by:
getCharacterEncoding in interface ServletRequest

getContentLength

public int getContentLength()
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()
Returns the request's mime-type.

Specified by:
getContentType in interface ServletRequest

getLocale

public java.util.Locale getLocale()
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()
Returns an enumeration of all locales acceptable by the client.

Specified by:
getLocales in interface ServletRequest

isSecure

public boolean isSecure()
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)
Returns the value of the named request attribute.

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

getAttributeNames

public java.util.Enumeration<java.lang.String> getAttributeNames()
Returns an enumeration of the request attribute names.

Specified by:
getAttributeNames in interface ServletRequest

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Sets the value of the named request attribute.

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

removeAttribute

public void removeAttribute(java.lang.String name)
Removes the value of the named request attribute.

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

getRequestDispatcher

public RequestDispatcher getRequestDispatcher(java.lang.String path)
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
Overrides:
getRequestDispatcher in class AbstractCauchoRequest
Parameters:
path - path relative to getRequestURI() (including query string) for the included file.
Returns:
RequestDispatcher for later inclusion or forwarding.

getServletContext

public ServletContext getServletContext()
Returns the servlet context for the request

Specified by:
getServletContext in interface ServletRequest
Since:
Servlet 3.0

getServletResponse

public ServletResponse getServletResponse()
Returns the servlet response for the request

Specified by:
getServletResponse in interface CauchoRequest
Since:
Servlet 3.0

getMethod

public java.lang.String getMethod()
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()
Returns the URI for the request

Specified by:
getRequestURI in interface 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.

Specified by:
getPageURI in interface CauchoRequest

getContextPath

public java.lang.String getContextPath()
Returns the context part of the uri. The context part is the part that maps to an webApp.

Specified by:
getContextPath in interface HttpServletRequest

getPageContextPath

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

Specified by:
getPageContextPath in interface CauchoRequest

getServletPath

public java.lang.String getServletPath()
Returns the portion of the uri mapped to the servlet for the original request.

Specified by:
getServletPath in interface HttpServletRequest

getPageServletPath

public java.lang.String getPageServletPath()
Returns the portion of the uri mapped to the servlet for the current page.

Specified by:
getPageServletPath in interface CauchoRequest

getPathInfo

public java.lang.String getPathInfo()
Returns the portion of the uri after the servlet path for the original request.

Specified by:
getPathInfo in interface HttpServletRequest

getPagePathInfo

public java.lang.String getPagePathInfo()
Returns the portion of the uri after the servlet path for the current page.

Specified by:
getPagePathInfo in interface CauchoRequest

getRequestURL

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

Specified by:
getRequestURL in interface HttpServletRequest
Overrides:
getRequestURL in class AbstractCauchoRequest

getRealPath

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

Description copied from interface: ServletRequest
Returns the path of the URI.

Specified by:
getRealPath in interface ServletRequest
Overrides:
getRealPath in class AbstractCauchoRequest

getPathTranslated

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

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

getQueryString

public java.lang.String getQueryString()
Returns the current page's query string.

Specified by:
getQueryString in interface HttpServletRequest

getPageQueryString

public java.lang.String getPageQueryString()
Returns the current page's query string.

Specified by:
getPageQueryString in interface CauchoRequest

getHeader

public java.lang.String getHeader(java.lang.String name)
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)
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()
Returns an enumeration of all headers sent by the client.

Specified by:
getHeaderNames in interface HttpServletRequest

getIntHeader

public int getIntHeader(java.lang.String name)
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)
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()
Returns an array of all cookies sent by the client.

Specified by:
getCookies in interface HttpServletRequest

getCookie

public Cookie getCookie(java.lang.String name)
Returns the named cookie from the browser

Specified by:
getCookie in interface CauchoRequest

getRequestedSessionId

public java.lang.String getRequestedSessionId()
Returns the session id in the HTTP request. The cookie has priority over the URL. Because the webApp might be using the cookie to change the page contents, the caching sets vary: JSESSIONID.

Specified by:
getRequestedSessionId in interface HttpServletRequest

findSessionIdFromCookie

protected java.lang.String findSessionIdFromCookie()
Returns the session id in the HTTP request cookies. Because the webApp might use the cookie to change the page contents, the caching sets vary: JSESSIONID.


isSessionIdFromCookie

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

getSessionId

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

setSessionId

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

isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()
Returns true if the current sessionId came from a cookie.

Specified by:
isRequestedSessionIdFromCookie in interface HttpServletRequest

isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()
Returns true if the current sessionId came from the url.

Specified by:
isRequestedSessionIdFromURL in interface HttpServletRequest

isRequestedSessionIdFromUrl

public boolean isRequestedSessionIdFromUrl()
Deprecated. 

Specified by:
isRequestedSessionIdFromUrl in interface HttpServletRequest

getRequestedSessionIdNoVary

public java.lang.String getRequestedSessionIdNoVary()
Returns the session id in the HTTP request. The cookie has priority over the URL. Because the webApp might be using the cookie to change the page contents, the caching sets vary: JSESSIONID.


getRunAs

protected java.lang.String getRunAs()
Overrides:
getRunAs in class AbstractCauchoRequest

getAuthType

public java.lang.String getAuthType()
Gets the authorization type

Specified by:
getAuthType in interface HttpServletRequest

getLogin

protected Login getLogin()
Returns the login for the request.


isLoginRequested

public boolean isLoginRequested()
Returns true if any authentication is requested

Specified by:
isLoginRequested in interface CauchoRequest
Specified by:
isLoginRequested in class AbstractCauchoRequest

requestLogin

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

getRemoteUser

public java.lang.String getRemoteUser()
Gets the remote user from the authorization type

Specified by:
getRemoteUser in interface HttpServletRequest

getRemoteUser

public java.lang.String getRemoteUser(boolean create)
Internal logging return to get the remote user. If the request already knows the user, get it, otherwise just return null.


logout

public void logout()
Logs out the principal.

Specified by:
logout in interface HttpServletRequest

logoutUserPrincipal

public void logoutUserPrincipal()
Clear the principal from the request object.


runAs

public java.lang.String runAs(java.lang.String role)
Sets the overriding role.


setSecure

public void setSecure(java.lang.Boolean isSecure)

getStream

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

getStream

public ReadStream getStream(boolean isFlush)
                     throws java.io.IOException
Overrides:
getStream in class AbstractCauchoRequest
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

setSyntheticCacheHeader

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

isSyntheticCacheHeader

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

setVaryCookie

public void setVaryCookie(java.lang.String cookie)
Called if the page depends on a cookie. If the cookie is null, then the page depends on all cookies.

Specified by:
setVaryCookie in interface CauchoRequest
Parameters:
cookie - the cookie the page depends on.

getVaryCookies

public boolean getVaryCookies()
Returns true if the page depends on cookies.

Specified by:
getVaryCookies in interface CauchoRequest

setHasCookie

public void setHasCookie()
Set when the page actually has a cookie.

Specified by:
setHasCookie in interface CauchoRequest

getHasCookie

public boolean getHasCookie()
True if this page uses cookies.

Specified by:
getHasCookie in interface CauchoRequest

isTop

public boolean isTop()
Specified by:
isTop in interface CauchoRequest
Overrides:
isTop in class AbstractCauchoRequest

isComet

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

addCloseOnExit

public void addCloseOnExit(Path path)
Adds a file to be removed at the end.

Overrides:
addCloseOnExit in class AbstractCauchoRequest

isDuplex

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

killKeepalive

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

isConnectionClosed

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

getConnection

public SocketLink getConnection()

getAbstractHttpRequest

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

isSuspend

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

hasRequest

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

setInvocation

public void setInvocation(Invocation invocation)

getInvocation

public Invocation getInvocation()
Overrides:
getInvocation in class AbstractCauchoRequest

getStartTime

public long getStartTime()

finishInvocation

public void finishInvocation()

isAsyncStarted

public boolean isAsyncStarted()
Returns true if the request is in async.

Specified by:
isAsyncStarted in interface ServletRequest
Since:
Servlet 3.0

isAsyncSupported

public boolean isAsyncSupported()
Returns true if the request supports async

Specified by:
isAsyncSupported in interface ServletRequest
Since:
Servlet 3.0

startAsync

public AsyncContext startAsync()
Starts an async mode

Specified by:
startAsync in interface ServletRequest
Since:
Servlet 3.0

startAsync

public AsyncContext startAsync(ServletRequest request,
                               ServletResponse response)
Starts an async mode

Specified by:
startAsync in interface ServletRequest
Since:
Servlet 3.0

getAsyncContext

public AsyncContextImpl getAsyncContext()
Returns the async context for the request

Specified by:
getAsyncContext in interface ServletRequest
Since:
Servlet 3.0

startWebSocket

public WebSocketContext startWebSocket(WebSocketListener listener)
                                throws java.io.IOException
Description copied from interface: WebSocketServletRequest
Upgrade the current HTTP connection to a WebSocket connection

Specified by:
startWebSocket in interface WebSocketServletRequest
Throws:
java.io.IOException

getDispatcherType

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

Specified by:
getDispatcherType in interface ServletRequest
Returns:

finishRequest

protected void finishRequest()
                      throws java.io.IOException
Overrides:
finishRequest in class AbstractCauchoRequest
Throws:
java.io.IOException

cleanup

public void cleanup()

getServletName

public java.lang.String getServletName()
Returns the servlet name.


getServer

public final Server getServer()
Overrides:
getServer in class AbstractCauchoRequest

getWebApp

public final WebApp getWebApp()
Returns the invocation's webApp.

Specified by:
getWebApp in interface CauchoRequest

isClosed

public boolean isClosed()

toString

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