public final class EngineIoServerOptions extends Object
EngineIoServer| Modifier and Type | Field and Description |
|---|---|
static String[] |
ALLOWED_CORS_ORIGIN_ALL
Specify that all origins are to be allowed for CORS
|
static String[] |
ALLOWED_CORS_ORIGIN_NONE
Specify that no origins are allowed for CORS
|
static EngineIoServerOptions |
DEFAULT
The default options used by server.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getAllowedCorsOrigins()
Gets the allowed CORS origins option.
|
io.socket.engineio.parser.Packet<?> |
getInitialPacket()
Gets the initial packet option.
|
int |
getMaxTimeoutThreadPoolSize()
Gets the max threadpool size for the ping timeout timers.
|
long |
getPingInterval()
Gets the ping interval option.
|
long |
getPingTimeout()
Gets the ping timeout option.
|
boolean |
isCorsHandlingDisabled()
Gets the value of 'isCorsHandlingDisabled' option.
|
void |
lock()
Lock this options instance to prevent modifications.
|
static EngineIoServerOptions |
newFromDefault()
Create a new instance of
EngineIoServerOptions by copying
default options. |
EngineIoServerOptions |
setAllowedCorsOrigins(String[] allowedCorsOrigins)
Sets the allowed CORS origins option.
|
EngineIoServerOptions |
setCorsHandlingDisabled(boolean corsHandlingDisabled)
Sets the 'isCorsHandlingDisabled' option.
|
EngineIoServerOptions |
setInitialPacket(io.socket.engineio.parser.Packet<?> initialPacket)
Sets the initial packet.
|
EngineIoServerOptions |
setMaxTimeoutThreadPoolSize(int maxTimeoutThreadPoolSize)
Sets the max threadpool size for the ping timeout timers.
|
EngineIoServerOptions |
setPingInterval(long pingInterval)
Sets the ping interval option.
|
EngineIoServerOptions |
setPingTimeout(long pingTimeout)
Sets the ping timeout option.
|
public static final EngineIoServerOptions DEFAULT
public static final String[] ALLOWED_CORS_ORIGIN_ALL
public static final String[] ALLOWED_CORS_ORIGIN_NONE
public static EngineIoServerOptions newFromDefault()
EngineIoServerOptions by copying
default options.EngineIoServerOptions with default options.public boolean isCorsHandlingDisabled()
public EngineIoServerOptions setCorsHandlingDisabled(boolean corsHandlingDisabled) throws IllegalStateException
corsHandlingDisabled - Boolean value for disabling CORS handling.IllegalStateException - If instance is locked.public long getPingInterval()
public EngineIoServerOptions setPingInterval(long pingInterval) throws IllegalStateException
pingInterval - Ping interval in milliseconds.IllegalStateException - If instance is locked.public long getPingTimeout()
public EngineIoServerOptions setPingTimeout(long pingTimeout) throws IllegalStateException
pingTimeout - Ping timeout in milliseconds.IllegalStateException - If instance is locked.public String[] getAllowedCorsOrigins()
public EngineIoServerOptions setAllowedCorsOrigins(String[] allowedCorsOrigins) throws IllegalStateException
allowedCorsOrigins - Array of strings containing allowed CORS origins.IllegalStateException - If instance is locked.public io.socket.engineio.parser.Packet<?> getInitialPacket()
public EngineIoServerOptions setInitialPacket(io.socket.engineio.parser.Packet<?> initialPacket) throws IllegalStateException, IllegalArgumentException
initialPacket - The initial packet to send on client connection.IllegalStateException - If instance is locked.IllegalArgumentException - If initialPacket.type is not message or data is null.public void lock()
public int getMaxTimeoutThreadPoolSize()
public EngineIoServerOptions setMaxTimeoutThreadPoolSize(int maxTimeoutThreadPoolSize) throws IllegalStateException
maxTimeoutThreadPoolSize - Max threadpool size for handling ping timeouts.IllegalStateException - If instance is locked.Copyright © 2021. All rights reserved.