Class Mqtt5ClientAdapter
java.lang.Object
io.micronaut.mqtt.hivemq.v5.client.Mqtt5ClientAdapter
- All Implemented Interfaces:
MqttClientAdapter
@Singleton
@Requires(property="mqtt.client.mqtt-version",
value="5",
defaultValue="5")
public class Mqtt5ClientAdapter
extends Object
implements MqttClientAdapter
Adapter class for MQTT 3 HiveMQ async client.
- Since:
- 3.0.0
- Author:
- Sven Kobow
- See Also:
-
MqttClientAdapter
Mqtt5AsyncClient
-
Constructor Summary
ConstructorDescriptionMqtt5ClientAdapter
(@NotNull com.hivemq.client.mqtt.mqtt5.Mqtt5AsyncClient client, @NotNull Mqtt5ClientConfiguration 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
-
Mqtt5ClientAdapter
public Mqtt5ClientAdapter(@NotNull @NotNull com.hivemq.client.mqtt.mqtt5.Mqtt5AsyncClient client, @NotNull @NotNull Mqtt5ClientConfiguration 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
-