Class PurgeJmsQueuesAction

  • All Implemented Interfaces:
    com.consol.citrus.common.Described, com.consol.citrus.common.Named, com.consol.citrus.TestAction, com.consol.citrus.TestActorAware

    public class PurgeJmsQueuesAction
    extends com.consol.citrus.actions.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

      • doExecute

        public void doExecute​(com.consol.citrus.context.TestContext context)
        Specified by:
        doExecute in class com.consol.citrus.actions.AbstractTestAction
      • 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.