public class SubscriptionOptions extends Object
| Constructor and Description |
|---|
SubscriptionOptions() |
SubscriptionOptions(SubscriptionOptions options) |
| Modifier and Type | Method and Description |
|---|---|
int |
getConnectionDelayOnFailure() |
int |
getReceiveLimitMs() |
String |
getUri() |
boolean |
isAutoReconnect() |
SubscriptionOptions |
setAutoReconnect(boolean isAutoReconnect)
When the connection lost is happening on the subscription line, specify
whether the client reconnect to server automatically.
|
void |
setConnectionDelayOnFailure(int connectionDelayOnFailure)
If auto reconnect is enabled, specify the delay time before reconnect.
|
void |
setReceiveLimitMs(int receiveLimitMs)
Set the receive limit in millisecond.
|
void |
setUri(String uri)
Set the URI for subscription.
|
public SubscriptionOptions(SubscriptionOptions options)
public SubscriptionOptions()
public void setUri(String uri)
uri - The URI name like "wss://api.binance.pro".public void setReceiveLimitMs(int receiveLimitMs)
receiveLimitMs - The receive limit in millisecond.public void setConnectionDelayOnFailure(int connectionDelayOnFailure)
connectionDelayOnFailure - The delay time in second.public SubscriptionOptions setAutoReconnect(boolean isAutoReconnect)
The connection lost means:
setReceiveLimitMs(int) (int)}isAutoReconnect - The boolean flag, true for enable, false for disablepublic boolean isAutoReconnect()
public int getReceiveLimitMs()
public int getConnectionDelayOnFailure()
public String getUri()
Copyright © 2021. All rights reserved.