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 TypeMethodDescriptionvoidclose()booleanvoidvoidonText(WebSocket webSocket, CharSequence data, boolean last) voidopen()booleanPost a object to the connected node (JSON encoded)booleanputCommand(String cmd, String msg) booleanvoidvoidbooleanvoidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
onErrorin interfaceWebSocket.Listener
-
onOpen
- Specified by:
onOpenin interfaceWebSocket.Listener
-
onClose
- Specified by:
onClosein interfaceWebSocket.Listener
-
onText
- Specified by:
onTextin interfaceWebSocket.Listener
-