Package com.hivemq.client.mqtt.mqtt5
Interface Mqtt5ClientBuilder
- All Superinterfaces:
MqttClientBuilderBase<Mqtt5ClientBuilder>
@DoNotImplement
public interface Mqtt5ClientBuilder
extends MqttClientBuilderBase<Mqtt5ClientBuilder>
Builder for an
Mqtt5Client.- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionFluent counterpart ofadvancedConfig(Mqtt5ClientAdvancedConfig).advancedConfig(@NotNull Mqtt5ClientAdvancedConfig advancedConfig) Sets theadvanced configuration.build()Builds theMqtt5Client.Builds theMqtt5AsyncClient.Builds theMqtt5BlockingClient.buildRx()Builds theMqtt5RxClient.enhancedAuth(@Nullable Mqtt5EnhancedAuthMechanism enhancedAuthMechanism) Fluent counterpart ofsimpleAuth(Mqtt5SimpleAuth).simpleAuth(@Nullable Mqtt5SimpleAuth simpleAuth) Sets the optionalsimple authentication and/or authorization related data.Fluent counterpart ofwillPublish(Mqtt5Publish).willPublish(@Nullable Mqtt5Publish willPublish) Sets the optionalWill Publish.Methods inherited from interface com.hivemq.client.mqtt.MqttClientBuilderBase
addConnectedListener, addDisconnectedListener, automaticReconnect, automaticReconnect, automaticReconnectWithDefaultConfig, executorConfig, executorConfig, identifier, identifier, serverAddress, serverHost, serverHost, serverPort, sslConfig, sslConfig, sslWithDefaultConfig, transportConfig, transportConfig, useSsl, useSsl, useSslWithDefaultConfig, useWebSocket, useWebSocket, useWebSocketWithDefaultConfig, webSocketConfig, webSocketConfig, webSocketWithDefaultConfig
-
Method Details
-
advancedConfig
@CheckReturnValue @NotNull @NotNull Mqtt5ClientBuilder advancedConfig(@NotNull @NotNull Mqtt5ClientAdvancedConfig advancedConfig) Sets theadvanced configuration.- Parameters:
advancedConfig- the advanced configuration.- Returns:
- the builder.
-
advancedConfig
@CheckReturnValue @NotNull Mqtt5ClientAdvancedConfigBuilder.Nested<? extends Mqtt5ClientBuilder> advancedConfig()Fluent counterpart ofadvancedConfig(Mqtt5ClientAdvancedConfig).Calling
Mqtt5ClientAdvancedConfigBuilder.Nested.applyAdvancedConfig()on the returned builder has the effect of extending the current advanced configuration.- Returns:
- the fluent builder for the advanced configuration.
- See Also:
-
simpleAuth
@CheckReturnValue @NotNull @NotNull Mqtt5ClientBuilder simpleAuth(@Nullable @Nullable Mqtt5SimpleAuth simpleAuth) Sets the optionalsimple authentication and/or authorization related data.- Parameters:
simpleAuth- the simple auth related data ornullto remove any previously set simple auth related data.- Returns:
- the builder.
- Since:
- 1.1
-
simpleAuth
Fluent counterpart ofsimpleAuth(Mqtt5SimpleAuth).Calling
Mqtt5SimpleAuthBuilder.Nested.Complete.applySimpleAuth()on the returned builder has the same effect as callingsimpleAuth(Mqtt5SimpleAuth)with the result ofMqtt5SimpleAuthBuilder.Complete.build().- Returns:
- the fluent builder for the simple auth related data.
- Since:
- 1.1
- See Also:
-
enhancedAuth
@CheckReturnValue @NotNull @NotNull Mqtt5ClientBuilder enhancedAuth(@Nullable @Nullable Mqtt5EnhancedAuthMechanism enhancedAuthMechanism) - Parameters:
enhancedAuthMechanism- the enhanced auth mechanism ornullto remove any previously set enhanced auth mechanism.- Returns:
- the builder.
- Since:
- 1.1
-
willPublish
@CheckReturnValue @NotNull @NotNull Mqtt5ClientBuilder willPublish(@Nullable @Nullable Mqtt5Publish willPublish) Sets the optionalWill Publish.- Parameters:
willPublish- the Will Publish ornullto remove any previously set Will Publish.- Returns:
- the builder.
- Since:
- 1.1
-
willPublish
@CheckReturnValue @NotNull Mqtt5WillPublishBuilder.Nested<? extends Mqtt5ClientBuilder> willPublish()Fluent counterpart ofwillPublish(Mqtt5Publish).Calling
Mqtt5WillPublishBuilder.Nested.Complete.applyWillPublish()on the returned builder has the same effect as callingwillPublish(Mqtt5Publish)with the result ofMqtt5WillPublishBuilder.Complete.build().- Returns:
- the fluent builder for the Will Publish.
- Since:
- 1.1
- See Also:
-
build
Builds theMqtt5Client.- Returns:
- the built
Mqtt5Client.
-
buildRx
Builds theMqtt5RxClient.- Returns:
- the built
Mqtt5RxClient.
-
buildAsync
Builds theMqtt5AsyncClient.- Returns:
- the built
Mqtt5AsyncClient.
-
buildBlocking
Builds theMqtt5BlockingClient.- Returns:
- the built
Mqtt5BlockingClient.
-