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_PORT
DEFAULT_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_USE_POOLED_BUFFERS
DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS
DEFAULT_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, setUsePooledBuffers
getCrlPaths, getCrlValues, getEnabledCipherSuites, getIdleTimeout, getKeyCertOptions, getSoLinger, getTrustOptions, isSsl, isTcpKeepAlive, isTcpNoDelay, isUsePooledBuffers
getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress
public 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.StompServerOptions
public int getMaxHeaderLength()
public StompServerOptions setMaxHeaderLength(int maxHeaderLength)
maxHeaderLength
- the max length of headersStompServerOptions
public int getMaxHeaders()
public StompServerOptions setMaxHeaders(int maxHeaders)
maxHeaders
- the number of headersStompServerOptions
public List<String> getSupportedVersions()
"1.2", "1.1", "1.0"
.public StompServerOptions setSupportedVersions(List<String> supportedVersions)
supportedVersions
- the set of supported versions.StompServerOptions
public boolean isSecured()
AuthProvider
handler.public StompServerOptions setSecured(boolean secured)
AuthProvider
handler.secured
- whether or not the option should be enabled.StompServerOptions
public boolean isSendErrorOnNoSubscriptions()
public StompServerOptions setSendErrorOnNoSubscriptions(boolean sendErrorOnNoSubscriptions)
sendErrorOnNoSubscriptions
- whether or not the option should be enabled.StompServerOptions
public int getTimeFactor()
public StompServerOptions setTimeFactor(int timeFactor)
timeFactor
- the time factorStompServerOptions
public StompServerOptions setSsl(boolean ssl)
TCPSSLOptions
setSsl
in class NetServerOptions
ssl
- true if enabledpublic StompServerOptions setPort(int port)
NetServerOptions
setPort
in class NetServerOptions
port
- the portpublic StompServerOptions setHost(String host)
NetServerOptions
setHost
in class NetServerOptions
host
- the hostpublic JsonObject getHeartbeat()
x: 1000, y: 1000
.Frame.Heartbeat
public StompServerOptions setHeartbeat(JsonObject heartbeat)
heartbeat
- the heartbeat configurationStompServerOptions
Frame.Heartbeat
public 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 frameStompServerOptions
public int getTransactionChunkSize()
public StompServerOptions setTransactionChunkSize(int transactionChunkSize)
transactionChunkSize
- the size, must be strictly positiveStompServerOptions
public int getMaxSubscriptionsByClient()
public StompServerOptions setMaxSubscriptionsByClient(int maxSubscriptionsByClient)
maxSubscriptionsByClient
- the max number of subscriptionsStompServerOptions
Copyright © 2015. All rights reserved.