@DoNotImplement public interface Mqtt3BlockingClient extends Mqtt3Client
Mqtt3Client
.Modifier and Type | Interface and Description |
---|---|
static interface |
Mqtt3BlockingClient.Mqtt3Publishes
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 Mqtt3ConnAck |
connect()
Connects this client with the default Connect message.
|
@NotNull Mqtt3ConnAck |
connect(@NotNull Mqtt3Connect connect)
Connects this client with the given Connect message.
|
Mqtt3ConnectBuilder.Send<Mqtt3ConnAck> |
connectWith()
Fluent counterpart of
connect(Mqtt3Connect) . |
void |
disconnect()
Disconnects this client with the given Disconnect message.
|
void |
publish(@NotNull Mqtt3Publish publish)
Publishes the given Publish message.
|
@NotNull Mqtt3BlockingClient.Mqtt3Publishes |
publishes(@NotNull MqttGlobalPublishFilter filter)
Globally consumes all incoming Publish messages matching the given filter.
|
@NotNull Mqtt3BlockingClient.Mqtt3Publishes |
publishes(@NotNull MqttGlobalPublishFilter filter,
boolean manualAcknowledgement)
Globally consumes all incoming Publish messages matching the given filter.
|
Mqtt3PublishBuilder.SendVoid |
publishWith()
Fluent counterpart of
publish(Mqtt3Publish) . |
@NotNull Mqtt3SubAck |
subscribe(@NotNull Mqtt3Subscribe subscribe)
Subscribes this client with the given Subscribe message.
|
Mqtt3SubscribeBuilder.Send.Start<Mqtt3SubAck> |
subscribeWith()
Fluent counterpart of
subscribe(Mqtt3Subscribe) . |
default @NotNull Mqtt3BlockingClient |
toBlocking()
Turns the API of this client into a blocking API.
|
void |
unsubscribe(@NotNull Mqtt3Unsubscribe unsubscribe)
Unsubscribes this client with the given Unsubscribe message.
|
Mqtt3UnsubscribeBuilder.SendVoid.Start |
unsubscribeWith()
Fluent counterpart of
unsubscribe(Mqtt3Unsubscribe) . |
builder, getConfig, toAsync, toRx
getState
@NotNull @NotNull Mqtt3ConnAck connect()
connect(Mqtt3Connect)
.connect(Mqtt3Connect)
@NotNull @NotNull Mqtt3ConnAck connect(@NotNull @NotNull Mqtt3Connect connect)
connect
- the Connect message sent to the broker.Mqtt3ConnAckException
- wrapping the ConnAck message if it contains
an Error Code.@CheckReturnValue Mqtt3ConnectBuilder.Send<Mqtt3ConnAck> connectWith()
connect(Mqtt3Connect)
.
Calling Mqtt3ConnectBuilder.Send#send()
on the returned builder has the same effect as calling connect(Mqtt3Connect)
with the result of Mqtt3ConnectBuilder.build()
.
connect(Mqtt3Connect)
@NotNull @NotNull Mqtt3SubAck subscribe(@NotNull @NotNull Mqtt3Subscribe subscribe)
See publishes(MqttGlobalPublishFilter)
to consume the incoming Publish messages.
subscribe
- the Subscribe messages sent to the broker.Mqtt3SubAckException
- wrapping the SubAck message if it contains
at least one Error Code.@CheckReturnValue Mqtt3SubscribeBuilder.Send.Start<Mqtt3SubAck> subscribeWith()
subscribe(Mqtt3Subscribe)
.
Calling Mqtt3SubscribeBuilder.Send.Complete#send()
on the returned builder has the same effect as calling
subscribe(Mqtt3Subscribe)
with the result of Mqtt3SubscribeBuilder.Complete#build()
.
subscribe(Mqtt3Subscribe)
@NotNull @NotNull Mqtt3BlockingClient.Mqtt3Publishes publishes(@NotNull @NotNull MqttGlobalPublishFilter filter)
filter
- the filter with which all incoming Publish messages are filtered.Mqtt3BlockingClient.Mqtt3Publishes
instance that can be used to receive the Publish messages on the calling
thread.publishes(MqttGlobalPublishFilter, boolean)
@NotNull @NotNull Mqtt3BlockingClient.Mqtt3Publishes 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.Mqtt3BlockingClient.Mqtt3Publishes
instance that can be used to receive the Publish messages on the calling
thread.publishes(MqttGlobalPublishFilter)
void unsubscribe(@NotNull @NotNull Mqtt3Unsubscribe unsubscribe)
unsubscribe
- the Unsubscribe message sent to the broker.@CheckReturnValue Mqtt3UnsubscribeBuilder.SendVoid.Start unsubscribeWith()
unsubscribe(Mqtt3Unsubscribe)
.
Calling Mqtt3UnsubscribeBuilder.SendVoid.Complete#send()
on the returned builder has the same effect as
calling unsubscribe(Mqtt3Unsubscribe)
with the result of Mqtt3UnsubscribeBuilder.Complete#build()
.
unsubscribe(Mqtt3Unsubscribe)
void publish(@NotNull @NotNull Mqtt3Publish publish)
publish
- the Publish message sent to the broker.@CheckReturnValue Mqtt3PublishBuilder.SendVoid publishWith()
publish(Mqtt3Publish)
.
Calling Mqtt3PublishBuilder.SendVoid.Complete#send()
on the returned builder has the same effect as
calling publish(Mqtt3Publish)
with the result of Mqtt3PublishBuilder.Complete#build()
.
publish(Mqtt3Publish)
void disconnect()
@CheckReturnValue @NotNull default @NotNull Mqtt3BlockingClient toBlocking()
Mqtt3Client
The blocking API can be used simultaneously with the other APIs.
toBlocking
in interface Mqtt3Client