public class StompServerOptions extends NetServerOptions implements StompOptions
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_BODY_LENGTH |
static int |
DEFAULT_MAX_FRAME_IN_TRANSACTION |
static int |
DEFAULT_MAX_HEADER_LENGTH |
static int |
DEFAULT_MAX_HEADERS |
static int |
DEFAULT_MAX_SUBSCRIPTIONS_BY_CLIENT |
static int |
DEFAULT_TRANSACTION_CHUNK_SIZE |
DEFAULT_ACCEPT_BACKLOG, DEFAULT_CLIENT_AUTH, DEFAULT_HOST, DEFAULT_PORTDEFAULT_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_USE_POOLED_BUFFERSDEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASSDEFAULT_STOMP_HEARTBEAT, DEFAULT_STOMP_HOST, DEFAULT_STOMP_PORT, DEFAULT_SUPPORTED_VERSIONS, UTF_8| Constructor and Description |
|---|
StompServerOptions()
Default constructor.
|
StompServerOptions(JsonObject json)
Create an instance from a
JsonObject. |
StompServerOptions(StompServerOptions other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
JsonObject |
getHeartbeat()
Gets the heartbeat configuration.
|
int |
getMaxBodyLength()
Gets the max length of the frame body accepted by the server.
|
int |
getMaxFrameInTransaction()
Gets the maximum number of frames that can be added to a transaction.
|
int |
getMaxHeaderLength()
Gets the max length of header's value.
|
int |
getMaxHeaders()
Gets the maximum number of headers supported by the server.
|
int |
getMaxSubscriptionsByClient()
Gets the maximum of subscriptions a client is allowed to register.
|
List<String> |
getSupportedVersions()
Gets the STOMP protocol versions supported by the server.
|
int |
getTimeFactor()
Gets the time factor, i.e.
|
int |
getTransactionChunkSize()
Gets the chunk size when replaying a transaction.
|
boolean |
isSecured()
Checks whether or not the server is secured (meaning it has an authentication mechanism).
|
boolean |
isSendErrorOnNoSubscriptions()
Checks whether or not an error is sent to the client when this client sends a message to an not subscribed
destinations (no subscriptions on this destination).
|
StompServerOptions |
setHeartbeat(JsonObject heartbeat)
Sets the heartbeat configuration.
|
StompServerOptions |
setHost(String host)
Set the host
|
StompServerOptions |
setMaxBodyLength(int maxBodyLength)
Sets the max body length accepted by the server.
|
StompServerOptions |
setMaxFrameInTransaction(int maxFrameInTransaction)
Sets the maximum number of frame that can be added in a transaction.
|
StompServerOptions |
setMaxHeaderLength(int maxHeaderLength)
Sets the max header length.
|
StompServerOptions |
setMaxHeaders(int maxHeaders)
Sets the maximum number of headers.
|
StompServerOptions |
setMaxSubscriptionsByClient(int maxSubscriptionsByClient)
Sets the maximum of subscriptions a client is allowed to register.
|
StompServerOptions |
setPort(int port)
Set the port
|
StompServerOptions |
setSecured(boolean secured)
Enables or disables the server security feature.
|
StompServerOptions |
setSendErrorOnNoSubscriptions(boolean sendErrorOnNoSubscriptions)
Sets whether or not an error is sent to the client when this client sends a message to an not subscribed
destinations (no subscriptions on this destination).
|
StompServerOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
StompServerOptions |
setSupportedVersions(List<String> supportedVersions)
Sets the STOMP protocol versions supported by the server.
|
StompServerOptions |
setTimeFactor(int timeFactor)
Sets the time factor.
|
StompServerOptions |
setTransactionChunkSize(int transactionChunkSize)
Sets the chunk size when replaying a transaction.
|
JsonObject |
toJson() |
addCrlPath, addCrlValue, addEnabledCipherSuite, equals, getAcceptBacklog, getClientAuth, getHost, getPort, hashCode, isClientAuthRequired, setAcceptBacklog, setClientAuth, setClientAuthRequired, setIdleTimeout, setKeyStoreOptions, setPemKeyCertOptions, setPemTrustOptions, setPfxKeyCertOptions, setPfxTrustOptions, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSoLinger, setTcpKeepAlive, setTcpNoDelay, setTrafficClass, setTrustStoreOptions, setUsePooledBuffersgetCrlPaths, getCrlValues, getEnabledCipherSuites, getIdleTimeout, getKeyCertOptions, getSoLinger, getTrustOptions, isSsl, isTcpKeepAlive, isTcpNoDelay, isUsePooledBuffersgetReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddresspublic static final int DEFAULT_MAX_HEADER_LENGTH
public static final int DEFAULT_MAX_HEADERS
public static final int DEFAULT_MAX_BODY_LENGTH
public static final int DEFAULT_MAX_FRAME_IN_TRANSACTION
public static final int DEFAULT_TRANSACTION_CHUNK_SIZE
public static final int DEFAULT_MAX_SUBSCRIPTIONS_BY_CLIENT
public StompServerOptions()
public StompServerOptions(StompServerOptions other)
other - The other StompServerOptions to copy when creating thispublic StompServerOptions(JsonObject json)
JsonObject.json - the JsonObject to create it frompublic JsonObject toJson()
public int getMaxBodyLength()
public StompServerOptions setMaxBodyLength(int maxBodyLength)
maxBodyLength - the length in bytes.StompServerOptionspublic int getMaxHeaderLength()
public StompServerOptions setMaxHeaderLength(int maxHeaderLength)
maxHeaderLength - the max length of headersStompServerOptionspublic int getMaxHeaders()
public StompServerOptions setMaxHeaders(int maxHeaders)
maxHeaders - the number of headersStompServerOptionspublic List<String> getSupportedVersions()
"1.2", "1.1", "1.0".public StompServerOptions setSupportedVersions(List<String> supportedVersions)
supportedVersions - the set of supported versions.StompServerOptionspublic boolean isSecured()
AuthProvider handler.public StompServerOptions setSecured(boolean secured)
AuthProvider handler.secured - whether or not the option should be enabled.StompServerOptionspublic boolean isSendErrorOnNoSubscriptions()
public StompServerOptions setSendErrorOnNoSubscriptions(boolean sendErrorOnNoSubscriptions)
sendErrorOnNoSubscriptions - whether or not the option should be enabled.StompServerOptionspublic int getTimeFactor()
public StompServerOptions setTimeFactor(int timeFactor)
timeFactor - the time factorStompServerOptionspublic StompServerOptions setSsl(boolean ssl)
TCPSSLOptionssetSsl in class NetServerOptionsssl - true if enabledpublic StompServerOptions setPort(int port)
NetServerOptionssetPort in class NetServerOptionsport - the portpublic StompServerOptions setHost(String host)
NetServerOptionssetHost in class NetServerOptionshost - the hostpublic JsonObject getHeartbeat()
x: 1000, y: 1000.Frame.Heartbeatpublic StompServerOptions setHeartbeat(JsonObject heartbeat)
heartbeat - the heartbeat configurationStompServerOptionsFrame.Heartbeatpublic int getMaxFrameInTransaction()
ERROR frame and is disconnected.public StompServerOptions setMaxFrameInTransaction(int maxFrameInTransaction)
ERROR frame and is disconnected. The default
is 1000.maxFrameInTransaction - the max number of frameStompServerOptionspublic int getTransactionChunkSize()
public StompServerOptions setTransactionChunkSize(int transactionChunkSize)
transactionChunkSize - the size, must be strictly positiveStompServerOptionspublic int getMaxSubscriptionsByClient()
public StompServerOptions setMaxSubscriptionsByClient(int maxSubscriptionsByClient)
maxSubscriptionsByClient - the max number of subscriptionsStompServerOptionsCopyright © 2015. All rights reserved.