Class MQTTSessionCallback

  • All Implemented Interfaces:
    org.apache.activemq.artemis.spi.core.protocol.SessionCallback

    public class MQTTSessionCallback
    extends java.lang.Object
    implements org.apache.activemq.artemis.spi.core.protocol.SessionCallback
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterDelivery()  
      void browserFinished​(org.apache.activemq.artemis.core.server.ServerConsumer consumer)  
      void closed()  
      void disconnect​(org.apache.activemq.artemis.core.server.ServerConsumer consumer, org.apache.activemq.artemis.api.core.SimpleString queueName)  
      boolean hasCredits​(org.apache.activemq.artemis.core.server.ServerConsumer consumerID)  
      boolean isWritable​(org.apache.activemq.artemis.spi.core.remoting.ReadyListener callback, java.lang.Object protocolContext)  
      int sendLargeMessage​(org.apache.activemq.artemis.core.server.MessageReference reference, org.apache.activemq.artemis.api.core.Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumer, long bodySize, int deliveryCount)  
      int sendLargeMessageContinuation​(org.apache.activemq.artemis.core.server.ServerConsumer consumerID, byte[] body, boolean continues, boolean requiresResponse)  
      int sendMessage​(org.apache.activemq.artemis.core.server.MessageReference reference, org.apache.activemq.artemis.api.core.Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumer, int deliveryCount)  
      void sendProducerCreditsFailMessage​(int credits, org.apache.activemq.artemis.api.core.SimpleString address)  
      void sendProducerCreditsMessage​(int credits, org.apache.activemq.artemis.api.core.SimpleString address)  
      boolean supportsDirectDelivery()  
      boolean updateDeliveryCountAfterCancel​(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 java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • supportsDirectDelivery

        public boolean supportsDirectDelivery()
        Specified by:
        supportsDirectDelivery in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
      • isWritable

        public boolean isWritable​(org.apache.activemq.artemis.spi.core.remoting.ReadyListener callback,
                                  java.lang.Object protocolContext)
        Specified by:
        isWritable in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
      • sendMessage

        public int sendMessage​(org.apache.activemq.artemis.core.server.MessageReference reference,
                               org.apache.activemq.artemis.api.core.Message message,
                               org.apache.activemq.artemis.core.server.ServerConsumer consumer,
                               int deliveryCount)
        Specified by:
        sendMessage in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
      • updateDeliveryCountAfterCancel

        public boolean updateDeliveryCountAfterCancel​(org.apache.activemq.artemis.core.server.ServerConsumer consumer,
                                                      org.apache.activemq.artemis.core.server.MessageReference ref,
                                                      boolean failed)
        Specified by:
        updateDeliveryCountAfterCancel in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
      • sendLargeMessageContinuation

        public int sendLargeMessageContinuation​(org.apache.activemq.artemis.core.server.ServerConsumer consumerID,
                                                byte[] body,
                                                boolean continues,
                                                boolean requiresResponse)
        Specified by:
        sendLargeMessageContinuation in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
      • sendLargeMessage

        public int sendLargeMessage​(org.apache.activemq.artemis.core.server.MessageReference reference,
                                    org.apache.activemq.artemis.api.core.Message message,
                                    org.apache.activemq.artemis.core.server.ServerConsumer consumer,
                                    long bodySize,
                                    int deliveryCount)
        Specified by:
        sendLargeMessage in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
      • disconnect

        public void disconnect​(org.apache.activemq.artemis.core.server.ServerConsumer consumer,
                               org.apache.activemq.artemis.api.core.SimpleString queueName)
        Specified by:
        disconnect in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
      • afterDelivery

        public void afterDelivery()
                           throws java.lang.Exception
        Specified by:
        afterDelivery in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
        Throws:
        java.lang.Exception
      • browserFinished

        public void browserFinished​(org.apache.activemq.artemis.core.server.ServerConsumer consumer)
        Specified by:
        browserFinished in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
      • hasCredits

        public boolean hasCredits​(org.apache.activemq.artemis.core.server.ServerConsumer consumerID)
        Specified by:
        hasCredits in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
      • sendProducerCreditsMessage

        public void sendProducerCreditsMessage​(int credits,
                                               org.apache.activemq.artemis.api.core.SimpleString address)
        Specified by:
        sendProducerCreditsMessage in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
      • sendProducerCreditsFailMessage

        public void sendProducerCreditsFailMessage​(int credits,
                                                   org.apache.activemq.artemis.api.core.SimpleString address)
        Specified by:
        sendProducerCreditsFailMessage in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback
      • closed

        public void closed()
        Specified by:
        closed in interface org.apache.activemq.artemis.spi.core.protocol.SessionCallback