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, wait
getCookie, getHasCookie, getPageContextPath, getPagePathInfo, getPageQueryString, getPageServletPath, getPageURI, getRequestDepth, getServletResponse, getStream, getVaryCookies, getWebApp, hasRequest, isComet, isConnectionClosed, isDuplex, isSuspend, isSyntheticCacheHeader, killKeepalive, setHasCookie, setHeader, setSyntheticCacheHeader, setVaryCookie
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getServletPath, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, logout
getAsyncContext, 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, startAsync
public abstract CauchoResponse getResponse()
protected void startRequest()
public RequestDispatcher getRequestDispatcher(java.lang.String path)
ServletRequest
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);
getRequestDispatcher
in interface ServletRequest
path
- path relative to getRequestURI()
(including query string) for the included file.public java.util.Enumeration<java.lang.String> getParameterNames()
getParameterNames
in interface ServletRequest
public final java.util.Enumeration<java.lang.String> getParameterNamesImpl()
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
getParameterMap
in interface ServletRequest
public final java.util.Map<java.lang.String,java.lang.String[]> getParameterMapImpl()
public java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues
in interface ServletRequest
name
- 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 ServletRequest
name
- 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 HttpServletRequest
java.io.IOException
ServletException
public boolean isMultipartEnabled()
isMultipartEnabled
in interface CauchoRequest
public Part getPart(java.lang.String name) throws java.io.IOException, ServletException
getPart
in interface HttpServletRequest
java.io.IOException
ServletException
public abstract AbstractHttpRequest getAbstractHttpRequest()
getAbstractHttpRequest
in interface CauchoRequest
public 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.IOException
public java.lang.String getRealPath(java.lang.String uri)
ServletRequest
getRealPath
in interface ServletRequest
public java.lang.StringBuffer getRequestURL()
getRequestURL
in interface HttpServletRequest
public java.lang.String getPathTranslated()
getPathTranslated
in interface HttpServletRequest
public boolean isTop()
isTop
in interface CauchoRequest
public abstract boolean isSessionIdFromCookie()
isSessionIdFromCookie
in interface CauchoRequest
public abstract java.lang.String getSessionId()
getSessionId
in interface CauchoRequest
public abstract void setSessionId(java.lang.String sessionId)
setSessionId
in interface CauchoRequest
public HttpSession getMemorySession()
getMemorySession
in interface CauchoRequest
public HttpSession getSession()
getSession
in interface HttpServletRequest
public HttpSession getSession(boolean create)
getSession
in interface HttpServletRequest
create
- true if a new session should be createdpublic HttpSession getLoadedSession()
public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid
in interface HttpServletRequest
protected 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 HttpServletRequest
ServletException
public boolean login(boolean isFail)
login
in interface CauchoRequest
public abstract boolean isLoginRequested()
isLoginRequested
in interface CauchoRequest
public abstract void requestLogin()
requestLogin
in interface CauchoRequest
public boolean authenticate(HttpServletResponse response) throws java.io.IOException, ServletException
authenticate
in interface HttpServletRequest
java.io.IOException
ServletException
public java.security.Principal getUserPrincipal()
getUserPrincipal
in interface HttpServletRequest
public boolean isUserInRole(java.lang.String role)
isUserInRole
in interface HttpServletRequest
role
- the named role to test.public SocketLink getSocketLink()
getSocketLink
in interface CauchoRequest
protected void finishRequest() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object