org.openamf
Class RequestContext
java.lang.Object
org.openamf.RequestContext
- public class RequestContext
- extends java.lang.Object
This class allows web applications to
easily access the HttpServletRequest and HttpServletResponse objects.
OpenAMF's RequestContext class was inspired by the example code
in chapter 7 of "Flash Remoting: The Definitive Guide"
by Tom Muck.
This class uses thread local storage.
To learn more about thread local storage, read this
article:
http://www-106.ibm.com/developerworks/java/library/j-threads3.html
- Author:
- Sean C. Sullivan
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
setHttpServletRequest
public static void setHttpServletRequest(javax.servlet.http.HttpServletRequest req)
- Parameters:
req
- the servlet request object- See Also:
getHttpServletRequest()
setHttpServletResponse
public static void setHttpServletResponse(javax.servlet.http.HttpServletResponse resp)
- Parameters:
resp
- the servlet response object- See Also:
getHttpServletResponse()
clear
public static void clear()
- clears the request context data
getHttpServletRequest
public static javax.servlet.http.HttpServletRequest getHttpServletRequest()
- Returns:
- may return null
- See Also:
setHttpServletRequest(HttpServletRequest)
getHttpServletResponse
public static javax.servlet.http.HttpServletResponse getHttpServletResponse()
- Returns:
- may return null
- See Also:
setHttpServletResponse(HttpServletResponse)
getHttpSession
public static javax.servlet.http.HttpSession getHttpSession()
- Returns:
- a non-null value
- See Also:
getHttpSession(boolean)
,
getHttpServletRequest()
getHttpSession
public static javax.servlet.http.HttpSession getHttpSession(boolean create)
- Parameters:
create
-
- Returns:
- may return null
- See Also:
getHttpSession()
,
getHttpServletRequest()
getRequestMessage
public static AMFMessage getRequestMessage()
- Returns:
- may return null
setRequestMessage
public static void setRequestMessage(AMFMessage m)