Package org.springframework.web.socket.messaging

Examples of org.springframework.web.socket.messaging.SessionDisconnectEvent


            closeWsSessions(e.getSessionId());
        } else if(event instanceof SessionConnectEvent) {
            SessionConnectEvent e = (SessionConnectEvent) event;
            afterConnectionEstablished(e.getWebSocketSession());
        } else if(event instanceof SessionDisconnectEvent) {
            SessionDisconnectEvent e = (SessionDisconnectEvent) event;
            Map<String, Object> sessionAttributes = SimpMessageHeaderAccessor.getSessionAttributes(e.getMessage().getHeaders());
            String httpSessionId =  sessionAttributes == null ? null : SessionRepositoryMessageInterceptor.getSessionId(sessionAttributes);
            afterConnectionClosed(httpSessionId, e.getSessionId());
        }
    }
View Full Code Here


        when(message.getHeaders()).thenReturn(new MessageHeaders(headers));

        listener = new WebSocketRegistryListener();
        connect = new SessionConnectEvent(listener,wsSession);
        connect2 = new SessionConnectEvent(listener,wsSession2);
        disconnect = new SessionDisconnectEvent(listener, message, wsSession.getId(), CloseStatus.NORMAL);
        destroyed = new SessionDestroyedEvent(listener, sessionId);
    }
View Full Code Here

TOP

Related Classes of org.springframework.web.socket.messaging.SessionDisconnectEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.