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

net.apexes.wsonrpc.server.WsonrpcSessions Maven / Gradle / Ivy

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