Spring Integration

org.springframework.integration.ip.util
Class TestingUtilities

java.lang.Object
  extended by org.springframework.integration.ip.util.TestingUtilities

public class TestingUtilities
extends java.lang.Object

Convenience class providing methods for testing IP components. Provided in the main branch so that it is available for use in user test code, samples etc.

Since:
2.2
Author:
Gary Russell

Constructor Summary
TestingUtilities()
           
 
Method Summary
static void waitListening(AbstractServerConnectionFactory serverConnectionFactory, java.lang.Long delay)
          Wait for a server connection factory to actually start listening before starting a test.
static void waitStopListening(AbstractServerConnectionFactory serverConnectionFactory, java.lang.Long delay)
          Wait for a server connection factory to stop listening.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestingUtilities

public TestingUtilities()
Method Detail

waitListening

public static void waitListening(AbstractServerConnectionFactory serverConnectionFactory,
                                 java.lang.Long delay)
                          throws java.lang.IllegalStateException
Wait for a server connection factory to actually start listening before starting a test. Waits for up to 10 seconds by default.

Parameters:
serverConnectionFactory - The server connection factory.
delay - How long to wait in milliseconds; default 10000 (10 seconds) if null.
Throws:
java.lang.IllegalStateException

waitStopListening

public static void waitStopListening(AbstractServerConnectionFactory serverConnectionFactory,
                                     java.lang.Long delay)
                              throws java.lang.IllegalStateException
Wait for a server connection factory to stop listening. Waits for up to 10 seconds by default.

Parameters:
serverConnectionFactory - The server connection factory.
delay - How long to wait in milliseconds; default 10000 (10 seconds) if null.
Throws:
java.lang.IllegalStateException

Spring Integration