|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gridsystems.utils.NetUtils
public final class NetUtils
Network utilities.
Method Summary | |
---|---|
static boolean |
areFreePorts(int[] ports)
Check if a list of ports are free. |
static boolean |
checkPort(int portNumber)
Checks whether a port is available for opening. |
static java.lang.String[] |
getAllIPs()
|
static java.lang.String |
getMachineIP()
|
static void |
main(java.lang.String[] args)
Utility application. |
static boolean |
serverIsLocal(java.lang.String host)
Helper method to know if certain server ip or server name is our machine or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean checkPort(int portNumber)
portNumber
- the port number
public static java.lang.String[] getAllIPs()
public static java.lang.String getMachineIP()
public static boolean serverIsLocal(java.lang.String host)
host
- The host name to test
public static boolean areFreePorts(int[] ports)
ports
- The port numbers to test
public static void main(java.lang.String[] args)
args
- Arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |