Package com.swiftmq.impl.mqtt.session
Class MQTTSession
java.lang.Object
com.swiftmq.impl.mqtt.po.MQTTVisitorAdapter
com.swiftmq.impl.mqtt.session.MQTTSession
- All Implemented Interfaces:
MQTTVisitor
-
Constructor Summary
ConstructorDescriptionMQTTSession
(SwiftletContext ctx, String clientId, boolean persistent) MQTTSession
(SwiftletContext ctx, String clientId, SessionStoreEntry sessionStoreEntry) -
Method Summary
Modifier and TypeMethodDescriptionvoid
associate
(MQTTConnection mqttConnection) void
destroy()
void
destroy
(boolean removeUsage) void
destroy
(ActiveLogin activeLogin, boolean removeUsage) void
fillConnectionUsage
(Entity connectionUsage) void
fillRegistryUsage
(Entity registryUsage) long
int
int
int
int
boolean
boolean
boolean
int
void
setWasPresent
(boolean wasPresent) void
start()
void
stop()
topicNameTranslate
(String mqttTopicName) toString()
void
unsubscribe
(String topicFilter, ActiveLogin activeLogin) void
void
void
void
void
void
void
visit
(POSendMessage po) void
visit
(POSubscribe po) void
visit
(POUnsubscribe po)
-
Constructor Details
-
MQTTSession
-
MQTTSession
public MQTTSession(SwiftletContext ctx, String clientId, SessionStoreEntry sessionStoreEntry) throws Exception - Throws:
Exception
-
-
Method Details
-
isPersistent
public boolean isPersistent() -
getClientId
-
getLastUse
public long getLastUse() -
isWasPresent
public boolean isWasPresent() -
setWasPresent
public void setWasPresent(boolean wasPresent) -
associate
-
isAssociated
public boolean isAssociated() -
getMqttConnection
-
getMsgsReceived
public int getMsgsReceived() -
getMsgsSent
public int getMsgsSent() -
getTotalMsgsReceived
public int getTotalMsgsReceived() -
getTotalMsgsSent
public int getTotalMsgsSent() -
fillRegistryUsage
public void fillRegistryUsage(Entity registryUsage) -
fillConnectionUsage
public void fillConnectionUsage(Entity connectionUsage) -
getSessionStoreEntry
-
nextDurableId
public int nextDurableId() -
topicNameTranslate
- Throws:
Exception
-
unsubscribe
- Throws:
Exception
-
start
public void start() -
stop
public void stop() -
destroy
public void destroy() -
destroy
public void destroy(ActiveLogin activeLogin, boolean removeUsage) -
destroy
public void destroy(boolean removeUsage) -
visit
- Specified by:
visit
in interfaceMQTTVisitor
- Overrides:
visit
in classMQTTVisitorAdapter
-
visit
- Specified by:
visit
in interfaceMQTTVisitor
- Overrides:
visit
in classMQTTVisitorAdapter
-
visit
- Specified by:
visit
in interfaceMQTTVisitor
- Overrides:
visit
in classMQTTVisitorAdapter
-
visit
- Specified by:
visit
in interfaceMQTTVisitor
- Overrides:
visit
in classMQTTVisitorAdapter
-
visit
- Specified by:
visit
in interfaceMQTTVisitor
- Overrides:
visit
in classMQTTVisitorAdapter
-
visit
- Specified by:
visit
in interfaceMQTTVisitor
- Overrides:
visit
in classMQTTVisitorAdapter
-
visit
- Specified by:
visit
in interfaceMQTTVisitor
- Overrides:
visit
in classMQTTVisitorAdapter
-
visit
- Specified by:
visit
in interfaceMQTTVisitor
- Overrides:
visit
in classMQTTVisitorAdapter
-
visit
- Specified by:
visit
in interfaceMQTTVisitor
- Overrides:
visit
in classMQTTVisitorAdapter
-
toString
-