public class ApolloWSOptions extends Object
ApolloWSHandler
.Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_KEEP_ALIVE
Default interval in milliseconds to send
KEEPALIVE messages to all clients = 30000. |
Constructor and Description |
---|
ApolloWSOptions()
Default constructor.
|
ApolloWSOptions(ApolloWSOptions other)
Copy constructor.
|
ApolloWSOptions(JsonObject json)
Constructor to create options from JSON.
|
Modifier and Type | Method and Description |
---|---|
long |
getKeepAlive() |
String |
getOrigin() |
ApolloWSOptions |
setKeepAlive(long keepAlive)
Set the interval in milliseconds to send
KEEPALIVE messages to all clients. |
ApolloWSOptions |
setOrigin(String origin)
Set the
Origin for this handler, by default it will be null . |
JsonObject |
toJson() |
public static final long DEFAULT_KEEP_ALIVE
KEEPALIVE
messages to all clients = 30000.public ApolloWSOptions()
public ApolloWSOptions(ApolloWSOptions other)
other
- the options to copypublic ApolloWSOptions(JsonObject json)
json
- the JSONpublic JsonObject toJson()
public long getKeepAlive()
KEEPALIVE
messages to all clientspublic ApolloWSOptions setKeepAlive(long keepAlive)
KEEPALIVE
messages to all clients. Defaults to 30000
.keepAlive
- interval in millisecondspublic String getOrigin()
Origin
for this handler. The Origin will be used to prevent Cross-Site WebSocket Hijacking
attacks.public ApolloWSOptions setOrigin(String origin)
Origin
for this handler, by default it will be null
.origin
- web origin for this handler or null
Copyright © 2022 Eclipse. All rights reserved.