|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.gwtspringrpc.http.HTTPObjectHolder
public final class HTTPObjectHolder
This class holds HTTP objects in static thread local instances so they can
be accessed by dynamic proxies. It manages the following objects:
Field Summary | |
---|---|
private static ThreadLocal |
requests
The HttpServletRequest instances by thread |
private static ThreadLocal |
responses
The HttpServletResponse instances by thread |
private static ThreadLocal |
servletConfigs
The ServletConfig instances by thread |
private static ThreadLocal |
servletContexts
The ServletContext instances by thread |
Constructor Summary | |
---|---|
private |
HTTPObjectHolder()
The default constructor is private since the HTTPObjectHolder class cannot be instantiated. |
Method Summary | |
---|---|
static void |
clear()
Clears all entries for the current thread. |
static HttpServletRequest |
getRequest()
Retrieves the HttpServletRequest instance for this thread. |
static HttpServletResponse |
getResponse()
Retrieves the HttpServletResponse instance for this thread. |
static ServletConfig |
getServletConfig()
Retrieves the ServletConfig instance for this thread. |
static ServletContext |
getServletContext()
Retrieves the ServletContext instance for this thread. |
static void |
setRequest(HttpServletRequest request)
Sets the HttpServletRequest instance for this thread. |
static void |
setResponse(HttpServletResponse response)
Sets the HttpServletResponse instance for this thread. |
static void |
setServletConfig(ServletConfig servletConfig)
Sets the ServletConfig instance for this thread. |
static void |
setServletContext(ServletContext servletContext)
Sets the ServletContext instance for this thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static ThreadLocal requests
private static ThreadLocal responses
private static ThreadLocal servletContexts
private static ThreadLocal servletConfigs
Constructor Detail |
---|
private HTTPObjectHolder()
Method Detail |
---|
public static HttpServletRequest getRequest()
public static void setRequest(HttpServletRequest request)
request
- The HttpServletRequest instancepublic static HttpServletResponse getResponse()
public static void setResponse(HttpServletResponse response)
response
- The HttpServletResponse instancepublic static ServletContext getServletContext()
public static void setServletContext(ServletContext servletContext)
servletContext
- The ServletContext instancepublic static ServletConfig getServletConfig()
public static void setServletConfig(ServletConfig servletConfig)
servletConfig
- The ServletConfig instancepublic static void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |