@DoNotImplement public interface Mqtt5BlockingClient extends Mqtt5Client
Mqtt5Client.| Modifier and Type | Interface and Description |
|---|---|
static interface |
Mqtt5BlockingClient.Mqtt5Publishes
Resource which queues incoming Publish messages until they are received.
|
DEFAULT_SERVER_HOST, DEFAULT_SERVER_PORT, DEFAULT_SERVER_PORT_SSL, DEFAULT_SERVER_PORT_WEBSOCKET, DEFAULT_SERVER_PORT_WEBSOCKET_SSL| Modifier and Type | Method and Description |
|---|---|
@NotNull Mqtt5ConnAck |
connect()
Connects this client with the default Connect message.
|
@NotNull Mqtt5ConnAck |
connect(@NotNull Mqtt5Connect connect)
Connects this client with the given Connect message.
|
Mqtt5ConnectBuilder.Send<Mqtt5ConnAck> |
connectWith()
Fluent counterpart of
connect(Mqtt5Connect). |
void |
disconnect()
Disconnects this client with the default Disconnect message.
|
void |
disconnect(@NotNull Mqtt5Disconnect disconnect)
Disconnects this client with the given Disconnect message.
|
Mqtt5DisconnectBuilder.SendVoid |
disconnectWith()
Fluent counterpart of
disconnect(Mqtt5Disconnect). |
@NotNull Mqtt5PublishResult |
publish(@NotNull Mqtt5Publish publish)
Publishes the given Publish message.
|
@NotNull Mqtt5BlockingClient.Mqtt5Publishes |
publishes(@NotNull MqttGlobalPublishFilter filter)
Globally consumes all incoming Publish messages matching the given filter.
|
@NotNull Mqtt5BlockingClient.Mqtt5Publishes |
publishes(@NotNull MqttGlobalPublishFilter filter,
boolean manualAcknowledgement)
Globally consumes all incoming Publish messages matching the given filter.
|
Mqtt5PublishBuilder.Send<Mqtt5PublishResult> |
publishWith()
Fluent counterpart of
publish(Mqtt5Publish). |
void |
reauth()
Re-authenticates this client.
|
@NotNull Mqtt5SubAck |
subscribe(@NotNull Mqtt5Subscribe subscribe)
Subscribes this client with the given Subscribe message.
|
Mqtt5SubscribeBuilder.Send.Start<Mqtt5SubAck> |
subscribeWith()
Fluent counterpart of
subscribe(Mqtt5Subscribe). |
default @NotNull Mqtt5BlockingClient |
toBlocking()
Turns the API of this client into a blocking API.
|
@NotNull Mqtt5UnsubAck |
unsubscribe(@NotNull Mqtt5Unsubscribe unsubscribe)
Unsubscribes this client with the given Unsubscribe message.
|
Mqtt5UnsubscribeBuilder.Send.Start<Mqtt5UnsubAck> |
unsubscribeWith()
Fluent counterpart of
unsubscribe(Mqtt5Unsubscribe). |
builder, getConfig, toAsync, toRxgetState@NotNull @NotNull Mqtt5ConnAck connect()
connect(Mqtt5Connect).connect(Mqtt5Connect)@NotNull @NotNull Mqtt5ConnAck connect(@NotNull @NotNull Mqtt5Connect connect)
connect - the Connect message sent to the broker.Mqtt5ConnAckException - wrapping the ConnAck message if it contains
an Error Code.@CheckReturnValue Mqtt5ConnectBuilder.Send<Mqtt5ConnAck> connectWith()
connect(Mqtt5Connect).
Calling Mqtt5ConnectBuilder.Send#send() on the returned builder has the same effect as calling connect(Mqtt5Connect) with the result of Mqtt5ConnectBuilder.build().
connect(Mqtt5Connect)@NotNull @NotNull Mqtt5SubAck subscribe(@NotNull @NotNull Mqtt5Subscribe subscribe)
See publishes(MqttGlobalPublishFilter) to consume the incoming Publish messages.
subscribe - the Subscribe messages sent to the broker.Mqtt5SubAckException - wrapping the SubAck message if it contains
at least one Error Code.@CheckReturnValue Mqtt5SubscribeBuilder.Send.Start<Mqtt5SubAck> subscribeWith()
subscribe(Mqtt5Subscribe).
Calling Mqtt5SubscribeBuilder.Send.Complete#send() on the returned builder has the same effect as calling
subscribe(Mqtt5Subscribe) with the result of Mqtt5SubscribeBuilder.Complete#build().
subscribe(Mqtt5Subscribe)@NotNull @NotNull Mqtt5BlockingClient.Mqtt5Publishes publishes(@NotNull @NotNull MqttGlobalPublishFilter filter)
filter - the filter with which all incoming Publish messages are filtered.Mqtt5BlockingClient.Mqtt5Publishes instance that can be used to receive the Publish messages on the calling
thread.publishes(MqttGlobalPublishFilter, boolean)@NotNull @NotNull Mqtt5BlockingClient.Mqtt5Publishes publishes(@NotNull @NotNull MqttGlobalPublishFilter filter, boolean manualAcknowledgement)
filter - the filter with which all incoming Publish messages are filtered.manualAcknowledgement - whether the Publish messages are acknowledged manually.Mqtt5BlockingClient.Mqtt5Publishes instance that can be used to receive the Publish messages on the calling
thread.publishes(MqttGlobalPublishFilter)@NotNull @NotNull Mqtt5UnsubAck unsubscribe(@NotNull @NotNull Mqtt5Unsubscribe unsubscribe)
unsubscribe - the Unsubscribe message sent to the broker.Mqtt5UnsubAckException - wrapping the UnsubAck message if it
contains at least one Error Code.@CheckReturnValue Mqtt5UnsubscribeBuilder.Send.Start<Mqtt5UnsubAck> unsubscribeWith()
unsubscribe(Mqtt5Unsubscribe).
Calling Mqtt5UnsubscribeBuilder.Send.Complete#send() on the returned builder has the same effect as
calling unsubscribe(Mqtt5Unsubscribe) with the result of Mqtt5UnsubscribeBuilder.Complete#build().
unsubscribe(Mqtt5Unsubscribe)@NotNull @NotNull Mqtt5PublishResult publish(@NotNull @NotNull Mqtt5Publish publish)
publish - the Publish message sent to the broker.Mqtt5PublishResult if the Publish message was successfully published (no acknowledgement
message contains an Error Code, Mqtt5PublishResult.getError() will always be absent).Mqtt5PubAckException - wrapping the corresponding PubAck message if
it contains an Error Code.Mqtt5PubRecException - wrapping the corresponding PubRec message if
it contains an Error Code.@CheckReturnValue Mqtt5PublishBuilder.Send<Mqtt5PublishResult> publishWith()
publish(Mqtt5Publish).
Calling Mqtt5PublishBuilder.Send.Complete#send() on the returned builder has the same effect as calling
publish(Mqtt5Publish) with the result of Mqtt5PublishBuilder.Complete#build().
publish(Mqtt5Publish)void reauth()
Mqtt5AuthException - wrapping the Auth message with the Error Code
if not re-authenticated successfully.void disconnect()
disconnect(Mqtt5Disconnect)void disconnect(@NotNull
@NotNull Mqtt5Disconnect disconnect)
disconnect - the Disconnect message sent to the broker.@CheckReturnValue Mqtt5DisconnectBuilder.SendVoid disconnectWith()
disconnect(Mqtt5Disconnect).
Calling Mqtt5DisconnectBuilder.SendVoid#send() on the returned builder has the same effect as calling
disconnect(Mqtt5Disconnect) with the result of Mqtt5DisconnectBuilder.build().
disconnect(Mqtt5Disconnect)@CheckReturnValue @NotNull default @NotNull Mqtt5BlockingClient toBlocking()
Mqtt5ClientThe blocking API can be used simultaneously with the other APIs.
toBlocking in interface Mqtt5Client