Interface WebSocketConnector
- All Known Implementing Classes:
TooTallNateWebSocketConnector
public interface WebSocketConnector
Abstraction for the object that will make actual websocket connection and report connection state changes and received messages
By default, we use TooTallNate websocket client implementation
By default, we use TooTallNate websocket client implementation
TooTallNateWebSocketConnector
-
Method Summary
Modifier and TypeMethodDescriptionvoid
closes connectionvoid
connect
(WebSocketConnectorListener listener) starts websocket connectionvoid
sends text message through websocketvoid
-
Method Details
-
setUri
- Parameters:
uri
- to connect to
-
connect
starts websocket connection- Parameters:
listener
- object that will receive messages and connection state changes
-
close
closes connection- Parameters:
status
- status/reason according to websocket specificationmessage
- close message
-
send
sends text message through websocket- Parameters:
message
- text message to send
-
getRawSocket
Object getRawSocket()- Returns:
- raw websocket object for low-level access. Actual class depends on implementation used in the project.
-