Package sample.data

Examples of sample.data.ActiveWebSocketUser


    public void onApplicationEvent(SessionDisconnectEvent event) {
        String id = event.getSessionId();
        if(id == null) {
            return;
        }
        ActiveWebSocketUser user = repository.findOne(id);
        if(user == null) {
            return;
        }

        repository.delete(id);
        messagingTemplate.convertAndSend("/topic/friends/signout", Arrays.asList(user.getUsername()));

    }
View Full Code Here


        Principal user = SimpMessageHeaderAccessor.getUser(headers);
        if(user == null) {
            return;
        }
        String id = SimpMessageHeaderAccessor.getSessionId(headers);
        repository.save(new ActiveWebSocketUser(id, user.getName(), Calendar.getInstance()));
        messagingTemplate.convertAndSend("/topic/friends/signin", Arrays.asList(user.getName()));
    }
View Full Code Here

TOP

Related Classes of sample.data.ActiveWebSocketUser

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.