Package org.flasby.ws
Class WsController
- java.lang.Object
-
- org.flasby.ws.WsController
-
@Controller public class WsController extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WsController.Ping
static class
WsController.Pong
static class
WsController.PresentData
static class
WsController.RowId
static class
WsController.UserInfo
-
Constructor Summary
Constructors Constructor Description WsController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
askFor(String mywish, Principal me)
void
claim(WsController.RowId row, Principal user)
void
log(String msg)
void
onConnectEvent(org.springframework.web.socket.messaging.SessionConnectEvent event)
void
onDisconnectEvent(org.springframework.web.socket.messaging.SessionDisconnectEvent event)
WsController.Pong
ping(WsController.Ping ping)
void
pushDataEverywhere(String topicName, String json)
void
sendErrorTo(String errorMessage, Principal user)
WsController.PresentData
subscribe(Principal me)
void
unclaim(WsController.RowId row, Principal user)
WsController.UserInfo
whoAmI(Principal user)
-
-
-
Method Detail
-
onDisconnectEvent
@EventListener public void onDisconnectEvent(org.springframework.web.socket.messaging.SessionDisconnectEvent event)
-
onConnectEvent
@EventListener public void onConnectEvent(org.springframework.web.socket.messaging.SessionConnectEvent event)
-
whoAmI
@MessageMapping("/whoami") @SendToUser("/queue/youare") public WsController.UserInfo whoAmI(Principal user)
-
ping
@MessageMapping("/ping") @SendToUser("/queue/pong") public WsController.Pong ping(WsController.Ping ping)
-
subscribe
@MessageMapping("/subscribe") @SendToUser("/queue/initialList") public WsController.PresentData subscribe(Principal me) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
unclaim
@MessageMapping("/unclaim") public void unclaim(WsController.RowId row, Principal user) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
claim
@MessageMapping("/claim") public void claim(WsController.RowId row, Principal user) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
askFor
@MessageMapping("/askfor") public void askFor(String mywish, Principal me) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
log
@MessageMapping("/log") public void log(String msg)
-
-