Spring MVC Framework で Websockets SockJS を使用しています。正常に動作している Stock Ticker の例を試しましたが、コントローラーでセッションを取得したいのですが、方法が見つかりません。
Client Code:
$scope.socket = new SockJS("ws/ws");
$scope.stompClient = Stomp.over($scope.socket);
$scope.stompClient.connect("guest", "guest",connectCallback, errorCallback);
//in connectCallback
$scope.stompClient.subscribe('/topic/agent-sendstatus', showScreenPop);
Java Code:
@MessageMapping("/topic/agent-sendstatus")
public void testmethod()
{
//How do i get Session here to further implement solution?
template.convertAndSend("/topic/agent-sendstatus","bcd");
}
Please suggest.