Interface WebSocketService
-
- All Known Implementing Classes:
WebSocketServiceImpl
public interface WebSocketService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
generateActionId()
This method does generation for unique action idjava.util.List<java.lang.String>
getSubscribers(java.lang.String destination)
This method retrieves all subscribers based on destinationvoid
sendGlobalResponse(java.lang.String destination, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor, java.util.Map<java.lang.String,java.lang.Object> result)
This method does server-push for all usersvoid
sendSharedResponse(java.lang.String destination, java.util.Map<java.lang.String,java.lang.Object> result)
This method does server-push for subscribers from destinationvoid
sendUserResponse(java.lang.String destination, java.lang.String sessionId, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor, java.util.Map<java.lang.String,java.lang.Object> result)
This method does server-push for current user
-
-
-
Method Detail
-
generateActionId
java.lang.String generateActionId()
This method does generation for unique action id- Returns:
- generated unique id for the response
-
sendSharedResponse
void sendSharedResponse(java.lang.String destination, java.util.Map<java.lang.String,java.lang.Object> result)
This method does server-push for subscribers from destination- Parameters:
destination
- endpoint for web-socket connectionresult
- payload object for response
-
sendGlobalResponse
void sendGlobalResponse(java.lang.String destination, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor, java.util.Map<java.lang.String,java.lang.Object> result)
This method does server-push for all users- Parameters:
destination
- endpoint for web-socket connectionheaderAccessor
- header for web-socket responseresult
- payload object for response
-
sendUserResponse
void sendUserResponse(java.lang.String destination, java.lang.String sessionId, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor, java.util.Map<java.lang.String,java.lang.Object> result)
This method does server-push for current user- Parameters:
destination
- endpoint for web-socket connectionsessionId
- session id for current connected userheaderAccessor
- header for web-socket responseresult
- payload object for response
-
getSubscribers
java.util.List<java.lang.String> getSubscribers(java.lang.String destination)
This method retrieves all subscribers based on destination- Parameters:
destination
- endpoint for web-socket connection- Returns:
- the list of all subscribers based on destination
-
-