List of usage examples for org.springframework.util SocketUtils findAvailableTcpPort
public static int findAvailableTcpPort(int minPort)
From source file:org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandlerIntegrationTests.java
@Before public void setUp() throws Exception { logger.debug("Setting up before '" + this.testName.getMethodName() + "'"); this.port = SocketUtils.findAvailableTcpPort(61613); this.responseChannel = new ExecutorSubscribableChannel(); this.responseHandler = new TestMessageHandler(); this.responseChannel.subscribe(this.responseHandler); this.eventPublisher = new TestEventPublisher(); startActiveMqBroker();/*from w w w.j a v a 2 s.c o m*/ createAndStartRelay(); }