public class StompClientOptions extends NetClientOptions implements StompOptions
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL, DEFAULT_REGISTER_WRITE_HANDLER
DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALL
DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_READ_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_TCP_USER_TIMEOUT, DEFAULT_USE_ALPN, DEFAULT_WRITE_IDLE_TIMEOUT
DEFAULT_LOG_ACTIVITY_FORMAT, DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS
DEFAULT_STOMP_HEARTBEAT, DEFAULT_STOMP_HOST, DEFAULT_STOMP_PORT, DEFAULT_SUPPORTED_VERSIONS, DEFAULT_TRAILING_LINE, UTF_8
Constructor and Description |
---|
StompClientOptions()
Default constructor.
|
StompClientOptions(JsonObject json)
Creates an instance from a
JsonObject . |
StompClientOptions(StompClientOptions other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
List<String> |
getAcceptedVersions()
Gets the list of STOMP protocol versions accepted by the client.
|
JsonObject |
getHeartbeat()
Gets the heartbeat configuration.
|
String |
getHost()
Gets the STOMP server host.
|
String |
getLogin()
Gets the configured login.
|
String |
getPasscode()
Gets the configured passcode.
|
int |
getPort()
Gets the STOMP server port.
|
String |
getVirtualHost()
Gets the virtual host that would be use a "host" header value in the `CONNECT` frame.
|
boolean |
isAutoComputeContentLength()
Whether or not the automatic computation of the
content-length header is enabled. |
boolean |
isBypassHostHeader()
Checks whether or not the
host header must be dropped from the CONNECT/STOMP frame. |
boolean |
isTrailingLine()
Gets whether or not an empty line should be appended to the written STOMP frame.
|
boolean |
isUseStompFrame()
Checks whether or not the connection is made using the
STOMP command instead of the CONNECT
command. |
StompClientOptions |
setAcceptedVersions(List<String> acceptedVersions)
Sets the list of STOMP protocol versions accepted by the client.
|
StompClientOptions |
setAutoComputeContentLength(boolean autoComputeContentLength)
Sets whether or not the automatic computation of the
content-length header is enabled. |
StompClientOptions |
setBypassHostHeader(boolean bypassHostHeader)
Sets whether or not the
host header must be dropped from the CONNECT/STOMP frame. |
StompClientOptions |
setHeartbeat(JsonObject heartbeat)
Sets the heartbeat configuration.
|
StompClientOptions |
setHost(String host)
Sets the STOMP server host.
|
StompClientOptions |
setLogin(String login)
Sets the login to use if the STOMP server is secured.
|
StompClientOptions |
setPasscode(String passcode)
Sets the passcode to use if the STOMP server is secured.
|
StompClientOptions |
setPort(int port)
Sets the STOMP server port.
|
StompClientOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
StompClientOptions |
setTrailingLine(boolean trailingLine)
Sets whether or not an empty line should be appended to the written STOMP frame.
|
StompClientOptions |
setUseStompFrame(boolean useStompFrame)
Sets whether or not the connection is made using the
STOMP command instead of the CONNECT command. |
StompClientOptions |
setVirtualHost(String virtualHost)
Sets the virtual host that will be used as "host" header value in the `CONNECT` frame.
|
JsonObject |
toJson()
Convert to JSON
|
addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, addNonProxyHost, getApplicationLayerProtocols, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, isRegisterWriteHandler, removeEnabledCipherSuite, removeEnabledSecureTransportProtocol, setActivityLogDataFormat, setApplicationLayerProtocols, setConnectTimeout, setEnabledSecureTransportProtocols, setHostnameVerificationAlgorithm, setIdleTimeout, setIdleTimeoutUnit, setJdkSslEngineOptions, setKeyCertOptions, setKeyStoreOptions, setLocalAddress, setLogActivity, setMetricsName, setNonProxyHosts, setOpenSslEngineOptions, setPemKeyCertOptions, setPemTrustOptions, setPfxKeyCertOptions, setPfxTrustOptions, setProxyOptions, setReadIdleTimeout, setReceiveBufferSize, setReconnectAttempts, setReconnectInterval, setRegisterWriteHandler, setReuseAddress, setReusePort, setSendBufferSize, setSoLinger, setSslEngineOptions, setSslHandshakeTimeout, setSslHandshakeTimeoutUnit, setTcpCork, setTcpFastOpen, setTcpKeepAlive, setTcpNoDelay, setTcpQuickAck, setTrafficClass, setTrustAll, setTrustOptions, setTrustStoreOptions, setUseAlpn, setWriteIdleTimeout
getConnectTimeout, getLocalAddress, getMetricsName, getNonProxyHosts, getProxyOptions, isTrustAll, setTcpUserTimeout
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getReadIdleTimeout, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getSslOptions, getTcpUserTimeout, getTrustOptions, getTrustStoreOptions, getWriteIdleTimeout, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn
getActivityLogDataFormat, getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort
public StompClientOptions()
public StompClientOptions(StompClientOptions other)
other
- The other StompServerOptions
to copy when creating thispublic StompClientOptions(JsonObject json)
JsonObject
.json
- the JsonObject to create it frompublic JsonObject toJson()
ClientOptionsBase
toJson
in class NetClientOptions
public String getHost()
public StompClientOptions setHost(String host)
0.0.0.0
by default.host
- the host name of the STOMP serverStompClientOptions
public String getLogin()
public StompClientOptions setLogin(String login)
login
- the loginStompClientOptions
public String getPasscode()
public StompClientOptions setPasscode(String passcode)
passcode
- the passcodeStompClientOptions
public int getPort()
public StompClientOptions setPort(int port)
61613
by default.port
- the portStompClientOptions
public List<String> getAcceptedVersions()
public StompClientOptions setAcceptedVersions(List<String> acceptedVersions)
1.0, 1.1, 1.2
acceptedVersions
- the order list of accepted versionsStompClientOptions
public boolean isAutoComputeContentLength()
content-length
header is enabled.public StompClientOptions setAutoComputeContentLength(boolean autoComputeContentLength)
content-length
header is enabled. If enabled, the
content-length
header is set in all frame with a body that do not explicitly set the header. The option
is enabled by default.autoComputeContentLength
- true
to enable the option, false
to disable it.StompClientOptions
public boolean isUseStompFrame()
STOMP
command instead of the CONNECT
command. The STOMP
command has been introduced in the 1.2 version of the protocol to ease the network
analysis (as CONNECT
is also used by HTTP. To be compliant with server not implementing the 1.2
specification, this option should be disabled.public StompClientOptions setUseStompFrame(boolean useStompFrame)
STOMP
command instead of the CONNECT
command.
The STOMP
command has been introduced in the 1.2 version of the protocol to ease the network analysis
(as CONNECT
is also used by HTTP. To be compliant with server not implementing the 1.2 specification,
this option should be disabled. This option is disabled by default.useStompFrame
- true
to enable the option, false
to disable it.StompClientOptions
public StompClientOptions setSsl(boolean ssl)
TCPSSLOptions
setSsl
in class NetClientOptions
ssl
- true if enabledpublic boolean isBypassHostHeader()
host
header must be dropped from the CONNECT/STOMP
frame. Server may
be picky about this header (such as RabbitMQ that does not support it).public StompClientOptions setBypassHostHeader(boolean bypassHostHeader)
host
header must be dropped from the CONNECT/STOMP
frame. Server may
be picky about this header (such as RabbitMQ that does not support it). Options disabled by default.bypassHostHeader
- true
to enable the option, false
to disable it.StompClientOptions
public JsonObject getHeartbeat()
Frame.Heartbeat
public StompClientOptions setHeartbeat(JsonObject heartbeat)
heartbeat
- the configurationStompClientOptions
Frame.Heartbeat
public String getVirtualHost()
public StompClientOptions setVirtualHost(String virtualHost)
virtualHost
- the virtual hostStompClientOptions
public boolean isTrailingLine()
public StompClientOptions setTrailingLine(boolean trailingLine)
trailingLine
- true
to add an empty line, false
otherwiseStompClientOptions
Copyright © 2023 Eclipse. All rights reserved.