Package no.polaric.core.httpd
Class NodeWsClient
java.lang.Object
no.polaric.core.httpd.NodeWsClient
- All Implemented Interfaces:
WebSocket.Listener
Client side of websocket.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
void
void
onText
(WebSocket webSocket, CharSequence data, boolean last) void
open()
boolean
Post a object to the connected node (JSON encoded)boolean
putCommand
(String cmd, String msg) boolean
void
void
boolean
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.net.http.WebSocket.Listener
onBinary, onPing, onPong
-
Constructor Details
-
NodeWsClient
-
-
Method Details
-
setUserid
-
setHandler
-
open
public void open() -
close
public void close() -
isConnected
public boolean isConnected() -
subscribe
-
unsubscribe
public void unsubscribe() -
putCommand
-
putText
-
put
Post a object to the connected node (JSON encoded) -
onError
- Specified by:
onError
in interfaceWebSocket.Listener
-
onOpen
- Specified by:
onOpen
in interfaceWebSocket.Listener
-
onClose
- Specified by:
onClose
in interfaceWebSocket.Listener
-
onText
- Specified by:
onText
in interfaceWebSocket.Listener
-