List of usage examples for org.springframework.integration.ip AbstractInternetProtocolReceivingChannelAdapter isListening
public boolean isListening()
From source file:org.springframework.integration.ip.util.SocketTestUtils.java
public static void waitListening(AbstractInternetProtocolReceivingChannelAdapter adapter) throws Exception { int n = 0;/*from w w w. j a v a2 s .c o m*/ while (!adapter.isListening()) { Thread.sleep(100); if (n++ > 100) { throw new Exception("Gateway failed to listen"); } } }