public class WebSocketClient extends Object
| Constructor and Description |
|---|
WebSocketClient(WebSocketClientCallback callback) |
WebSocketClient(YamcsConnectionProperties yprops) |
WebSocketClient(YamcsConnectionProperties yprops,
WebSocketClientCallback callback) |
| Modifier and Type | Method and Description |
|---|---|
io.netty.channel.ChannelFuture |
connect() |
void |
disconnect() |
void |
enableReconnection(boolean enableReconnection)
enable or disable reconnection in case of failure to connect or if the client is disconnected.
|
void |
enableTcpKeepAlive(boolean enableTcpKeepAlive)
Enable/disable the TCP Keep-Alive on websocket sockets.
|
boolean |
isConnected() |
boolean |
isUseProtobuf() |
CompletableFuture<Void> |
sendRequest(WebSocketRequest request)
Performs the request in a different thread
|
void |
sendRequest(WebSocketRequest request,
WebSocketResponseHandler responseHandler) |
void |
setConnectionProperties(YamcsConnectionProperties yprops) |
void |
setConnectionTimeoutMs(int timeoutMs) |
void |
setReconnectionInterval(long reconnectionIntervalMillisec)
set the reconnection interval in milliseconds.
|
void |
setUserAgent(String userAgent) |
io.netty.util.concurrent.Future<?> |
shutdown() |
public WebSocketClient(WebSocketClientCallback callback)
public WebSocketClient(YamcsConnectionProperties yprops, WebSocketClientCallback callback)
public WebSocketClient(YamcsConnectionProperties yprops)
public void setConnectionProperties(YamcsConnectionProperties yprops)
public void setUserAgent(String userAgent)
public void setConnectionTimeoutMs(int timeoutMs)
public void enableReconnection(boolean enableReconnection)
enableReconnection - public io.netty.channel.ChannelFuture connect()
public void setReconnectionInterval(long reconnectionIntervalMillisec)
enableReconnection(boolean) to enable the recconnection.reconnectionIntervalMillisec - public CompletableFuture<Void> sendRequest(WebSocketRequest request)
request - public void sendRequest(WebSocketRequest request, WebSocketResponseHandler responseHandler)
public boolean isUseProtobuf()
public void disconnect()
public void enableTcpKeepAlive(boolean enableTcpKeepAlive)
enableTcpKeepAlive - if true the TCP SO_KEEPALIVE option is setpublic io.netty.util.concurrent.Future<?> shutdown()
public boolean isConnected()
Copyright © 2018 Space Applications Services. All rights reserved.