|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.http.AbstractCauchoRequest
com.caucho.server.http.CauchoRequestWrapper
public class 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 | |
|---|---|
CauchoRequestWrapper()
|
|
CauchoRequestWrapper(HttpServletRequest request)
|
|
| Method Summary | |
|---|---|
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()
Returns the memory session. |
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 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. |
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 |
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()
Returns the next request in a chain. |
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()
|
java.lang.String |
getSessionId()
|
ReadStream |
getStream()
|
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()
|
protected boolean |
isDelegateMultipartEnabled()
|
boolean |
isDuplex()
|
boolean |
isLoginRequested()
Returns true if any authentication is requested |
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 HTTP request's session id refers to a valid session. |
boolean |
isSecure()
Returns true if the connection is secure, e.g. |
boolean |
isSessionIdFromCookie()
|
boolean |
isSuspend()
|
boolean |
isSyntheticCacheHeader()
|
boolean |
isTop()
|
boolean |
isWrapperFor(java.lang.Class<?> wrappedType)
|
boolean |
isWrapperFor(ServletRequest wrapped)
|
void |
killKeepalive(java.lang.String reason)
|
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 com.caucho.server.http.AbstractCauchoRequest |
|---|
addCloseOnExit, authenticate, finishRequest, getInvocation, 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 |
|---|
public CauchoRequestWrapper()
public CauchoRequestWrapper(HttpServletRequest request)
| Method Detail |
|---|
public void setRequest(HttpServletRequest request)
public HttpServletRequest getRequest()
AbstractCauchoRequest
getRequest in class AbstractCauchoRequestpublic void setResponse(CauchoResponse response)
public CauchoResponse getResponse()
getResponse in class AbstractCauchoRequestpublic java.lang.String getProtocol()
ServletRequest
public java.lang.String getScheme()
ServletRequest
public java.lang.String getServerName()
ServletRequest
public int getServerPort()
ServletRequestServletRequest.isSecure() is provided for that purpose.
public java.lang.String getRemoteAddr()
ServletRequest
public java.lang.String getRemoteHost()
ServletRequest
public int getRemotePort()
ServletRequest
public java.lang.String getLocalAddr()
ServletRequest
public java.lang.String getLocalName()
ServletRequest
public int getLocalPort()
ServletRequestServletRequest.isSecure() is provided for that purpose.
public java.lang.String getParameter(java.lang.String name)
AbstractCauchoRequest
getParameter in interface ServletRequestgetParameter in class AbstractCauchoRequestname - the form parameter to return
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
AbstractCauchoRequest
getParameterMap in interface ServletRequestgetParameterMap in class AbstractCauchoRequestpublic java.lang.String[] getParameterValues(java.lang.String name)
AbstractCauchoRequest
getParameterValues in interface ServletRequestgetParameterValues in class AbstractCauchoRequestname - key in the form
public java.util.Enumeration<java.lang.String> getParameterNames()
AbstractCauchoRequest
getParameterNames in interface ServletRequestgetParameterNames in class AbstractCauchoRequest
public ServletInputStream getInputStream()
throws java.io.IOException
ServletRequest
java.io.IOException
public java.io.BufferedReader getReader()
throws java.io.IOException,
java.lang.IllegalStateException
ServletRequestgetCharacterEncoding()
java.io.IOException
java.lang.IllegalStateExceptionpublic java.lang.String getCharacterEncoding()
ServletRequest
public void setCharacterEncoding(java.lang.String encoding)
throws java.io.UnsupportedEncodingException
ServletRequestsetCharacterEncoding must be called before calling
getReader or reading any parameters.
java.io.UnsupportedEncodingExceptionpublic int getContentLength()
ServletRequestThe upshot is, rely on the input stream to end when the data completes.
public java.lang.String getContentType()
ServletRequest
public java.util.Locale getLocale()
ServletRequest
public java.util.Enumeration<java.util.Locale> getLocales()
ServletRequest
public boolean isSecure()
ServletRequest
public java.lang.Object getAttribute(java.lang.String name)
ServletRequest
name - the attribute name
public void setAttribute(java.lang.String name,
java.lang.Object o)
ServletRequest
name - the attribute nameo - the attribute valuepublic java.util.Enumeration<java.lang.String> getAttributeNames()
ServletRequest
public void removeAttribute(java.lang.String name)
ServletRequest
name - the attribute namepublic RequestDispatcher getRequestDispatcher(java.lang.String path)
ServletRequesturi
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);
getRequestDispatcher in interface ServletRequestgetRequestDispatcher in class AbstractCauchoRequestpath - path relative to getRequestURI()
(including query string) for the included file.
public ServletContext getServletContext()
ServletRequest
public AsyncContext startAsync()
throws java.lang.IllegalStateException
ServletRequest
java.lang.IllegalStateException
public AsyncContext startAsync(ServletRequest servletRequest,
ServletResponse servletResponse)
throws java.lang.IllegalStateException
ServletRequest
java.lang.IllegalStateExceptionpublic AsyncContext getAsyncContext()
ServletRequest
public boolean isAsyncStarted()
ServletRequest
public boolean isAsyncSupported()
ServletRequest
public boolean isWrapperFor(ServletRequest wrapped)
public boolean isWrapperFor(java.lang.Class<?> wrappedType)
public DispatcherType getDispatcherType()
ServletRequest
public java.lang.String getMethod()
HttpServletRequestREQUEST_METHOD
public java.lang.String getRequestURI()
HttpServletRequest
public java.lang.StringBuffer getRequestURL()
getRequestURL in interface HttpServletRequestgetRequestURL in class AbstractCauchoRequestpublic java.lang.String getContextPath()
HttpServletRequestgetContextPath() is /myapp for the uri
/myapp/servlet/Hello,
public java.lang.String getServletPath()
HttpServletRequestSCRIPT_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,
public java.lang.String getPathInfo()
HttpServletRequestPATH_INFO
getPathInfo() is /foo for
the uri /myapp/servlet/Hello/foo.
getPathInfo() is /hello.jsp for for the uri
/myapp/dir/hello.jsp/foo.
public java.lang.String getPathTranslated()
getPathTranslated in interface HttpServletRequestgetPathTranslated in class AbstractCauchoRequestpublic java.lang.String getQueryString()
HttpServletRequestServletRequest.getParameter() to decode the form values.
Corresponds to CGI's PATH_TRANSLATED
public java.lang.String getHeader(java.lang.String name)
HttpServletRequestHTTP_*
String userAgent = request.getHeader("User-Agent");
name - the header name
public java.util.Enumeration<java.lang.String> getHeaders(java.lang.String name)
HttpServletRequest
name - the header name
public java.util.Enumeration<java.lang.String> getHeaderNames()
HttpServletRequest
public int getIntHeader(java.lang.String name)
HttpServletRequest
name - the header name
public long getDateHeader(java.lang.String name)
HttpServletRequest
long mod = request.getDateHeader("If-Modified-Since");
name - the header name
public Cookie[] getCookies()
HttpServletRequest
public java.lang.String getRequestedSessionId()
HttpServletRequest
public boolean isRequestedSessionIdValid()
AbstractCauchoRequest
isRequestedSessionIdValid in interface HttpServletRequestisRequestedSessionIdValid in class AbstractCauchoRequestpublic boolean isRequestedSessionIdFromCookie()
HttpServletRequest
public boolean isRequestedSessionIdFromURL()
HttpServletRequest
public void setSessionId(java.lang.String sessionId)
setSessionId in interface CauchoRequestsetSessionId in class AbstractCauchoRequestpublic java.lang.String getSessionId()
getSessionId in interface CauchoRequestgetSessionId in class AbstractCauchoRequestpublic boolean isSessionIdFromCookie()
isSessionIdFromCookie in interface CauchoRequestisSessionIdFromCookie in class AbstractCauchoRequestpublic java.lang.String getAuthType()
HttpServletRequest
public java.lang.String getRemoteUser()
HttpServletRequest
public boolean isRequestedSessionIdFromUrl()
public Part getPart(java.lang.String name)
throws java.io.IOException,
ServletException
getPart in interface HttpServletRequestgetPart in class AbstractCauchoRequestjava.io.IOException
ServletException
public java.util.Collection<Part> getParts()
throws java.io.IOException,
ServletException
getParts in interface HttpServletRequestgetParts in class AbstractCauchoRequestjava.io.IOException
ServletExceptionprotected boolean isDelegateMultipartEnabled()
public boolean isMultipartEnabled()
isMultipartEnabled in interface CauchoRequestisMultipartEnabled in class AbstractCauchoRequest
public void logout()
throws ServletException
ServletExceptionpublic java.lang.String getPageURI()
public java.lang.String getPageContextPath()
public java.lang.String getPageServletPath()
public java.lang.String getPagePathInfo()
public java.lang.String getPageQueryString()
public WebApp getWebApp()
public ReadStream getStream()
throws java.io.IOException
java.io.IOExceptionpublic int getRequestDepth(int depth)
public void setHeader(java.lang.String key,
java.lang.String value)
public boolean isSyntheticCacheHeader()
public void setSyntheticCacheHeader(boolean isSynthetic)
public boolean getVaryCookies()
public void setVaryCookie(java.lang.String cookie)
public boolean getHasCookie()
public boolean isTop()
isTop in interface CauchoRequestisTop in class AbstractCauchoRequestpublic boolean hasRequest()
public HttpSession getMemorySession()
AbstractCauchoRequest
getMemorySession in interface CauchoRequestgetMemorySession in class AbstractCauchoRequestpublic Cookie getCookie(java.lang.String name)
public void setHasCookie()
public void killKeepalive(java.lang.String reason)
public boolean isSuspend()
public boolean isComet()
public boolean isDuplex()
public boolean isConnectionClosed()
public boolean isLoginRequested()
AbstractCauchoRequest
isLoginRequested in interface CauchoRequestisLoginRequested in class AbstractCauchoRequestpublic void requestLogin()
requestLogin in interface CauchoRequestrequestLogin in class AbstractCauchoRequestpublic ServletResponse getServletResponse()
public AbstractHttpRequest getAbstractHttpRequest()
getAbstractHttpRequest in interface CauchoRequestgetAbstractHttpRequest in class AbstractCauchoRequestpublic java.lang.String toString()
toString in class AbstractCauchoRequest
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||