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 |
enableLegacyURLFallback(boolean enableLegacyURLFallback)
Deprecated.
|
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.
|
int |
getMaxFramePayloadLength() |
boolean |
isConnected() |
boolean |
isUseProtobuf() |
CompletableFuture<Web.WebSocketServerMessage.WebSocketReplyData> |
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 |
setMaxFramePayloadLength(int maxFramePayloadLength) |
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 int getMaxFramePayloadLength()
public void setMaxFramePayloadLength(int maxFramePayloadLength)
public void setConnectionProperties(YamcsConnectionProperties yprops)
public void setUserAgent(String userAgent)
public void setConnectionTimeoutMs(int timeoutMs)
public void enableReconnection(boolean enableReconnection)
enableReconnection - @Deprecated public void enableLegacyURLFallback(boolean enableLegacyURLFallback)
public io.netty.channel.ChannelFuture connect()
public void setReconnectionInterval(long reconnectionIntervalMillisec)
enableReconnection(boolean) to enable the recconnection.reconnectionIntervalMillisec - public CompletableFuture<Web.WebSocketServerMessage.WebSocketReplyData> 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.