Class Mqtt3ClientAdapter
java.lang.Object
io.micronaut.mqtt.hivemq.v3.client.Mqtt3ClientAdapter
- All Implemented Interfaces:
MqttClientAdapter
@Singleton
@Requires(property="mqtt.client.mqtt-version",
value="3")
public final class Mqtt3ClientAdapter
extends Object
implements MqttClientAdapter
Adapter class for MQTT 3 HiveMQ async client.
- Since:
- 3.0.0
- Author:
- Sven Kobow
- See Also:
-
MqttClientAdapter
Mqtt3AsyncClient
-
Constructor Summary
ConstructorDescriptionMqtt3ClientAdapter
(@NotNull com.hivemq.client.mqtt.mqtt3.Mqtt3AsyncClient client, @NotNull Mqtt3ClientConfiguration configurationProperties) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
subscribe
(String[] topics, int[] qos, Consumer<MqttBindingContext<MqttMessage>> callback) void
unsubscribe
(Set<String> topics) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.mqtt.hivemq.client.MqttClientAdapter
getTopicMap
-
Constructor Details
-
Mqtt3ClientAdapter
public Mqtt3ClientAdapter(@NotNull @NotNull com.hivemq.client.mqtt.mqtt3.Mqtt3AsyncClient client, @NotNull @NotNull Mqtt3ClientConfiguration configurationProperties)
-
-
Method Details
-
subscribe
public void subscribe(String[] topics, int[] qos, Consumer<MqttBindingContext<MqttMessage>> callback) - Specified by:
subscribe
in interfaceMqttClientAdapter
-
unsubscribe
- Specified by:
unsubscribe
in interfaceMqttClientAdapter
-
isConnected
public boolean isConnected()- Specified by:
isConnected
in interfaceMqttClientAdapter
-
getClientIdentifier
- Specified by:
getClientIdentifier
in interfaceMqttClientAdapter
-