Class ActivityService

  • All Implemented Interfaces:
    EventListener, org.springframework.context.ApplicationListener<org.springframework.web.socket.messaging.SessionDisconnectEvent>

    @Controller
    public class ActivityService
    extends Object
    implements org.springframework.context.ApplicationListener<org.springframework.web.socket.messaging.SessionDisconnectEvent>
    • Constructor Detail

      • ActivityService

        public ActivityService​(org.springframework.messaging.simp.SimpMessageSendingOperations messagingTemplate)
    • Method Detail

      • sendActivity

        @SubscribeMapping("/topic/activity")
        @SendTo("/topic/tracker")
        public ActivityDTO sendActivity​(@Payload
                                        ActivityDTO activityDTO,
                                        org.springframework.messaging.simp.stomp.StompHeaderAccessor stompHeaderAccessor,
                                        Principal principal)
      • onApplicationEvent

        public void onApplicationEvent​(org.springframework.web.socket.messaging.SessionDisconnectEvent event)
        Specified by:
        onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.web.socket.messaging.SessionDisconnectEvent>