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 boolean
equals(Object o)
Integer
getQos()
The granted QoS level from the server.SubscriptionState
getSubscriptionState()
The new subscription state.String
getTopic()
The name of the topic this change refers to.int
hashCode()
String
toString()
-
-
-
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:
getQos
in 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:
getSubscriptionState
in interfaceSubscriptionEvent
- Returns:
- The state.
-
getTopic
public String getTopic()
The name of the topic this change refers to.- Specified by:
getTopic
in interfaceSubscriptionEvent
- Returns:
- The topic name.
-
-