public class Configuration extends Object
| Constructor and Description |
|---|
Configuration() |
| Modifier and Type | Method and Description |
|---|---|
AuthorizationListener |
getAuthorizationListener() |
int |
getBossThreads() |
int |
getCloseTimeout() |
String |
getContext() |
ExceptionListener |
getExceptionListener() |
int |
getHeartbeatInterval() |
int |
getHeartbeatTimeout() |
String |
getHostname() |
JsonSupport |
getJsonSupport() |
String |
getJsonTypeFieldName() |
InputStream |
getKeyStore() |
String |
getKeyStorePassword() |
int |
getMaxHttpContentLength() |
String |
getPackagePrefix() |
int |
getPollingDuration() |
int |
getPort() |
SocketConfig |
getSocketConfig() |
StoreFactory |
getStoreFactory() |
String |
getTransports() |
int |
getWorkerThreads() |
boolean |
isAllowCustomRequests() |
boolean |
isAutoAck() |
boolean |
isHeartbeatsEnabled() |
boolean |
isPreferDirectBuffer() |
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 |
setAutoAck(boolean autoAck)
Send ack-response automatically on each ack-request
Default is
true |
void |
setBossThreads(int bossThreads) |
void |
setCloseTimeout(int closeTimeout)
Channel close timeout due inactivity
|
void |
setContext(String context) |
void |
setExceptionListener(ExceptionListener exceptionListener)
Exception listener invoked on any exception in
SocketIO listener
|
void |
setHeartbeatInterval(int heartbeatIntervalSecs)
Heartbeat interval
|
void |
setHeartbeatTimeout(int heartbeatTimeoutSecs)
Heartbeat timeout
Use
0 to disable it |
void |
setHostname(String hostname)
Optional parameter.
|
void |
setJsonSupport(JsonSupport jsonSupport)
Allows to setup custom implementation of
JSON serialization/deserialization
|
void |
setJsonTypeFieldName(String jsonTypeFieldName) |
void |
setKeyStore(InputStream keyStore)
SSL key store stream, maybe appointed to any source
|
void |
setKeyStorePassword(String keyStorePassword)
SSL key store password
|
void |
setMaxHttpContentLength(int value)
Set maximum http content length limit
|
void |
setPackagePrefix(String packagePrefix)
Package prefix for sending json-object from client
without full class name.
|
void |
setPollingDuration(int pollingDuration)
Polling interval for XHR transport
|
void |
setPort(int port) |
void |
setPreferDirectBuffer(boolean preferDirectBuffer)
Buffer allocation method used during packet encoding.
|
void |
setSocketConfig(SocketConfig socketConfig)
TCP socket configuration
|
void |
setStoreFactory(StoreFactory clientStoreFactory)
Data store - used to store session data and implements distributed pubsub.
|
void |
setTransports(Transport... transports)
Transports supported by server
|
void |
setWorkerThreads(int workerThreads) |
public String getJsonTypeFieldName()
public void setJsonTypeFieldName(String jsonTypeFieldName)
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 setHeartbeatInterval(int heartbeatIntervalSecs)
value - - time in secondspublic int getHeartbeatInterval()
public void setHeartbeatTimeout(int heartbeatTimeoutSecs)
0 to disable itvalue - - time in secondspublic int getHeartbeatTimeout()
public boolean isHeartbeatsEnabled()
public void setCloseTimeout(int closeTimeout)
closeTimeout - - time in secondspublic int getCloseTimeout()
public String getContext()
public void setContext(String context)
public boolean isAllowCustomRequests()
public void setAllowCustomRequests(boolean allowCustomRequests)
falseallowCustomRequests - - true to allowpublic int getPollingDuration()
public void setPollingDuration(int pollingDuration)
pollingDuration - - time in secondspublic void setKeyStorePassword(String keyStorePassword)
keyStorePassword - public String getKeyStorePassword()
public void setKeyStore(InputStream keyStore)
keyStore - public InputStream getKeyStore()
public void setMaxHttpContentLength(int value)
maxContentLength - the maximum length of the aggregated http content.
If the length of the aggregated content exceeds this value,
a TooLongFrameException will be raised.public int getMaxHttpContentLength()
public void setTransports(Transport... transports)
transports - - list of transportspublic String getTransports()
public 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 setAutoAck(boolean autoAck)
trueautoAck - public boolean isAutoAck()
Copyright © 2012–2014. All rights reserved.