Class ActivityService
- java.lang.Object
-
- org.powertac.visualizer.web.websocket.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 Summary
Constructors Constructor Description ActivityService(org.springframework.messaging.simp.SimpMessageSendingOperations messagingTemplate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onApplicationEvent(org.springframework.web.socket.messaging.SessionDisconnectEvent event)
ActivityDTO
sendActivity(ActivityDTO activityDTO, org.springframework.messaging.simp.stomp.StompHeaderAccessor stompHeaderAccessor, Principal principal)
-
-
-
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 interfaceorg.springframework.context.ApplicationListener<org.springframework.web.socket.messaging.SessionDisconnectEvent>
-
-