Interface MqttClientTransportConfigBuilderBase<B extends MqttClientTransportConfigBuilderBase<B>>
- Type Parameters:
B- the type of the builder.
- All Known Subinterfaces:
MqttClientTransportConfigBuilder,MqttClientTransportConfigBuilder.Nested<P>
MqttClientTransportConfig.- Since:
- 1.1
-
Method Summary
Modifier and TypeMethodDescriptionlocalAddress(@Nullable String address) Sets the optional local bind address.localAddress(@Nullable InetAddress address) Sets the optional local bind address.localAddress(@Nullable InetSocketAddress address) Sets the optionallocal bind address.localPort(int port) Sets the optional local bind port.mqttConnectTimeout(long timeout, @NotNull TimeUnit timeUnit) @NotNull MqttProxyConfigBuilder.Nested<? extends B> Fluent counterpart ofproxyConfig(MqttProxyConfig).proxyConfig(@Nullable MqttProxyConfig proxyConfig) Sets the optionalproxy configuration.serverAddress(@NotNull InetSocketAddress address) Sets theserver addressto connect to.serverHost(@NotNull String host) Sets the server host to connect to.serverHost(@NotNull InetAddress host) Sets the server host to connect to.serverPort(int port) Sets the server port to connect to.socketConnectTimeout(long timeout, @NotNull TimeUnit timeUnit) @NotNull MqttClientSslConfigBuilder.Nested<? extends B> Fluent counterpart ofsslConfig(MqttClientSslConfig).sslConfig(@Nullable MqttClientSslConfig sslConfig) Sets the optionalsecure transport configuration.Sets thesecure transport configurationto the default configuration.@NotNull MqttWebSocketConfigBuilder.Nested<? extends B> Fluent counterpart ofwebSocketConfig(MqttWebSocketConfig).webSocketConfig(@Nullable MqttWebSocketConfig webSocketConfig) Sets the optionalWebSocket transport configuration.Sets theWebSocket transport configurationto the default configuration.
-
Method Details
-
serverAddress
Sets theserver addressto connect to.- Parameters:
address- the server address.- Returns:
- the builder.
-
serverHost
Sets the server host to connect to.- Parameters:
host- the server host.- Returns:
- the builder.
-
serverHost
Sets the server host to connect to.- Parameters:
host- the server host.- Returns:
- the builder.
-
serverPort
Sets the server port to connect to.- Parameters:
port- the server port.- Returns:
- the builder.
-
localAddress
Sets the optionallocal bind address.The address must be resolved.
- Parameters:
address- the local bind address.- Returns:
- the builder.
- Since:
- 1.2
-
localAddress
Sets the optional local bind address.The address must be resolvable.
- Parameters:
address- the local bind address.- Returns:
- the builder.
- Since:
- 1.2
-
localAddress
Sets the optional local bind address.- Parameters:
address- the local bind address- Returns:
- the builder.
- Since:
- 1.2
-
localPort
Sets the optional local bind port.- Parameters:
port- the local bind port.- Returns:
- the builder.
- Since:
- 1.2
-
sslWithDefaultConfig
Sets thesecure transport configurationto the default configuration.This means that the systems default trust store, ciphers and protocols are used.
- Returns:
- the builder.
-
sslConfig
Sets the optionalsecure transport configuration.- Parameters:
sslConfig- the secure transport configuration ornullto remove any previously set secure transport configuration.- Returns:
- the builder.
-
sslConfig
Fluent counterpart ofsslConfig(MqttClientSslConfig).Calling
MqttClientSslConfigBuilder.Nested.applySslConfig()on the returned builder has the effect of extending the current secure transport configuration.- Returns:
- the fluent builder for the secure transport configuration.
- See Also:
-
webSocketWithDefaultConfig
Sets theWebSocket transport configurationto the default configuration.- Returns:
- the builder.
-
webSocketConfig
@CheckReturnValue @NotNull B webSocketConfig(@Nullable @Nullable MqttWebSocketConfig webSocketConfig) Sets the optionalWebSocket transport configuration.- Parameters:
webSocketConfig- the WebSocket transport configuration ornullto remove any previously set WebSocket transport configuration.- Returns:
- the builder.
-
webSocketConfig
Fluent counterpart ofwebSocketConfig(MqttWebSocketConfig).Calling
MqttWebSocketConfigBuilder.Nested.applyWebSocketConfig()on the returned builder has the effect of extending the current WebSocket transport configuration.- Returns:
- the fluent builder for the WebSocket configuration.
- See Also:
-
proxyConfig
Sets the optionalproxy configuration.- Parameters:
proxyConfig- the proxy configuration ornullto remove any previously set proxy configuration.- Returns:
- the builder.
- Since:
- 1.2
-
proxyConfig
Fluent counterpart ofproxyConfig(MqttProxyConfig).Calling
MqttProxyConfigBuilder.Nested.applyProxyConfig()on the returned builder has the effect of extending the current proxy configuration.- Returns:
- the fluent builder for the proxy configuration.
- Since:
- 1.2
- See Also:
-
socketConnectTimeout
@CheckReturnValue @NotNull B socketConnectTimeout(long timeout, @NotNull @NotNull TimeUnit timeUnit) Sets thetimeout for connecting the socket to the server.The timeout in milliseconds must be in the range: [0,
Integer.MAX_VALUE].- Parameters:
timeout- the timeout for connecting the socket to the server or0to disable the timeout.timeUnit- the time unit of the given timeout (this timeout only supports millisecond precision).- Returns:
- the builder.
- Since:
- 1.2
-
mqttConnectTimeout
Sets thetimeout between sending the Connect and receiving the ConnAck message.The timeout in milliseconds must be in the range: [0,
Integer.MAX_VALUE].- Parameters:
timeout- the timeout between sending the Connect and receiving the ConnAck message or0to disable the timeout.timeUnit- the time unit of the given timeout (this timeout only supports millisecond precision).- Returns:
- the builder.
- Since:
- 1.2
-