Class ActiveMQActivation


  • public class ActiveMQActivation
    extends java.lang.Object
    The activation.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.reflect.Method ONMESSAGE
      The onMessage method
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ActiveMQActivationSpec getActivationSpec()
      Get the activation spec
      org.apache.activemq.artemis.api.core.SimpleString getAddress()  
      org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory getConnectionFactory()  
      javax.resource.spi.endpoint.MessageEndpointFactory getMessageEndpointFactory()
      Get the message endpoint factory
      org.apache.activemq.artemis.api.core.SimpleString getTopicTemporaryQueue()  
      javax.resource.spi.work.WorkManager getWorkManager()
      Get the work manager
      java.util.List<javax.transaction.xa.XAResource> getXAResources()  
      boolean isDeliveryTransacted()
      Get whether delivery is transacted
      boolean isTopic()
      Is the destination a topic
      void reconnect​(java.lang.Throwable failure, boolean useInterrupt)
      Drops all existing connection-related resources and reconnects
      void setTopicTemporaryQueue​(org.apache.activemq.artemis.api.core.SimpleString topicTemporaryQueue)  
      protected void setup()
      Setup the activation
      protected void setupCF()  
      protected void setupDestination()  
      protected org.apache.activemq.artemis.api.core.client.ClientSession setupSession​(org.apache.activemq.artemis.api.core.client.ClientSessionFactory cf)
      Setup a session
      void start()
      Start the activation
      void startReconnectThread​(java.lang.String cause)  
      void stop()
      Stop the activation
      protected void teardown​(boolean useInterrupt)
      Teardown the activation
      java.lang.String toString()
      Get a string representation
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ONMESSAGE

        public static final java.lang.reflect.Method ONMESSAGE
        The onMessage method
    • Constructor Detail

      • ActiveMQActivation

        public ActiveMQActivation​(ActiveMQResourceAdapter ra,
                                  javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                                  ActiveMQActivationSpec spec)
                           throws javax.resource.ResourceException
        Constructor
        Parameters:
        ra - The resource adapter
        endpointFactory - The endpoint factory
        spec - The activation spec
        Throws:
        javax.resource.ResourceException - Thrown if an error occurs
    • Method Detail

      • getActivationSpec

        public ActiveMQActivationSpec getActivationSpec()
        Get the activation spec
        Returns:
        The value
      • getMessageEndpointFactory

        public javax.resource.spi.endpoint.MessageEndpointFactory getMessageEndpointFactory()
        Get the message endpoint factory
        Returns:
        The value
      • isDeliveryTransacted

        public boolean isDeliveryTransacted()
        Get whether delivery is transacted
        Returns:
        The value
      • getWorkManager

        public javax.resource.spi.work.WorkManager getWorkManager()
        Get the work manager
        Returns:
        The value
      • isTopic

        public boolean isTopic()
        Is the destination a topic
        Returns:
        The value
      • start

        public void start()
                   throws javax.resource.ResourceException
        Start the activation
        Throws:
        javax.resource.ResourceException - Thrown if an error occurs
      • getTopicTemporaryQueue

        public org.apache.activemq.artemis.api.core.SimpleString getTopicTemporaryQueue()
        Returns:
        the topicTemporaryQueue
      • setTopicTemporaryQueue

        public void setTopicTemporaryQueue​(org.apache.activemq.artemis.api.core.SimpleString topicTemporaryQueue)
        Parameters:
        topicTemporaryQueue - the topicTemporaryQueue to set
      • getXAResources

        public java.util.List<javax.transaction.xa.XAResource> getXAResources()
        Returns:
        the list of XAResources for this activation endpoint
      • stop

        public void stop()
        Stop the activation
      • setup

        protected void setup()
                      throws java.lang.Exception
        Setup the activation
        Throws:
        java.lang.Exception - Thrown if an error occurs
      • teardown

        protected void teardown​(boolean useInterrupt)
        Teardown the activation
      • setupCF

        protected void setupCF()
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setupSession

        protected org.apache.activemq.artemis.api.core.client.ClientSession setupSession​(org.apache.activemq.artemis.api.core.client.ClientSessionFactory cf)
                                                                                  throws java.lang.Exception
        Setup a session
        Parameters:
        cf -
        Returns:
        The connection
        Throws:
        java.lang.Exception - Thrown if an error occurs
      • getAddress

        public org.apache.activemq.artemis.api.core.SimpleString getAddress()
      • setupDestination

        protected void setupDestination()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString()
        Get a string representation
        Overrides:
        toString in class java.lang.Object
        Returns:
        The value
      • startReconnectThread

        public void startReconnectThread​(java.lang.String cause)
      • reconnect

        public void reconnect​(java.lang.Throwable failure,
                              boolean useInterrupt)
        Drops all existing connection-related resources and reconnects
        Parameters:
        failure - if reconnecting in the event of a failure
      • getConnectionFactory

        public org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory getConnectionFactory()