public class Configuration extends Object
| Constructor and Description |
|---|
Configuration() |
| Modifier and Type | Method and Description |
|---|---|
AckMode |
getAckMode() |
AuthorizationListener |
getAuthorizationListener() |
int |
getBossThreads() |
String |
getContext() |
ExceptionListener |
getExceptionListener() |
int |
getFirstDataTimeout() |
String |
getHostname() |
JsonSupport |
getJsonSupport() |
InputStream |
getKeyStore() |
String |
getKeyStoreFormat() |
String |
getKeyStorePassword() |
int |
getMaxFramePayloadLength() |
int |
getMaxHttpContentLength() |
String |
getOrigin() |
String |
getPackagePrefix() |
int |
getPingInterval() |
int |
getPingTimeout() |
int |
getPort() |
SocketConfig |
getSocketConfig() |
String |
getSSLProtocol() |
StoreFactory |
getStoreFactory() |
List<Transport> |
getTransports() |
InputStream |
getTrustStore() |
String |
getTrustStoreFormat() |
String |
getTrustStorePassword() |
int |
getUpgradeTimeout() |
int |
getWorkerThreads() |
boolean |
isAddVersionHeader() |
boolean |
isAllowCustomRequests() |
boolean |
isHeartbeatsEnabled() |
boolean |
isHttpCompression() |
boolean |
isPreferDirectBuffer() |
boolean |
isUseLinuxNativeEpoll() |
boolean |
isWebsocketCompression() |
void |
setAckMode(AckMode ackMode)
Auto ack-response mode
Default is
AckMode.AUTO_SUCCESS_ONLY |
void |
setAddVersionHeader(boolean addVersionHeader)
Adds Server header with lib version to http response.
|
void |
setAllowCustomRequests(boolean allowCustomRequests)
Allow to service custom requests differs from socket.io protocol.
|
void |
setAuthorizationListener(AuthorizationListener authorizationListener)
Authorization listener invoked on every handshake.
|
void |
setBossThreads(int bossThreads) |
void |
setContext(String context) |
void |
setExceptionListener(ExceptionListener exceptionListener)
Exception listener invoked on any exception in
SocketIO listener
|
void |
setFirstDataTimeout(int firstDataTimeout)
Timeout between channel opening and first data transfer
Helps to avoid 'silent channel' attack and prevents
'Too many open files' problem in this case
|
void |
setHostname(String hostname)
Optional parameter.
|
void |
setHttpCompression(boolean httpCompression)
Activate http protocol compression.
|
void |
setJsonSupport(JsonSupport jsonSupport)
Allows to setup custom implementation of
JSON serialization/deserialization
|
void |
setKeyStore(InputStream keyStore)
SSL key store stream, maybe appointed to any source
|
void |
setKeyStoreFormat(String keyStoreFormat)
Key store format
|
void |
setKeyStorePassword(String keyStorePassword)
SSL key store password
|
void |
setMaxFramePayloadLength(int maxFramePayloadLength)
Set maximum websocket frame content length limit
|
void |
setMaxHttpContentLength(int value)
Set maximum http content length limit
|
void |
setOrigin(String origin)
Set Access-Control-Allow-Origin header value for http each
response.
|
void |
setPackagePrefix(String packagePrefix)
Package prefix for sending json-object from client
without full class name.
|
void |
setPingInterval(int heartbeatIntervalSecs)
Ping interval
|
void |
setPingTimeout(int heartbeatTimeoutSecs)
Ping timeout
Use
0 to disable it |
void |
setPort(int port) |
void |
setPreferDirectBuffer(boolean preferDirectBuffer)
Buffer allocation method used during packet encoding.
|
void |
setSocketConfig(SocketConfig socketConfig)
TCP socket configuration
|
void |
setSSLProtocol(String sslProtocol)
Set the name of the requested SSL protocol
|
void |
setStoreFactory(StoreFactory clientStoreFactory)
Data store - used to store session data and implements distributed pubsub.
|
void |
setTransports(Transport... transports)
Transports supported by server
|
void |
setTrustStore(InputStream trustStore) |
void |
setTrustStoreFormat(String trustStoreFormat) |
void |
setTrustStorePassword(String trustStorePassword) |
void |
setUpgradeTimeout(int upgradeTimeout)
Transport upgrade timeout in milliseconds
|
void |
setUseLinuxNativeEpoll(boolean useLinuxNativeEpoll) |
void |
setWebsocketCompression(boolean websocketCompression)
Activate websocket protocol compression.
|
void |
setWorkerThreads(int workerThreads) |
public JsonSupport getJsonSupport()
public void setJsonSupport(JsonSupport jsonSupport)
jsonSupport - JsonSupportpublic String getHostname()
public void setHostname(String hostname)
hostname - public int getPort()
public void setPort(int port)
public int getBossThreads()
public void setBossThreads(int bossThreads)
public int getWorkerThreads()
public void setWorkerThreads(int workerThreads)
public void setPingInterval(int heartbeatIntervalSecs)
value - - time in millisecondspublic int getPingInterval()
public void setPingTimeout(int heartbeatTimeoutSecs)
0 to disable itvalue - - time in millisecondspublic int getPingTimeout()
public boolean isHeartbeatsEnabled()
public String getContext()
public void setContext(String context)
public boolean isAllowCustomRequests()
public void setAllowCustomRequests(boolean allowCustomRequests)
falseallowCustomRequests - - true to allowpublic void setKeyStorePassword(String keyStorePassword)
keyStorePassword - public String getKeyStorePassword()
public void setKeyStore(InputStream keyStore)
keyStore - public InputStream getKeyStore()
public void setKeyStoreFormat(String keyStoreFormat)
keyStoreFormat - public String getKeyStoreFormat()
public void setMaxHttpContentLength(int value)
maxContentLength - the maximum length of the aggregated http content.public int getMaxHttpContentLength()
public void setTransports(Transport... transports)
transports - - list of transportspublic void setPackagePrefix(String packagePrefix)
packagePrefix - - prefix stringpublic String getPackagePrefix()
public void setPreferDirectBuffer(boolean preferDirectBuffer)
truepreferDirectBuffer - true if a direct buffer should be tried to be used as target for
the encoded messages. If false is used it will allocate a heap
buffer, which is backed by an byte array.public boolean isPreferDirectBuffer()
public void setStoreFactory(StoreFactory clientStoreFactory)
MemoryStoreFactorystoreFactory - - implements StoreFactoryMemoryStoreFactory,
RedissonStoreFactory,
HazelcastStoreFactorypublic StoreFactory getStoreFactory()
public void setAuthorizationListener(AuthorizationListener authorizationListener)
AuthorizationListener.isAuthorized method.
Accepts all clients by default.authorizationListener - - authorization listener itselfAuthorizationListenerpublic AuthorizationListener getAuthorizationListener()
public void setExceptionListener(ExceptionListener exceptionListener)
exceptionListener - ExceptionListenerpublic ExceptionListener getExceptionListener()
public SocketConfig getSocketConfig()
public void setSocketConfig(SocketConfig socketConfig)
socketConfig - public void setAckMode(AckMode ackMode)
AckMode.AUTO_SUCCESS_ONLYackMode - AckModepublic AckMode getAckMode()
public String getTrustStoreFormat()
public void setTrustStoreFormat(String trustStoreFormat)
public InputStream getTrustStore()
public void setTrustStore(InputStream trustStore)
public String getTrustStorePassword()
public void setTrustStorePassword(String trustStorePassword)
public void setMaxFramePayloadLength(int maxFramePayloadLength)
maxContentLength - public int getMaxFramePayloadLength()
public void setUpgradeTimeout(int upgradeTimeout)
upgradeTimeout - public int getUpgradeTimeout()
public void setAddVersionHeader(boolean addVersionHeader)
trueaddVersionHeader - public boolean isAddVersionHeader()
public void setOrigin(String origin)
null
If value is null then request ORIGIN header value used.origin - public String getOrigin()
public boolean isUseLinuxNativeEpoll()
public void setUseLinuxNativeEpoll(boolean useLinuxNativeEpoll)
public void setSSLProtocol(String sslProtocol)
sslProtocol - public String getSSLProtocol()
public void setFirstDataTimeout(int firstDataTimeout)
firstDataTimeout - public int getFirstDataTimeout()
public void setHttpCompression(boolean httpCompression)
gzip or
deflate encoding choice depends on the "Accept-Encoding" header value.
Default is truehttpCompression - public boolean isHttpCompression()
public void setWebsocketCompression(boolean websocketCompression)
permessage-deflate encoding only.
Default is truewebsocketCompression - public boolean isWebsocketCompression()
Copyright © 2012–2016. All rights reserved.