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

org.tkit.quarkus.context.RequestDataContext Maven / Gradle / Ivy

The newest version!
package org.tkit.quarkus.context;

public class RequestDataContext {
    
    private static ThreadLocal requestDataThreadLocal = new ThreadLocal<>();
    
    public static RequestData get() {
        if (requestDataThreadLocal != null) {
            return requestDataThreadLocal.get();
        }
        return null;
    }
    
    public static void set(RequestData data) {
        requestDataThreadLocal.set(data);
    }
    
    public static void clear() {
        if (get() != null) {
            requestDataThreadLocal.remove();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy