public abstract class AbstractCauchoRequest extends java.lang.Object implements CauchoRequest
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractCauchoRequest.PartImpl |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH| Constructor and Description |
|---|
AbstractCauchoRequest() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCloseOnExit(Path path) |
boolean |
authenticate(HttpServletResponse response) |
protected void |
finishRequest() |
abstract AbstractHttpRequest |
getAbstractHttpRequest() |
protected ServletInvocation |
getInvocation() |
HttpSession |
getLoadedSession()
Returns the current session.
|
HttpSession |
getMemorySession()
Returns the memory session.
|
java.lang.String |
getParameter(java.lang.String name)
Returns the form primary value for the given name.
|
java.lang.String |
getParameterImpl(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMap()
Returns a map of the form.
|
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMapImpl() |
java.util.Enumeration<java.lang.String> |
getParameterNames()
Returns an enumeration of the form names.
|
java.util.Enumeration<java.lang.String> |
getParameterNamesImpl() |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns the form's values for the given name.
|
java.lang.String[] |
getParameterValuesImpl(java.lang.String name) |
Part |
getPart(java.lang.String name) |
java.util.Collection<Part> |
getParts() |
java.lang.String |
getPathTranslated()
Returns the real path of pathInfo.
|
java.lang.String |
getRealPath(java.lang.String uri)
Returns the path of the URI.
|
HttpServletRequest |
getRequest()
Returns the next request in a chain.
|
RequestDispatcher |
getRequestDispatcher(java.lang.String path)
Returns a request dispatcher for later inclusion or forwarding.
|
java.lang.StringBuffer |
getRequestURL()
Returns the URL for the request
|
abstract CauchoResponse |
getResponse() |
protected java.lang.String |
getRunAs() |
ServletService |
getServer() |
HttpSession |
getSession()
Returns the current session, creating one if necessary.
|
HttpSession |
getSession(boolean create)
Returns the current session.
|
protected java.lang.String |
getSessionCookie(SessionManager manager)
Returns the session cookie.
|
int |
getSessionGroup() |
abstract java.lang.String |
getSessionId() |
protected SessionManager |
getSessionManager()
Returns the session manager.
|
SocketLink |
getSocketLink() |
ReadStream |
getStream(boolean isFlush) |
java.security.Principal |
getUserPrincipal()
Returns the Principal representing the logged in user.
|
abstract boolean |
isLoginRequested()
Returns true if any authentication is requested
|
boolean |
isMultipartEnabled() |
boolean |
isRequestedSessionIdValid()
Returns true if the HTTP request's session id refers to a valid
session.
|
abstract boolean |
isSessionIdFromCookie() |
boolean |
isTop() |
boolean |
isUserInRole(java.lang.String role)
Returns true if the user represented by the current request
plays the named role.
|
boolean |
login(boolean isFail) |
void |
login(java.lang.String username,
java.lang.String password) |
void |
mergeParameters(java.util.Map<java.lang.String,java.lang.String[]> source,
java.util.Map<java.lang.String,java.lang.String[]> target) |
protected void |
parseGetQueryImpl(HashMapImpl<java.lang.String,java.lang.String[]> form) |
protected void |
parsePostQueryImpl(HashMapImpl<java.lang.String,java.lang.String[]> form) |
protected HashMapImpl<java.lang.String,java.lang.String[]> |
parseQueryImpl() |
abstract void |
requestLogin() |
abstract void |
setSessionId(java.lang.String sessionId) |
protected void |
startRequest()
initialization
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCookie, getHasCookie, getPageContextPath, getPagePathInfo, getPageQueryString, getPageServletPath, getPageURI, getRequestDepth, getServletResponse, getStream, getVaryCookies, getWebApp, hasRequest, isComet, isConnectionClosed, isDuplex, isSuspend, isSyntheticCacheHeader, killKeepalive, setHasCookie, setHeader, setSyntheticCacheHeader, setVaryCookiegetAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getServletPath, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, logoutgetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsyncpublic abstract CauchoResponse getResponse()
protected void startRequest()
public 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 ServletRequestpath - path relative to getRequestURI()
(including query string) for the included file.public java.util.Enumeration<java.lang.String> getParameterNames()
getParameterNames in interface ServletRequestpublic final java.util.Enumeration<java.lang.String> getParameterNamesImpl()
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
getParameterMap in interface ServletRequestpublic final java.util.Map<java.lang.String,java.lang.String[]> getParameterMapImpl()
public java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues in interface ServletRequestname - key in the formpublic final java.lang.String[] getParameterValuesImpl(java.lang.String name)
public java.lang.String getParameter(java.lang.String name)
getParameter in interface ServletRequestname - the form parameter to returnpublic final java.lang.String getParameterImpl(java.lang.String name)
public java.util.Collection<Part> getParts() throws java.io.IOException, ServletException
getParts in interface HttpServletRequestjava.io.IOExceptionServletExceptionpublic boolean isMultipartEnabled()
isMultipartEnabled in interface CauchoRequestpublic Part getPart(java.lang.String name) throws java.io.IOException, ServletException
getPart in interface HttpServletRequestjava.io.IOExceptionServletExceptionpublic abstract AbstractHttpRequest getAbstractHttpRequest()
getAbstractHttpRequest in interface CauchoRequestpublic ServletService getServer()
protected HashMapImpl<java.lang.String,java.lang.String[]> parseQueryImpl()
protected void parseGetQueryImpl(HashMapImpl<java.lang.String,java.lang.String[]> form)
protected void parsePostQueryImpl(HashMapImpl<java.lang.String,java.lang.String[]> form)
public final void mergeParameters(java.util.Map<java.lang.String,java.lang.String[]> source,
java.util.Map<java.lang.String,java.lang.String[]> target)
public void addCloseOnExit(Path path)
public ReadStream getStream(boolean isFlush) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getRealPath(java.lang.String uri)
ServletRequestgetRealPath in interface ServletRequestpublic java.lang.StringBuffer getRequestURL()
getRequestURL in interface HttpServletRequestpublic java.lang.String getPathTranslated()
getPathTranslated in interface HttpServletRequestpublic boolean isTop()
isTop in interface CauchoRequestpublic abstract boolean isSessionIdFromCookie()
isSessionIdFromCookie in interface CauchoRequestpublic abstract java.lang.String getSessionId()
getSessionId in interface CauchoRequestpublic abstract void setSessionId(java.lang.String sessionId)
setSessionId in interface CauchoRequestpublic HttpSession getMemorySession()
getMemorySession in interface CauchoRequestpublic HttpSession getSession()
getSession in interface HttpServletRequestpublic HttpSession getSession(boolean create)
getSession in interface HttpServletRequestcreate - true if a new session should be createdpublic HttpSession getLoadedSession()
public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface HttpServletRequestprotected final SessionManager getSessionManager()
protected final java.lang.String getSessionCookie(SessionManager manager)
public int getSessionGroup()
protected java.lang.String getRunAs()
protected ServletInvocation getInvocation()
public HttpServletRequest getRequest()
public void login(java.lang.String username,
java.lang.String password)
throws ServletException
login in interface HttpServletRequestServletExceptionpublic boolean login(boolean isFail)
login in interface CauchoRequestpublic abstract boolean isLoginRequested()
isLoginRequested in interface CauchoRequestpublic abstract void requestLogin()
requestLogin in interface CauchoRequestpublic boolean authenticate(HttpServletResponse response) throws java.io.IOException, ServletException
authenticate in interface HttpServletRequestjava.io.IOExceptionServletExceptionpublic java.security.Principal getUserPrincipal()
getUserPrincipal in interface HttpServletRequestpublic boolean isUserInRole(java.lang.String role)
isUserInRole in interface HttpServletRequestrole - the named role to test.public SocketLink getSocketLink()
getSocketLink in interface CauchoRequestprotected void finishRequest()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object