|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjrouter.servlet.ServletThreadContext
public class ServletThreadContext
ServletThreadContext是一个线程变量,使用了一个公共的ThreadLocal。
ServletThreadContext包含一个ActionInvocation,存储线程安全的Action运行时上下文。
ServletThreadContext包含http的相关的变量。
ServletThreadContext包含一个contextMap变量,存储自定义的key-value。
ServletThreadContext包含一个Exception对象,存储发生的异常。
ServletActionFactory.DefaultServletActionFactory,
ServletActionFactory.DefaultServletActionInvocation| 方法摘要 | ||
|---|---|---|
static
|
getActionInvocation()
返回Action运行时上下文。 |
|
static Map<String,Object> |
getContextMap()
返回ThreadContext中的Map容器。 |
|
static Exception |
getException()
Get the exception. |
|
static javax.servlet.http.HttpServletRequest |
getRequest()
Gets the HTTP servlet request object. |
|
static Map<String,String[]> |
getRequestParameters()
Gets the HTTP servlet request parameters. |
|
static javax.servlet.http.HttpServletResponse |
getResponse()
Gets the HTTP servlet response object. |
|
static javax.servlet.ServletContext |
getServletContext()
Gets the servlet context. |
|
static javax.servlet.http.HttpSession |
getSession()
Gets the HTTP servlet session object. |
|
static javax.servlet.http.HttpSession |
getSession(boolean create)
Gets the HTTP servlet session object. |
|
static void |
remove()
移除前线程副本中的ServletThreadContext。 |
|
static void |
setActionInvocation(jrouter.ActionInvocation actionInvocation)
设置Action运行时上下文。 |
|
static void |
setException(Exception exception)
Store the exception. |
|
static void |
setRequest(javax.servlet.http.HttpServletRequest request)
Sets the HTTP servlet request object. |
|
static void |
setResponse(javax.servlet.http.HttpServletResponse response)
Sets the HTTP servlet response object. |
|
static void |
setServletContext(javax.servlet.ServletContext servletContext)
Sets the current servlet context object. |
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 方法详细信息 |
|---|
public static void remove()
public static <T extends jrouter.ActionInvocation> T getActionInvocation()
T - Action运行时上下文类型。
ServletActionFactory.DefaultServletActionFactory.createActionInvocation(java.lang.String, java.lang.Object...)public static void setActionInvocation(jrouter.ActionInvocation actionInvocation)
actionInvocation - Action运行时上下文。public static void setRequest(javax.servlet.http.HttpServletRequest request)
request - the HTTP servlet request object.public static javax.servlet.http.HttpServletRequest getRequest()
public static javax.servlet.http.HttpSession getSession()
public static javax.servlet.http.HttpSession getSession(boolean create)
public static Map<String,String[]> getRequestParameters()
public static void setResponse(javax.servlet.http.HttpServletResponse response)
response - the HTTP servlet response object.public static javax.servlet.http.HttpServletResponse getResponse()
public static javax.servlet.ServletContext getServletContext()
public static void setServletContext(javax.servlet.ServletContext servletContext)
servletContext - The servlet context to usepublic static Map<String,Object> getContextMap()
public static Exception getException()
public static void setException(Exception exception)
exception - The exception
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||