Class SubscriptionEventImpl
- java.lang.Object
-
- io.smallrye.reactive.messaging.mqtt.session.impl.SubscriptionEventImpl
-
- All Implemented Interfaces:
SubscriptionEvent
public class SubscriptionEventImpl extends Object implements SubscriptionEvent
An event of a subscription state change.
-
-
Constructor Summary
Constructors Constructor Description SubscriptionEventImpl(String topic, SubscriptionState subscriptionState, Integer qos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)IntegergetQos()The granted QoS level from the server.SubscriptionStategetSubscriptionState()The new subscription state.StringgetTopic()The name of the topic this change refers to.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
SubscriptionEventImpl
public SubscriptionEventImpl(String topic, SubscriptionState subscriptionState, Integer qos)
-
-
Method Detail
-
getQos
public Integer getQos()
The granted QoS level from the server.- Specified by:
getQosin interfaceSubscriptionEvent- Returns:
- When the state changed to
SubscriptionState.SUBSCRIBED, it contains the QoS level granted by the server. Otherwise it will benull.
-
getSubscriptionState
public SubscriptionState getSubscriptionState()
The new subscription state.- Specified by:
getSubscriptionStatein interfaceSubscriptionEvent- Returns:
- The state.
-
getTopic
public String getTopic()
The name of the topic this change refers to.- Specified by:
getTopicin interfaceSubscriptionEvent- Returns:
- The topic name.
-
-