Class ActiveMQMessageHandler

  • All Implemented Interfaces:
    org.apache.activemq.artemis.api.core.client.FailoverEventListener, org.apache.activemq.artemis.api.core.client.MessageHandler

    public class ActiveMQMessageHandler
    extends java.lang.Object
    implements org.apache.activemq.artemis.api.core.client.MessageHandler, org.apache.activemq.artemis.api.core.client.FailoverEventListener
    The message handler
    • Constructor Summary

      Constructors 
      Constructor Description
      ActiveMQMessageHandler​(org.apache.activemq.artemis.jms.client.ConnectionFactoryOptions options, ActiveMQActivation activation, javax.transaction.TransactionManager tm, org.apache.activemq.artemis.core.client.impl.ClientSessionInternal session, org.apache.activemq.artemis.api.core.client.ClientSessionFactory cf, int sessionNr)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void failoverEvent​(org.apache.activemq.artemis.api.core.client.FailoverEventType eventType)  
      java.lang.Thread getCurrentThread()  
      java.lang.Thread interruptConsumer​(org.apache.activemq.artemis.utils.FutureLatch future)  
      void onMessage​(org.apache.activemq.artemis.api.core.client.ClientMessage message)  
      void setup()  
      void start()  
      void teardown()
      Stop the handler
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActiveMQMessageHandler

        public ActiveMQMessageHandler​(org.apache.activemq.artemis.jms.client.ConnectionFactoryOptions options,
                                      ActiveMQActivation activation,
                                      javax.transaction.TransactionManager tm,
                                      org.apache.activemq.artemis.core.client.impl.ClientSessionInternal session,
                                      org.apache.activemq.artemis.api.core.client.ClientSessionFactory cf,
                                      int sessionNr)
    • Method Detail

      • setup

        public void setup()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getCurrentThread

        public java.lang.Thread getCurrentThread()
      • interruptConsumer

        public java.lang.Thread interruptConsumer​(org.apache.activemq.artemis.utils.FutureLatch future)
      • teardown

        public void teardown()
        Stop the handler
      • onMessage

        public void onMessage​(org.apache.activemq.artemis.api.core.client.ClientMessage message)
        Specified by:
        onMessage in interface org.apache.activemq.artemis.api.core.client.MessageHandler
      • start

        public void start()
                   throws org.apache.activemq.artemis.api.core.ActiveMQException
        Throws:
        org.apache.activemq.artemis.api.core.ActiveMQException
      • failoverEvent

        public void failoverEvent​(org.apache.activemq.artemis.api.core.client.FailoverEventType eventType)
        Specified by:
        failoverEvent in interface org.apache.activemq.artemis.api.core.client.FailoverEventListener