com.healthy.common.websocket.session.DefaultWebSocketSessionStore Maven / Gradle / Ivy
package com.healthy.common.websocket.session;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.socket.WebSocketSession;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
/**
* 默认的 WebSocketSession 存储器
*
* @author xm.z
*/
@Slf4j
public class DefaultWebSocketSessionStore implements WebSocketSessionStore {
private final SessionKeyGenerator sessionKeyGenerator;
private final ConcurrentHashMap