@DoNotImplement public interface Mqtt3RxClient extends Mqtt3Client
Mqtt3Client.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 Single<Mqtt3ConnAck> |
connect()
Creates a
Single for connecting this client with the default Connect message. |
@NotNull Single<Mqtt3ConnAck> |
connect(@NotNull Mqtt3Connect connect)
Creates a
Single for connecting this client with the given Connect message. |
Mqtt3ConnectBuilder.Nested<Single<Mqtt3ConnAck>> |
connectWith()
Fluent counterpart of
connect(Mqtt3Connect). |
@NotNull Completable |
disconnect()
Creates a
Completable for disconnecting this client. |
@NotNull Flowable<Mqtt3PublishResult> |
publish(@NotNull Flowable<Mqtt3Publish> publishFlowable)
|
@NotNull Flowable<Mqtt3Publish> |
publishes(@NotNull MqttGlobalPublishFilter filter)
Creates a
Flowable for globally consuming all incoming Publish messages matching the given filter. |
@NotNull Flowable<Mqtt3Publish> |
publishes(@NotNull MqttGlobalPublishFilter filter,
boolean manualAcknowledgement)
Creates a
Flowable for globally consuming all incoming Publish messages matching the given filter. |
@NotNull Single<Mqtt3SubAck> |
subscribe(@NotNull Mqtt3Subscribe subscribe)
Creates a
Single for subscribing this client with the given Subscribe message. |
@NotNull FlowableWithSingle<Mqtt3Publish,Mqtt3SubAck> |
subscribePublishes(@NotNull Mqtt3Subscribe subscribe)
Creates a
FlowableWithSingle for subscribing this client with the given Subscribe message. |
@NotNull FlowableWithSingle<Mqtt3Publish,Mqtt3SubAck> |
subscribePublishes(@NotNull Mqtt3Subscribe subscribe,
boolean manualAcknowledgement)
Creates a
FlowableWithSingle for subscribing this client with the given Subscribe message. |
Mqtt3SubscribeBuilder.Publishes.Start<FlowableWithSingle<Mqtt3Publish,Mqtt3SubAck>> |
subscribePublishesWith()
Fluent counterpart of
subscribePublishes(Mqtt3Subscribe, boolean). |
@NotNull FlowableWithSingle<Mqtt3Publish,Mqtt3SubAck> |
subscribeStream(@NotNull Mqtt3Subscribe subscribe)
Deprecated.
|
Mqtt3SubscribeBuilder.Nested.Start<FlowableWithSingle<Mqtt3Publish,Mqtt3SubAck>> |
subscribeStreamWith()
Deprecated.
|
Mqtt3SubscribeBuilder.Nested.Start<Single<Mqtt3SubAck>> |
subscribeWith()
Fluent counterpart of
subscribe(Mqtt3Subscribe). |
default @NotNull Mqtt3RxClient |
toRx()
Turns the API of this client into a reactive API.
|
@NotNull Completable |
unsubscribe(@NotNull Mqtt3Unsubscribe unsubscribe)
Creates a
Completable for unsubscribing this client with the given Unsubscribe message. |
Mqtt3UnsubscribeBuilder.Nested.Start<Completable> |
unsubscribeWith()
Fluent counterpart of
unsubscribe(Mqtt3Unsubscribe). |
builder, getConfig, toAsync, toBlockinggetState@CheckReturnValue @NotNull @NotNull Single<Mqtt3ConnAck> connect()
Single for connecting this client with the default Connect message.connect(Mqtt3Connect).connect(Mqtt3Connect)@CheckReturnValue @NotNull @NotNull Single<Mqtt3ConnAck> connect(@NotNull @NotNull Mqtt3Connect connect)
Single for connecting this client with the given Connect message.
The returned Single represents the source of the ConnAck message corresponding to the given Connect
message. Calling this method does not connect yet. Connecting is performed lazy and asynchronous when subscribing
(in terms of Reactive Streams) to the returned Single.
connect - the Connect message sent to the broker during connect.Single which
Mqtt3ConnAckException wrapping the ConnAck message if it contains an Error Code or
@CheckReturnValue Mqtt3ConnectBuilder.Nested<Single<Mqtt3ConnAck>> connectWith()
connect(Mqtt3Connect).
Calling Mqtt3ConnectBuilder.Nested#applyConnect() on the returned builder has the same effect as calling
connect(Mqtt3Connect) with the result of Mqtt3ConnectBuilder.build().
connect(Mqtt3Connect)@CheckReturnValue @NotNull @NotNull Single<Mqtt3SubAck> subscribe(@NotNull @NotNull Mqtt3Subscribe subscribe)
Single for subscribing this client with the given Subscribe message.
The returned Single represents the source of the SubAck message corresponding to the given Subscribe
message. Calling this method does not subscribe yet. Subscribing is performed lazy and asynchronous when
subscribing (in terms of Reactive Streams) to the returned Single.
See publishes(MqttGlobalPublishFilter) to consume the incoming Publish messages. Alternatively, call
subscribePublishes(Mqtt3Subscribe) to consume the incoming Publish messages matching the subscriptions
of the Subscribe message directly.
subscribe - the Subscribe message sent to the broker during subscribe.Single which
Mqtt3SubAckException wrapping the SubAck message if it only contains Error Codes or
@CheckReturnValue Mqtt3SubscribeBuilder.Nested.Start<Single<Mqtt3SubAck>> subscribeWith()
subscribe(Mqtt3Subscribe).
Calling Mqtt3SubscribeBuilder.Nested.Complete#applySubscribe() on the returned builder has the same
effect as calling subscribe(Mqtt3Subscribe) with the result of Mqtt3SubscribeBuilder.Complete#build().
subscribe(Mqtt3Subscribe)@Deprecated @NotNull @NotNull FlowableWithSingle<Mqtt3Publish,Mqtt3SubAck> subscribeStream(@NotNull @NotNull Mqtt3Subscribe subscribe)
subscribePublishes(Mqtt3Subscribe).subscribe - use subscribePublishes(Mqtt3Subscribe).subscribePublishes(Mqtt3Subscribe).@Deprecated Mqtt3SubscribeBuilder.Nested.Start<FlowableWithSingle<Mqtt3Publish,Mqtt3SubAck>> subscribeStreamWith()
subscribePublishesWith().subscribePublishesWith().@CheckReturnValue @NotNull @NotNull FlowableWithSingle<Mqtt3Publish,Mqtt3SubAck> subscribePublishes(@NotNull @NotNull Mqtt3Subscribe subscribe)
FlowableWithSingle for subscribing this client with the given Subscribe message.
The returned FlowableWithSingle represents the source of the SubAck message corresponding to the given
Subscribe message and the source of the incoming Publish messages matching the subscriptions of the Subscribe
message. Calling this method does not subscribe yet. Subscribing is performed lazy and asynchronous when
subscribing (in terms of Reactive Streams) to the returned FlowableWithSingle.
subscribe - the Subscribe message sent to the broker during subscribe.FlowableWithSingle which
Mqtt3SubAckException wrapping the SubAck message if it only contains Error Codes or
MqttSessionExpiredException).
subscribePublishes(Mqtt3Subscribe, boolean)@CheckReturnValue @NotNull @NotNull FlowableWithSingle<Mqtt3Publish,Mqtt3SubAck> subscribePublishes(@NotNull @NotNull Mqtt3Subscribe subscribe, boolean manualAcknowledgement)
FlowableWithSingle for subscribing this client with the given Subscribe message.
The returned FlowableWithSingle represents the source of the SubAck message corresponding to the given
Subscribe message and the source of the incoming Publish messages matching the subscriptions of the Subscribe
message. Calling this method does not subscribe yet. Subscribing is performed lazy and asynchronous when
subscribing (in terms of Reactive Streams) to the returned FlowableWithSingle.
subscribe - the Subscribe message sent to the broker during subscribe.manualAcknowledgement - whether the Publish messages are acknowledged manually.FlowableWithSingle which
Mqtt3SubAckException wrapping the SubAck message if it only contains Error Codes or
MqttSessionExpiredException).
subscribePublishes(Mqtt3Subscribe)@CheckReturnValue Mqtt3SubscribeBuilder.Publishes.Start<FlowableWithSingle<Mqtt3Publish,Mqtt3SubAck>> subscribePublishesWith()
subscribePublishes(Mqtt3Subscribe, boolean).
Calling Mqtt3SubscribeBuilder.Nested.Complete#applySubscribe() on the returned builder has the same
effect as calling subscribePublishes(Mqtt3Subscribe) with the result of Mqtt3SubscribeBuilder.Complete#build().
subscribePublishes(Mqtt3Subscribe, boolean)@CheckReturnValue @NotNull @NotNull Flowable<Mqtt3Publish> publishes(@NotNull @NotNull MqttGlobalPublishFilter filter)
Flowable for globally consuming all incoming Publish messages matching the given filter.
The returned Flowable represents the source of the incoming Publish messages matching the given type.
Calling this method does not start consuming yet. This is done lazy and asynchronous when subscribing (in terms
of Reactive Streams) to the returned Flowable.
filter - the filter with which all incoming Publish messages are filtered.Flowable which
MqttSessionExpiredException when the MQTT session expires.
publishes(MqttGlobalPublishFilter, boolean)@CheckReturnValue @NotNull @NotNull Flowable<Mqtt3Publish> publishes(@NotNull @NotNull MqttGlobalPublishFilter filter, boolean manualAcknowledgement)
Flowable for globally consuming all incoming Publish messages matching the given filter.
The returned Flowable represents the source of the incoming Publish messages matching the given type.
Calling this method does not start consuming yet. This is done lazy and asynchronous when subscribing (in terms
of Reactive Streams) to the returned Flowable.
filter - the filter with which all incoming Publish messages are filtered.manualAcknowledgement - whether the Publish messages are acknowledged manually.Flowable which
MqttSessionExpiredException when the MQTT session expires.
publishes(MqttGlobalPublishFilter)@CheckReturnValue @NotNull @NotNull Completable unsubscribe(@NotNull @NotNull Mqtt3Unsubscribe unsubscribe)
Completable for unsubscribing this client with the given Unsubscribe message.
The returned Completable represents the source of the UnsubAck message corresponding to the given
Unsubscribe message. Calling this method does not unsubscribe yet. Unsubscribing is performed lazy and
asynchronous when subscribing (in terms of Reactive Streams) to the returned Completable.
unsubscribe - the Unsubscribe message sent to the broker during unsubscribe.Completable which
@CheckReturnValue Mqtt3UnsubscribeBuilder.Nested.Start<Completable> unsubscribeWith()
unsubscribe(Mqtt3Unsubscribe).
Calling Mqtt3UnsubscribeBuilder.Nested.Complete#applyUnsubscribe() on the returned builder has the same
effect as calling unsubscribe(Mqtt3Unsubscribe) with the result of Mqtt3UnsubscribeBuilder.Complete#build().
unsubscribe(Mqtt3Unsubscribe)@CheckReturnValue @NotNull @NotNull Flowable<Mqtt3PublishResult> publish(@NotNull @NotNull Flowable<Mqtt3Publish> publishFlowable)
Flowable for publishing the Publish messages emitted by the given Flowable.
The returned Flowable represents the source of Mqtt3PublishResults each corresponding to a
Publish message emitted by the given Flowable. Calling this method does not start publishing yet.
Publishing is performed lazy and asynchronous. When subscribing (in terms of Reactive Streams) to the returned
Flowable the client subscribes (in terms of Reactive Streams) to the given Flowable.
publishFlowable - the source of the Publish messages to publish.Flowable which
Mqtt3PublishResults each corresponding to a Publish message,
Flowable completes, but not before all Mqtt3PublishResults
were emitted, or
Flowable errors, but not before all
Mqtt3PublishResults were emitted.
@CheckReturnValue @NotNull @NotNull Completable disconnect()
Completable for disconnecting this client.
Calling this method does not disconnect yet. Disconnecting is performed lazy and asynchronous when subscribing
(in terms of Reactive Streams) to the returned Completable.
Completable which
@CheckReturnValue @NotNull default @NotNull Mqtt3RxClient toRx()
Mqtt3ClientThe reactive API can be used simultaneously with the other APIs.
toRx in interface Mqtt3Client