Package com.hivemq.client.mqtt.mqtt5
Interface Mqtt5AsyncClient.Mqtt5SubscribeAndCallbackBuilder.Call
- All Known Subinterfaces:
Mqtt5AsyncClient.Mqtt5SubscribeAndCallbackBuilder.Call.Ex,Mqtt5AsyncClient.Mqtt5SubscribeAndCallbackBuilder.Complete,Mqtt5AsyncClient.Mqtt5SubscribeAndCallbackBuilder.Start.Complete
- Enclosing interface:
Mqtt5AsyncClient.Mqtt5SubscribeAndCallbackBuilder
Builder for additional arguments alongside the
Mqtt5Subscribe that are applied to a Mqtt5AsyncClient.subscribe(Mqtt5Subscribe, Consumer, boolean) or Mqtt5AsyncClient.subscribe(Mqtt5Subscribe, Consumer, Executor, boolean) call.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for additional arguments alongside theMqtt5Subscribethat are applied to aMqtt5AsyncClient.subscribe(Mqtt5Subscribe, Consumer, Executor, boolean)call. -
Method Summary
Modifier and TypeMethodDescriptioncallback(@NotNull Consumer<Mqtt5Publish> callback) Sets a callback for the matching Publish messages consumed via the subscriptions.send()Builds theMqtt5Subscribeand applies it and additional arguments to aMqtt5AsyncClient.subscribe(Mqtt5Subscribe),Mqtt5AsyncClient.subscribe(Mqtt5Subscribe, Consumer, boolean)orMqtt5AsyncClient.subscribe(Mqtt5Subscribe, Consumer, Executor, boolean)call which then sends the Subscribe message.
-
Method Details
-
callback
@CheckReturnValue @NotNull @NotNull Mqtt5AsyncClient.Mqtt5SubscribeAndCallbackBuilder.Call.Ex callback(@NotNull @NotNull Consumer<Mqtt5Publish> callback) Sets a callback for the matching Publish messages consumed via the subscriptions.- Parameters:
callback- the callback for the matching Publish messages.- Returns:
- the builder.
-
send
Builds theMqtt5Subscribeand applies it and additional arguments to aMqtt5AsyncClient.subscribe(Mqtt5Subscribe),Mqtt5AsyncClient.subscribe(Mqtt5Subscribe, Consumer, boolean)orMqtt5AsyncClient.subscribe(Mqtt5Subscribe, Consumer, Executor, boolean)call which then sends the Subscribe message.
-