Class WebSocketClient

  • public class WebSocketClient
    extends Object
    Netty-implementation of a Yamcs web socket client.
    • Method Detail

      • setUserAgent

        public void setUserAgent​(String userAgent)
      • setConnectionTimeoutMs

        public void setConnectionTimeoutMs​(int timeoutMs)
      • setMessageLogging

        public void setMessageLogging​(Level level)
        Enables logging of all inbound and outbound messages on the request logging level.

        By default set to Level.FINEST

      • call

        public <T extends> Observer<T> call​(String type,
                                                                        DataObserver<? extends> observer)
        Initiates a new call. This does not yet communicate to Yamcs. Use the returned observer to send one or more messages.
      • disconnect

        public void disconnect()
      • enableTcpKeepAlive

        public void enableTcpKeepAlive​(boolean enableTcpKeepAlive)
        Enable/disable the TCP Keep-Alive on websocket sockets. By default it is disabled. It has to be enabled before the connection is established.
        enableTcpKeepAlive - if true the TCP SO_KEEPALIVE option is set
      • shutdown

        public io.netty.util.concurrent.Future<?> shutdown()
        the Future which is notified when the executor has been terminated.
      • isConnected

        public boolean isConnected()
      • isInsecureTls

        public boolean isInsecureTls()
      • setInsecureTls

        public void setInsecureTls​(boolean insecureTls)
        if true and https connections are used, do not verify server certificate
        insecureTls -
      • getMaxFramePayloadLength

        public int getMaxFramePayloadLength()
      • setMaxFramePayloadLength

        public void setMaxFramePayloadLength​(int maxFramePayloadLength)
      • handleMessage

        public void handleMessage​(ServerMessage message)