Example usage for org.springframework.util SocketUtils findAvailableUdpPort

List of usage examples for org.springframework.util SocketUtils findAvailableUdpPort

Introduction

In this page you can find the example usage for org.springframework.util SocketUtils findAvailableUdpPort.

Prototype

public static int findAvailableUdpPort(int minPort) 

Source Link

Document

Find an available UDP port randomly selected from the range [ minPort , #PORT_RANGE_MAX ].

Usage

From source file:com.navercorp.pinpoint.profiler.sender.NioUdpDataSenderTest.java

@After
public void setDown() {
    IOUtils.closeQuietly(receiver);/*from   w  ww  . j av a  2 s .  c o m*/
    // port conflict happens when testcases run continuously so port number is increased.
    PORT = SocketUtils.findAvailableUdpPort(61112);
}