
org.nofdev.servicefacade.ServiceContextHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of service-core Show documentation
Show all versions of service-core Show documentation
The basic componet of Nofdev RPC framework
package org.nofdev.servicefacade;
/**
* Created by Qiang on 11/6/15.
*/
public class ServiceContextHolder {
private static ThreadLocal threadLocal = new ThreadLocal() {
@Override
protected ServiceContext initialValue() {
return new ServiceContext();
}
};
public static void setServiceContext(ServiceContext serviceContext) {
threadLocal.set(serviceContext);
}
public static ServiceContext getServiceContext() {
return threadLocal.get();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy