Class MQTTSessionCallback
- java.lang.Object
-
- org.apache.activemq.artemis.core.protocol.mqtt.MQTTSessionCallback
-
- All Implemented Interfaces:
SessionCallback
public class MQTTSessionCallback extends Object implements SessionCallback
-
-
Constructor Summary
Constructors Constructor Description MQTTSessionCallback(MQTTSession session, MQTTConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterDelivery()voidbrowserFinished(org.apache.activemq.artemis.core.server.ServerConsumer consumer)voidclosed()voiddisconnect(org.apache.activemq.artemis.core.server.ServerConsumer consumer, String errorMessage)booleanhasCredits(org.apache.activemq.artemis.core.server.ServerConsumer consumerID)booleanhasCredits(org.apache.activemq.artemis.core.server.ServerConsumer consumerID, org.apache.activemq.artemis.core.server.MessageReference ref)booleanisWritable(ReadyListener callback, Object protocolContext)intsendLargeMessage(org.apache.activemq.artemis.core.server.MessageReference reference, Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumer, long bodySize, int deliveryCount)intsendLargeMessageContinuation(org.apache.activemq.artemis.core.server.ServerConsumer consumerID, byte[] body, boolean continues, boolean requiresResponse)intsendMessage(org.apache.activemq.artemis.core.server.MessageReference reference, Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumer, int deliveryCount)voidsendProducerCreditsFailMessage(int credits, SimpleString address)voidsendProducerCreditsMessage(int credits, SimpleString address)booleansupportsDirectDelivery()booleanupdateDeliveryCountAfterCancel(org.apache.activemq.artemis.core.server.ServerConsumer consumer, org.apache.activemq.artemis.core.server.MessageReference ref, boolean failed)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
close, getCurrentTransaction
-
-
-
-
Constructor Detail
-
MQTTSessionCallback
public MQTTSessionCallback(MQTTSession session, MQTTConnection connection) throws Exception
- Throws:
Exception
-
-
Method Detail
-
supportsDirectDelivery
public boolean supportsDirectDelivery()
- Specified by:
supportsDirectDeliveryin interfaceSessionCallback
-
isWritable
public boolean isWritable(ReadyListener callback, Object protocolContext)
- Specified by:
isWritablein interfaceSessionCallback
-
sendMessage
public int sendMessage(org.apache.activemq.artemis.core.server.MessageReference reference, Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumer, int deliveryCount)- Specified by:
sendMessagein interfaceSessionCallback
-
updateDeliveryCountAfterCancel
public boolean updateDeliveryCountAfterCancel(org.apache.activemq.artemis.core.server.ServerConsumer consumer, org.apache.activemq.artemis.core.server.MessageReference ref, boolean failed)- Specified by:
updateDeliveryCountAfterCancelin interfaceSessionCallback
-
sendLargeMessageContinuation
public int sendLargeMessageContinuation(org.apache.activemq.artemis.core.server.ServerConsumer consumerID, byte[] body, boolean continues, boolean requiresResponse)- Specified by:
sendLargeMessageContinuationin interfaceSessionCallback
-
sendLargeMessage
public int sendLargeMessage(org.apache.activemq.artemis.core.server.MessageReference reference, Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumer, long bodySize, int deliveryCount)- Specified by:
sendLargeMessagein interfaceSessionCallback
-
disconnect
public void disconnect(org.apache.activemq.artemis.core.server.ServerConsumer consumer, String errorMessage)- Specified by:
disconnectin interfaceSessionCallback
-
afterDelivery
public void afterDelivery() throws Exception- Specified by:
afterDeliveryin interfaceSessionCallback- Throws:
Exception
-
browserFinished
public void browserFinished(org.apache.activemq.artemis.core.server.ServerConsumer consumer)
- Specified by:
browserFinishedin interfaceSessionCallback
-
hasCredits
public boolean hasCredits(org.apache.activemq.artemis.core.server.ServerConsumer consumerID)
- Specified by:
hasCreditsin interfaceSessionCallback
-
hasCredits
public boolean hasCredits(org.apache.activemq.artemis.core.server.ServerConsumer consumerID, org.apache.activemq.artemis.core.server.MessageReference ref)- Specified by:
hasCreditsin interfaceSessionCallback
-
sendProducerCreditsMessage
public void sendProducerCreditsMessage(int credits, SimpleString address)- Specified by:
sendProducerCreditsMessagein interfaceSessionCallback
-
sendProducerCreditsFailMessage
public void sendProducerCreditsFailMessage(int credits, SimpleString address)- Specified by:
sendProducerCreditsFailMessagein interfaceSessionCallback
-
closed
public void closed()
- Specified by:
closedin interfaceSessionCallback
-
-