r1.rpc
Class WebTierUtils
java.lang.Object
r1.rpc.WebTierUtils
public class WebTierUtils
- extends java.lang.Object
R1-RPC keeps servlet-related objects in a thread-local storage.
This utility provides access to all of them. All methods are static.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TL_HTTP_SERVLET
public static final java.lang.String TL_HTTP_SERVLET
- See Also:
- Constant Field Values
TL_HTTP_REQUEST
public static final java.lang.String TL_HTTP_REQUEST
- See Also:
- Constant Field Values
TL_HTTP_RESPONSE
public static final java.lang.String TL_HTTP_RESPONSE
- See Also:
- Constant Field Values
TL_HTTP_SESSION
public static final java.lang.String TL_HTTP_SESSION
- See Also:
- Constant Field Values
SESSION_CHALLENGE
public static final java.lang.String SESSION_CHALLENGE
- See Also:
- Constant Field Values
SESSION_USER
public static final java.lang.String SESSION_USER
- See Also:
- Constant Field Values
SESSION_RPC_BRIDGE
public static final java.lang.String SESSION_RPC_BRIDGE
- See Also:
- Constant Field Values
WebTierUtils
public WebTierUtils()
getServlet
public static HttpServlet getServlet()
getServletConfig
public static ServletConfig getServletConfig()
getServletContext
public static ServletContext getServletContext()
getServletRequest
public static HttpServletRequest getServletRequest()
getServletResponse
public static HttpServletResponse getServletResponse()
getSession
public static HttpSession getSession()
getSessionAttribute
public static java.lang.Object getSessionAttribute(java.lang.String key)
setSessionAttribute
public static java.lang.Object setSessionAttribute(java.lang.String key,
java.lang.Object val)
removeSessionAttribute
public static void removeSessionAttribute(java.lang.String key)
getUser
public static java.lang.Object getUser()
getUser
public static java.lang.Object getUser(HttpSession session)
setUser
public static void setUser(java.lang.Object user)
checkAuthentication
public static void checkAuthentication()
throws javax.security.auth.login.LoginException
- Throws:
javax.security.auth.login.LoginException
isLoggedIn
public static boolean isLoggedIn()
challenge
public static java.lang.String challenge()
- This servlet creates a session-wide challenge for encryption needs.
- Returns:
- the session-wide challenge string.