Interface ExtensionWebSocket
public interface ExtensionWebSocket
A WebSocket created via the Extension API.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
This method will close the WebSocket.Register an interface that is notified when messages arrive from the server.void
sendBinaryMessage
(ByteArray message) This method allows an extension to send a binary message via the WebSocket.void
sendTextMessage
(String message) This method allows an extension to send a text message via the WebSocket.
-
Method Details
-
sendTextMessage
This method allows an extension to send a text message via the WebSocket.- Parameters:
message
- The message to be sent.
-
sendBinaryMessage
This method allows an extension to send a binary message via the WebSocket.- Parameters:
message
- The message to be sent.
-
close
void close()This method will close the WebSocket. -
registerMessageHandler
Register an interface that is notified when messages arrive from the server.- Parameters:
handler
- An object created by the extension that implementsExtensionWebSocketMessageHandler
interface.- Returns:
- The
Registration
for the handler.
-