com.frontegg.sdk.middleware.context.FronteggContextHolder Maven / Gradle / Ivy
The newest version!
package com.frontegg.sdk.middleware.context;
public class FronteggContextHolder {
private static final ThreadLocal contextHolder = new ThreadLocal<>();
public static FronteggContext createEmptyContext() {
return new FronteggContext();
}
public static void setContext(FronteggContext fronteggContext) {
contextHolder.set(fronteggContext);
}
public static void clearContext() {
contextHolder.remove();
}
public static FronteggContext getContext() {
return contextHolder.get();
}
}