📄 requestcontextholder.java
字号:
package net.java.workeffort.infrastructure.context;/** * The request context holder. * <p> * The request context is stored in a thread local variable making the * RequestContext available to other layers of the application when executing * within the same thread. * @author Antony Joseph */public final class RequestContextHolder { private static ThreadLocal contextHolder = new ThreadLocal(); /** * Private constructor to prevent instantiation. */ private RequestContextHolder() { }; /** * @param context the processing context to set */ public static void setRequestContext(IRequestContext context) { contextHolder.set(context); } /** * @return the processing context */ public static IRequestContext getRequestContext() { return (IRequestContext) contextHolder.get(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -