tech.pardus.utilities.SessionUserContextHolder Maven / Gradle / Ivy
/**
*
*/
package tech.pardus.utilities;
/**
* @author deniz.toktay
* @since Dec 29, 2020
*/
public class SessionUserContextHolder {
private static InheritableThreadLocal sessionContext = new InheritableThreadLocal<>();
public static void setCurrentSessionUser(String username) {
sessionContext.set(username);
}
public static String getCurrentSessionUser() {
return sessionContext.get();
}
public static void clear() {
sessionContext.remove();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy