Package com.swiftmq.impl.mqtt.pubsub
Class Subscription
java.lang.Object
MessageProcessor
com.swiftmq.impl.mqtt.pubsub.Subscription
public class Subscription
extends MessageProcessor
-
Constructor Summary
ConstructorDescriptionSubscription
(SwiftletContext ctx, MQTTSession session, SubscriptionStoreEntry subscriptionStoreEntry) Subscription
(SwiftletContext ctx, MQTTSession session, String topicName, String topicNameTranslated, MqttQoS qos) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
close
(ActiveLogin activeLogin) void
fillConnectionUsage
(Entity usageConnection) void
fillRegistryUsage
(Entity usageRegistry) int
int
boolean
isValid()
void
void
processMessage
(MessageEntry messageEntry) void
restart()
void
start()
void
stop()
-
Constructor Details
-
Subscription
public Subscription(SwiftletContext ctx, MQTTSession session, String topicName, String topicNameTranslated, MqttQoS qos) -
Subscription
public Subscription(SwiftletContext ctx, MQTTSession session, SubscriptionStoreEntry subscriptionStoreEntry)
-
-
Method Details
-
getTopicName
-
getStoreEntry
-
fillRegistryUsage
public void fillRegistryUsage(Entity usageRegistry) -
fillConnectionUsage
public void fillConnectionUsage(Entity usageConnection) -
getMsgsReceived
public int getMsgsReceived() -
getTotalMsgsReceived
public int getTotalMsgsReceived() -
start
- Throws:
Exception
-
restart
- Throws:
Exception
-
stop
public void stop() -
processMessage
public void processMessage(MessageEntry messageEntry) -
processException
-
isValid
public boolean isValid() -
close
public void close() -
close
public void close(ActiveLogin activeLogin)
-