Interface WebsocketMessagingService
- All Known Implementing Classes:
WebsocketMessagingServiceImpl
public interface WebsocketMessagingService
-
Method Summary
Modifier and TypeMethodDescriptionvoid
sendMessage
(Class<?> target, String event, Object data) Sends a message to all clients of a specific WebSocket endpoint.<T extends BaseWebsocket>
voidsendMessageToOrigin
(Class<T> target, String originId, String event, Object data) Sends a message to a certain client of a specific WebSocket endpoint.<T extends BaseWebsocket>
voidsendMessageToUser
(Class<T> target, String principalName, String event, Object data) Sends a message to all clients of a specific WebSocket endpoint that belong to a certain user.
-
Method Details
-
sendMessage
Sends a message to all clients of a specific WebSocket endpoint. The target class is the class that is returned byWebSocket.webSocketClass()
-
sendMessageToUser
<T extends BaseWebsocket> void sendMessageToUser(Class<T> target, String principalName, String event, Object data) Sends a message to all clients of a specific WebSocket endpoint that belong to a certain user. The target class is the class that is returned byWebSocket.webSocketClass()
-
sendMessageToOrigin
<T extends BaseWebsocket> void sendMessageToOrigin(Class<T> target, String originId, String event, Object data) Sends a message to a certain client of a specific WebSocket endpoint. The target class is the class that is returned byWebSocket.webSocketClass()
-