Interface WebsocketMessagingService
- All Known Implementing Classes:
WebsocketMessagingServiceImpl
public interface WebsocketMessagingService
-
Method Summary
Modifier and TypeMethodDescriptionvoid
sendMessage
(Class<?> target, Callable<Optional<String>> message) Sends a message to all clients of a specific WebSocket endpoint.<T extends BaseWebsocket>
voidSends a message to a certain client of a specific WebSocket endpoint.<T extends BaseWebsocket>
voidSends 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, Callable<Optional<String>> message) 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, Callable<Optional<String>> message) Sends a message to a certain client of a specific WebSocket endpoint. The target class is the class that is returned byWebSocket.webSocketClass()
-