All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.pardus.utilities.SessionUserContextHolder Maven / Gradle / Ivy

There is a newer version: 0.0.12
Show newest version
/**
 *
 */
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