net.apexes.wsonrpc.server.WsonrpcSessions Maven / Gradle / Ivy
/*
* Copyright (C) 2015, apexes.net. All rights reserved.
*
* http://www.apexes.net
*
*/
package net.apexes.wsonrpc.server;
import net.apexes.wsonrpc.core.WebSocketSession;
/**
*
* @author HeDYn
*
*/
public final class WsonrpcSessions {
private WsonrpcSessions() {}
private static final ThreadLocal SESSIONS = new ThreadLocal<>();
static void begin(WebSocketSession session) {
SESSIONS.set(session);
}
static void end() {
SESSIONS.remove();
}
public static WebSocketSession get() {
return SESSIONS.get();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy