⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 requestcontextholder.java

📁 一个很好的开源项目管理系统源代码
💻 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 + -