Tabnine Logo
SocketUtils.findAvailableUdpPorts
Code IndexAdd Tabnine to your IDE (free)

How to use
findAvailableUdpPorts
method
in
org.springframework.util.SocketUtils

Best Java code snippets using org.springframework.util.SocketUtils.findAvailableUdpPorts (Showing top 6 results out of 315)

origin: spring-projects/spring-framework

/**
 * Find the requested number of available UDP ports, each randomly selected
 * from the range [{@value #PORT_RANGE_MIN}, {@value #PORT_RANGE_MAX}].
 * @param numRequested the number of available ports to find
 * @return a sorted set of available UDP port numbers
 * @throws IllegalStateException if the requested number of available ports could not be found
 */
public static SortedSet<Integer> findAvailableUdpPorts(int numRequested) {
  return findAvailableUdpPorts(numRequested, PORT_RANGE_MIN, PORT_RANGE_MAX);
}
origin: org.springframework/spring-core

/**
 * Find the requested number of available UDP ports, each randomly selected
 * from the range [{@value #PORT_RANGE_MIN}, {@value #PORT_RANGE_MAX}].
 * @param numRequested the number of available ports to find
 * @return a sorted set of available UDP port numbers
 * @throws IllegalStateException if the requested number of available ports could not be found
 */
public static SortedSet<Integer> findAvailableUdpPorts(int numRequested) {
  return findAvailableUdpPorts(numRequested, PORT_RANGE_MIN, PORT_RANGE_MAX);
}
origin: spring-projects/spring-framework

private void findAvailableUdpPorts(int numRequested, int minPort, int maxPort) {
  SortedSet<Integer> ports = SocketUtils.findAvailableUdpPorts(numRequested, minPort, maxPort);
  assertAvailablePorts(ports, numRequested, minPort, maxPort);
}
private void assertPortInRange(int port, int minPort, int maxPort) {
origin: spring-projects/spring-framework

private void findAvailableUdpPorts(int numRequested) {
  SortedSet<Integer> ports = SocketUtils.findAvailableUdpPorts(numRequested);
  assertAvailablePorts(ports, numRequested, PORT_RANGE_MIN, PORT_RANGE_MAX);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core

/**
 * Find the requested number of available UDP ports, each randomly selected
 * from the range [{@value #PORT_RANGE_MIN}, {@value #PORT_RANGE_MAX}].
 * @param numRequested the number of available ports to find
 * @return a sorted set of available UDP port numbers
 * @throws IllegalStateException if the requested number of available ports could not be found
 */
public static SortedSet<Integer> findAvailableUdpPorts(int numRequested) {
  return findAvailableUdpPorts(numRequested, PORT_RANGE_MIN, PORT_RANGE_MAX);
}
origin: apache/servicemix-bundles

/**
 * Find the requested number of available UDP ports, each randomly selected
 * from the range [{@value #PORT_RANGE_MIN}, {@value #PORT_RANGE_MAX}].
 * @param numRequested the number of available ports to find
 * @return a sorted set of available UDP port numbers
 * @throws IllegalStateException if the requested number of available ports could not be found
 */
public static SortedSet<Integer> findAvailableUdpPorts(int numRequested) {
  return findAvailableUdpPorts(numRequested, PORT_RANGE_MIN, PORT_RANGE_MAX);
}
org.springframework.utilSocketUtilsfindAvailableUdpPorts

Javadoc

Find the requested number of available UDP ports, each randomly selected from the range [ #PORT_RANGE_MIN, #PORT_RANGE_MAX].

Popular methods of SocketUtils

  • findAvailableTcpPort
    Find an available TCP port randomly selected from the range [ minPort, maxPort].
  • findAvailableUdpPort
    Find an available UDP port randomly selected from the range [ minPort, maxPort].
  • findAvailableTcpPorts
    Find the requested number of available TCP ports, each randomly selected from the range [ minPort, m
  • <init>
    Although SocketUtils consists solely of static utility methods, this constructor is intentionally pu

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Collectors (java.util.stream)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now