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(ServerConsumer consumer)voidclosed()voiddisconnect(ServerConsumer consumer, SimpleString queueName)booleanhasCredits(ServerConsumer consumerID)booleanhasCredits(ServerConsumer consumerID, MessageReference ref)booleanisWritable(ReadyListener callback, Object protocolContext)intsendLargeMessage(MessageReference reference, Message message, ServerConsumer consumer, long bodySize, int deliveryCount)intsendLargeMessageContinuation(ServerConsumer consumerID, byte[] body, boolean continues, boolean requiresResponse)intsendMessage(MessageReference reference, Message message, ServerConsumer consumer, int deliveryCount)voidsendProducerCreditsFailMessage(int credits, SimpleString address)voidsendProducerCreditsMessage(int credits, SimpleString address)booleansupportsDirectDelivery()booleanupdateDeliveryCountAfterCancel(ServerConsumer consumer, 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(MessageReference reference, Message message, ServerConsumer consumer, int deliveryCount)
- Specified by:
sendMessagein interfaceSessionCallback
-
updateDeliveryCountAfterCancel
public boolean updateDeliveryCountAfterCancel(ServerConsumer consumer, MessageReference ref, boolean failed)
- Specified by:
updateDeliveryCountAfterCancelin interfaceSessionCallback
-
sendLargeMessageContinuation
public int sendLargeMessageContinuation(ServerConsumer consumerID, byte[] body, boolean continues, boolean requiresResponse)
- Specified by:
sendLargeMessageContinuationin interfaceSessionCallback
-
sendLargeMessage
public int sendLargeMessage(MessageReference reference, Message message, ServerConsumer consumer, long bodySize, int deliveryCount)
- Specified by:
sendLargeMessagein interfaceSessionCallback
-
disconnect
public void disconnect(ServerConsumer consumer, SimpleString queueName)
- Specified by:
disconnectin interfaceSessionCallback
-
afterDelivery
public void afterDelivery() throws Exception- Specified by:
afterDeliveryin interfaceSessionCallback- Throws:
Exception
-
browserFinished
public void browserFinished(ServerConsumer consumer)
- Specified by:
browserFinishedin interfaceSessionCallback
-
hasCredits
public boolean hasCredits(ServerConsumer consumerID)
- Specified by:
hasCreditsin interfaceSessionCallback
-
hasCredits
public boolean hasCredits(ServerConsumer consumerID, 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
-
-