Class StompClientOptions
java.lang.Object
io.vertx.core.net.NetworkOptions
io.vertx.core.net.TCPSSLOptions
io.vertx.core.net.ClientOptionsBase
io.vertx.core.net.NetClientOptions
io.vertx.ext.stomp.StompClientOptions
- All Implemented Interfaces:
StompOptions
Options used to configure a STOMP client. As a STOMP client wraps a Net client, you can also configure the
underlying NET client.
- Author:
- Clement Escoffier
-
Field Summary
Fields inherited from class NetClientOptions
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL, DEFAULT_REGISTER_WRITE_HANDLERFields inherited from class ClientOptionsBase
DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAMEFields inherited from class TCPSSLOptions
DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_READ_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEAPLIVE_COUNT, DEFAULT_TCP_KEEAPLIVE_IDLE_SECONDS, DEFAULT_TCP_KEEAPLIVE_INTERVAL_SECONDS, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_TCP_USER_TIMEOUT, DEFAULT_WRITE_IDLE_TIMEOUTFields inherited from class NetworkOptions
DEFAULT_LOG_ACTIVITY_FORMAT, DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASSFields inherited from interface StompOptions
DEFAULT_STOMP_HEARTBEAT, DEFAULT_STOMP_HOST, DEFAULT_STOMP_PORT, DEFAULT_SUPPORTED_VERSIONS, DEFAULT_TRAILING_LINE, UTF_8 -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.StompClientOptions(JsonObject json) Creates an instance from aJsonObject.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the list of STOMP protocol versions accepted by the client.Gets the heartbeat configuration.getHost()Gets the STOMP server host.getLogin()Gets the configured login.Gets the configured passcode.intgetPort()Gets the STOMP server port.Gets the virtual host that would be use a "host" header value in the `CONNECT` frame.booleanWhether or not the automatic computation of thecontent-lengthheader is enabled.booleanChecks whether or not thehostheader must be dropped from theCONNECT/STOMPframe.booleanGets whether or not an empty line should be appended to the written STOMP frame.booleanChecks whether or not the connection is made using theSTOMPcommand instead of theCONNECTcommand.setAcceptedVersions(List<String> acceptedVersions) Sets the list of STOMP protocol versions accepted by the client.setAutoComputeContentLength(boolean autoComputeContentLength) Sets whether or not the automatic computation of thecontent-lengthheader is enabled.setBypassHostHeader(boolean bypassHostHeader) Sets whether or not thehostheader must be dropped from theCONNECT/STOMPframe.setHeartbeat(JsonObject heartbeat) Sets the heartbeat configuration.Sets the STOMP server host.Sets the login to use if the STOMP server is secured.setPasscode(String passcode) Sets the passcode to use if the STOMP server is secured.setPort(int port) Sets the STOMP server port.setSsl(boolean ssl) Set whether SSL/TLS is enabledsetTrailingLine(boolean trailingLine) Sets whether or not an empty line should be appended to the written STOMP frame.setUseStompFrame(boolean useStompFrame) Sets whether or not the connection is made using theSTOMPcommand instead of theCONNECTcommand.setVirtualHost(String virtualHost) Sets the virtual host that will be used as "host" header value in the `CONNECT` frame.toJson()Convert to JSONMethods inherited from class NetClientOptions
addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, addNonProxyHost, getApplicationLayerProtocols, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, isRegisterWriteHandler, removeEnabledCipherSuite, removeEnabledSecureTransportProtocol, setActivityLogDataFormat, setApplicationLayerProtocols, setConnectTimeout, setEnabledSecureTransportProtocols, setHostnameVerificationAlgorithm, setIdleTimeout, setIdleTimeoutUnit, setKeyCertOptions, setLocalAddress, setLogActivity, setMetricsName, setNonProxyHosts, setProxyOptions, setReadIdleTimeout, setReceiveBufferSize, setReconnectAttempts, setReconnectInterval, setRegisterWriteHandler, setReuseAddress, setReusePort, setSendBufferSize, setSoLinger, setSslEngineOptions, setSslHandshakeTimeout, setSslHandshakeTimeoutUnit, setTcpCork, setTcpFastOpen, setTcpKeepAlive, setTcpNoDelay, setTcpQuickAck, setTcpUserTimeout, setTrafficClass, setTrustAll, setTrustOptions, setUseAlpn, setWriteIdleTimeoutMethods inherited from class ClientOptionsBase
createSSLOptions, getConnectTimeout, getLocalAddress, getMetricsName, getNonProxyHosts, getOrCreateSSLOptions, getProxyOptions, getSslOptions, isTrustAllMethods inherited from class TCPSSLOptions
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getKeyCertOptions, getReadIdleTimeout, getReceiveBufferSize, getSendBufferSize, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTcpKeepAliveCount, getTcpKeepAliveIdleSeconds, getTcpKeepAliveIntervalSeconds, getTcpUserTimeout, getTrafficClass, getTransportOptions, getTrustOptions, getWriteIdleTimeout, isReuseAddress, isReusePort, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, setTcpKeepAliveCount, setTcpKeepAliveIdleSeconds, setTcpKeepAliveIntervalSecondsMethods inherited from class NetworkOptions
getActivityLogDataFormat, getLogActivity
-
Constructor Details
-
StompClientOptions
public StompClientOptions()Default constructor. -
StompClientOptions
Copy constructor.- Parameters:
other- The otherStompServerOptionsto copy when creating this
-
StompClientOptions
Creates an instance from aJsonObject.- Parameters:
json- the JsonObject to create it from
-
-
Method Details
-
toJson
Description copied from class:ClientOptionsBaseConvert to JSON- Overrides:
toJsonin classNetClientOptions- Returns:
- a JSON representation of the options.
-
getHost
-
setHost
Sets the STOMP server host.0.0.0.0by default.- Parameters:
host- the host name of the STOMP server- Returns:
- the current
StompClientOptions
-
getLogin
-
setLogin
Sets the login to use if the STOMP server is secured.- Parameters:
login- the login- Returns:
- the current
StompClientOptions
-
getPasscode
-
setPasscode
Sets the passcode to use if the STOMP server is secured.- Parameters:
passcode- the passcode- Returns:
- the current
StompClientOptions
-
getPort
public int getPort()Gets the STOMP server port.- Returns:
- the port
-
setPort
Sets the STOMP server port.61613by default.- Parameters:
port- the port- Returns:
- the current
StompClientOptions
-
getAcceptedVersions
-
setAcceptedVersions
Sets the list of STOMP protocol versions accepted by the client. The list must be ordered from the lowest version to the highest. By default the following list is used:1.0, 1.1, 1.2- Parameters:
acceptedVersions- the order list of accepted versions- Returns:
- the current
StompClientOptions
-
isAutoComputeContentLength
public boolean isAutoComputeContentLength()Whether or not the automatic computation of thecontent-lengthheader is enabled.- Returns:
- whether or not the option is enabled
-
setAutoComputeContentLength
Sets whether or not the automatic computation of thecontent-lengthheader is enabled. If enabled, thecontent-lengthheader is set in all frame with a body that do not explicitly set the header. The option is enabled by default.- Parameters:
autoComputeContentLength-trueto enable the option,falseto disable it.- Returns:
- the current
StompClientOptions
-
isUseStompFrame
public boolean isUseStompFrame()Checks whether or not the connection is made using theSTOMPcommand instead of theCONNECTcommand. TheSTOMPcommand has been introduced in the 1.2 version of the protocol to ease the network analysis (asCONNECTis also used by HTTP. To be compliant with server not implementing the 1.2 specification, this option should be disabled.- Returns:
- whether or not the option is enabled
-
setUseStompFrame
Sets whether or not the connection is made using theSTOMPcommand instead of theCONNECTcommand. TheSTOMPcommand has been introduced in the 1.2 version of the protocol to ease the network analysis (asCONNECTis 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.- Parameters:
useStompFrame-trueto enable the option,falseto disable it.- Returns:
- the current
StompClientOptions
-
setSsl
Description copied from class:TCPSSLOptionsSet whether SSL/TLS is enabled- Overrides:
setSslin classNetClientOptions- Parameters:
ssl- true if enabled- Returns:
- a reference to this, so the API can be used fluently
-
isBypassHostHeader
public boolean isBypassHostHeader()Checks whether or not thehostheader must be dropped from theCONNECT/STOMPframe. Server may be picky about this header (such as RabbitMQ that does not support it).- Returns:
- whether or not the option is enabled
-
setBypassHostHeader
Sets whether or not thehostheader must be dropped from theCONNECT/STOMPframe. Server may be picky about this header (such as RabbitMQ that does not support it). Options disabled by default.- Parameters:
bypassHostHeader-trueto enable the option,falseto disable it.- Returns:
- the current
StompClientOptions
-
getHeartbeat
Gets the heartbeat configuration.- Returns:
- the heartbeat configuration
- See Also:
-
setHeartbeat
Sets the heartbeat configuration.- Parameters:
heartbeat- the configuration- Returns:
- the current
StompClientOptions - See Also:
-
getVirtualHost
Gets the virtual host that would be use a "host" header value in the `CONNECT` frame. This option is useful for Cloud AMQP.- Returns:
- the virtual host
-
setVirtualHost
Sets the virtual host that will be used as "host" header value in the `CONNECT` frame.- Parameters:
virtualHost- the virtual host- Returns:
- the current
StompClientOptions
-
isTrailingLine
public boolean isTrailingLine()Gets whether or not an empty line should be appended to the written STOMP frame. This option is disabled by default. This option is not compliant with the STOMP specification, and so is not documented on purpose.- Returns:
- whether or not an empty line should be appended to the written STOMP frame.
-
setTrailingLine
Sets whether or not an empty line should be appended to the written STOMP frame. This option is disabled by default. This option is not compliant with the STOMP specification, and so is not documented on purpose.- Parameters:
trailingLine-trueto add an empty line,falseotherwise- Returns:
- the current
StompClientOptions
-