Package com.sun.ts.tests.jms.common
Class Cleanup
java.lang.Object
com.sun.ts.tests.jms.common.Cleanup
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
closeAllConnections
(ArrayList connections) Close any connections opened by the testsvoid
doClientQueueTestCleanup
(ArrayList connections, ArrayList queues) 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 queues) flushQueue(ArrayList) Use this method at cleanup time to remove any messages that have remained on the queue.
-
Field Details
-
JMSDEFAULT
- See Also:
-
-
Constructor Details
-
Cleanup
public Cleanup()Default constructor -
Cleanup
public Cleanup(jakarta.jms.ConnectionFactory cf) Second constructor- Parameters:
ConnectionFactory
- connfactory the connection factory object
-
Cleanup
Third constructor- Parameters:
String
- user the username credentialsString
- pass the password credentialsConnectionFactory
- connfactory the connection factory object
-
-
Method Details
-
doClientQueueTestCleanup
Use this method at cleanup time to remove any connections and messages that have remained on the queue.- Parameters:
ArrayList
- connections list of open connectionsArrayList
- queues list of queues to flush
-
closeAllConnections
Close any connections opened by the tests- Parameters:
ArrayList
- connections list of connections to close
-
flushDestination
flushDestination(Destination) Use this method at cleanup time to remove any messages that have remained on the queue.- Throws:
Exception
-
flushQueue
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
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 flushSession
- session the session- Throws:
Exception
-