Interface Mqtt3ConnectBuilderBase<B extends Mqtt3ConnectBuilderBase<B>>
- Type Parameters:
B- the type of the builder.
- All Known Subinterfaces:
Mqtt3ConnectBuilder,Mqtt3ConnectBuilder.Nested<P>,Mqtt3ConnectBuilder.Send<P>
Builder base for a
Mqtt3Connect.- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptioncleanSession(boolean cleanSession) Sets whether the client connects with aclean session.keepAlive(int keepAlive) Sets thekeep alivein seconds.Disables thekeep aliveby setting it toMqtt3Connect.NO_KEEP_ALIVE.@NotNull Mqtt3ConnectRestrictionsBuilder.Nested<? extends B> Fluent counterpart ofrestrictions(Mqtt3ConnectRestrictions).restrictions(@NotNull Mqtt3ConnectRestrictions restrictions) Sets therestrictionsfrom the client.@NotNull Mqtt3SimpleAuthBuilder.Nested<? extends B> Fluent counterpart ofsimpleAuth(Mqtt3SimpleAuth).simpleAuth(@Nullable Mqtt3SimpleAuth simpleAuth) Sets the optionalsimple authentication and/or authorization related data.@NotNull Mqtt3WillPublishBuilder.Nested<? extends B> Fluent counterpart ofwillPublish(Mqtt3Publish).willPublish(@Nullable Mqtt3Publish willPublish) Sets the optionalWill Publish.
-
Method Details
-
keepAlive
Sets thekeep alivein seconds.The value must be in the range of an unsigned short: [0, 65_535].
- Parameters:
keepAlive- the keep alive in seconds.- Returns:
- the builder.
-
noKeepAlive
Disables thekeep aliveby setting it toMqtt3Connect.NO_KEEP_ALIVE.- Returns:
- the builder.
-
cleanSession
Sets whether the client connects with aclean session.- Parameters:
cleanSession- whether the client connects with a clean session.- Returns:
- the builder.
-
restrictions
Sets therestrictionsfrom the client.- Parameters:
restrictions- the restrictions from the client.- Returns:
- the builder.
- Since:
- 1.3
-
restrictions
Fluent counterpart ofrestrictions(Mqtt3ConnectRestrictions).Calling
Mqtt3ConnectRestrictionsBuilder.Nested.applyRestrictions()on the returned builder has the effect ofextendingthe current restrictions.- Returns:
- the fluent builder for the restrictions.
- Since:
- 1.3
- See Also:
-
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.
-
simpleAuth
Fluent counterpart ofsimpleAuth(Mqtt3SimpleAuth).Calling
Mqtt3SimpleAuthBuilder.Nested.Complete.applySimpleAuth()on the returned builder has the same effect as callingsimpleAuth(Mqtt3SimpleAuth)with the result ofMqtt3SimpleAuthBuilder.Complete.build().- Returns:
- the fluent builder for the simple auth related data.
- See Also:
-
willPublish
Sets the optionalWill Publish.- Parameters:
willPublish- the Will Publish ornullto remove any previously set Will Publish.- Returns:
- the builder.
-
willPublish
Fluent counterpart ofwillPublish(Mqtt3Publish).Calling
Mqtt3WillPublishBuilder.Nested.Complete.applyWillPublish()on the returned builder has the same effect as callingwillPublish(Mqtt3Publish)with the result ofMqtt3WillPublishBuilder.Complete.build().- Returns:
- the fluent builder for the Will Publish.
- See Also:
-