co.cask.tigon.utils
Class Networks
java.lang.Object
co.cask.tigon.utils.Networks
public final class Networks
- extends Object
Utility class to provide methods for common network related operations.
|
Method Summary |
static int |
getRandomPort()
Find a random free port in localhost for binding. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Networks
public Networks()
getRandomPort
public static int getRandomPort()
- Find a random free port in localhost for binding.
- Returns:
- A port number or -1 for failure.
Copyright © 2014 Cask Data, Inc. Licensed under the Apache License, Version 2.0.