Class Cleanup

java.lang.Object
com.sun.ts.tests.jms.common.Cleanup

public final class Cleanup extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
    Cleanup(jakarta.jms.ConnectionFactory cf)
    Second constructor
    Cleanup(String user, String pass, jakarta.jms.ConnectionFactory cf)
    Third constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close any connections opened by the tests
    void
    Use this method at cleanup time to remove any connections and messages that have remained on the queue.
    void
    flushDestination(jakarta.jms.Destination destination)
    flushDestination(Destination) Use this method at cleanup time to remove any messages that have remained on the queue.
    void
    flushQueue(jakarta.jms.Queue queue, jakarta.jms.Session session)
    flushQueue(Queue, Session) Use this method at cleanup time to remove any messages that have remained on the queue.
    void
    flushQueue(ArrayList) Use this method at cleanup time to remove any messages that have remained on the queue.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Cleanup

      public Cleanup()
      Default constructor
    • Cleanup

      public Cleanup(jakarta.jms.ConnectionFactory cf)
      Second constructor
      Parameters:
      ConnectionFactory - connfactory the connection factory object
    • Cleanup

      public Cleanup(String user, String pass, jakarta.jms.ConnectionFactory cf)
      Third constructor
      Parameters:
      String - user the username credentials
      String - pass the password credentials
      ConnectionFactory - connfactory the connection factory object
  • Method Details

    • doClientQueueTestCleanup

      public void doClientQueueTestCleanup(ArrayList connections, ArrayList queues)
      Use this method at cleanup time to remove any connections and messages that have remained on the queue.
      Parameters:
      ArrayList - connections list of open connections
      ArrayList - queues list of queues to flush
    • closeAllConnections

      public void closeAllConnections(ArrayList connections)
      Close any connections opened by the tests
      Parameters:
      ArrayList - connections list of connections to close
    • flushDestination

      public void flushDestination(jakarta.jms.Destination destination) throws Exception
      flushDestination(Destination) Use this method at cleanup time to remove any messages that have remained on the queue.
      Throws:
      Exception
    • flushQueue

      public void flushQueue(ArrayList queues) throws Exception
      flushQueue(ArrayList) Use this method at cleanup time to remove any messages that have remained on the queue.
      Parameters:
      Queue - qToFlush[] QUEUES
      Throws:
      Exception
    • flushQueue

      public void flushQueue(jakarta.jms.Queue queue, jakarta.jms.Session session) throws Exception
      flushQueue(Queue, Session) Use this method at cleanup time to remove any messages that have remained on the queue.
      Parameters:
      Queue - queue the queue to flush
      Session - session the session
      Throws:
      Exception