Package com.oorian
Interface WebsocketConnection
- All Known Implementing Classes:
MockWebsocketConnection,OorianWebsocket
public interface WebsocketConnection
Abstracts a WebSocket connection for sending messages to the client.
This interface decouples the framework from the specific WebSocket implementation (jakarta.websocket or javax.websocket), allowing the common library to send messages without referencing servlet-specific types.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this WebSocket connection.voidsendMessage(String text) Sends a text message to the connected client.
-
Method Details
-
sendMessage
Sends a text message to the connected client.- Parameters:
text- The text message to send.
-
close
void close()Closes this WebSocket connection.
-