Class PurgeJmsQueuesAction

  • All Implemented Interfaces:
    Described, Named, TestAction, TestActorAware

    public class PurgeJmsQueuesAction
    extends AbstractTestAction
    Action to purge JMS queue destinations by simply consuming all available messages. As queue purging is a broker implementation specific feature in many cases this action clears all messages from a destination regardless of JMS broker vendor implementations. Consumer will continue to receive messages until message receive timeout is reached, so no messages are left.
    Since:
    2007
    Author:
    Christoph Deppisch
    • Method Detail

      • createConnection

        protected javax.jms.Connection createConnection()
                                                 throws javax.jms.JMSException
        Create queue connection.
        Returns:
        Throws:
        javax.jms.JMSException
      • createSession

        protected javax.jms.Session createSession​(javax.jms.Connection connection)
                                           throws javax.jms.JMSException
        Create queue session.
        Parameters:
        connection -
        Returns:
        Throws:
        javax.jms.JMSException
      • getQueueNames

        public List<String> getQueueNames()
        Returns:
        the queueNames
      • getQueues

        public List<javax.jms.Queue> getQueues()
        Gets the queues.
        Returns:
        the queues
      • getConnectionFactory

        public javax.jms.ConnectionFactory getConnectionFactory()
        Gets the connectionFactory.
        Returns:
        the connectionFactory
      • getReceiveTimeout

        public long getReceiveTimeout()
        Gets the receiveTimeout.
        Returns:
        the receiveTimeout
      • getSleepTime

        public long getSleepTime()
        Gets the sleepTime.
        Returns:
        the sleepTime the sleepTime to get.