Package com.hivemq.client.mqtt.mqtt3
Interface Mqtt3AsyncClient.Mqtt3SubscribeAndCallbackBuilder.Call
- All Known Subinterfaces:
Mqtt3AsyncClient.Mqtt3SubscribeAndCallbackBuilder.Call.Ex,Mqtt3AsyncClient.Mqtt3SubscribeAndCallbackBuilder.Complete,Mqtt3AsyncClient.Mqtt3SubscribeAndCallbackBuilder.Start.Complete
- Enclosing interface:
Mqtt3AsyncClient.Mqtt3SubscribeAndCallbackBuilder
Builder for additional arguments alongside the
Mqtt3Subscribe that are applied to a Mqtt3AsyncClient.subscribe(Mqtt3Subscribe, Consumer, boolean) or Mqtt3AsyncClient.subscribe(Mqtt3Subscribe, Consumer, Executor, boolean) call.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for additional arguments alongside theMqtt3Subscribethat are applied to aMqtt3AsyncClient.subscribe(Mqtt3Subscribe, Consumer, Executor, boolean)call. -
Method Summary
Modifier and TypeMethodDescriptioncallback(@NotNull Consumer<Mqtt3Publish> callback) Sets a callback for the matching Publish messages consumed via the subscriptions.send()Builds theMqtt3Subscribeand applies it and additional arguments to aMqtt3AsyncClient.subscribe(Mqtt3Subscribe),Mqtt3AsyncClient.subscribe(Mqtt3Subscribe, Consumer, boolean)orMqtt3AsyncClient.subscribe(Mqtt3Subscribe, Consumer, Executor, boolean)call which then sends the Subscribe message.
-
Method Details
-
callback
@CheckReturnValue @NotNull @NotNull Mqtt3AsyncClient.Mqtt3SubscribeAndCallbackBuilder.Call.Ex callback(@NotNull @NotNull Consumer<Mqtt3Publish> 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 theMqtt3Subscribeand applies it and additional arguments to aMqtt3AsyncClient.subscribe(Mqtt3Subscribe),Mqtt3AsyncClient.subscribe(Mqtt3Subscribe, Consumer, boolean)orMqtt3AsyncClient.subscribe(Mqtt3Subscribe, Consumer, Executor, boolean)call which then sends the Subscribe message.
-