net.ibizsys.model.engine.cloud.CloudHubUtilsHolder Maven / Gradle / Ivy
The newest version!
package net.ibizsys.model.engine.cloud;
public class CloudHubUtilsHolder {
private static ThreadLocal cloudHubUtilsThreadLocal = new ThreadLocal();
public static ICloudHubUtils getCurrent() {
return cloudHubUtilsThreadLocal.get();
}
public static ICloudHubUtils getCurrentMust() {
ICloudHubUtils iNavigateContext = cloudHubUtilsThreadLocal.get();
if(iNavigateContext == null) {
throw new RuntimeException("当前Cloud总线工具对象无效");
}
return iNavigateContext;
}
public static void setCurrent(ICloudHubUtils iNavigateContext) {
cloudHubUtilsThreadLocal.set(iNavigateContext);
}
}