|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectpatterntesting.runtime.net.Localhost
public final class Localhost
This (static) class represents your local host. You can ask it for the local address and other things.
| Method Summary | |
|---|---|
static Collection<InetAddress> |
getInetAddresses()
Returns all local IP addresses. |
static boolean |
matches(String host)
Here we try to get all network addresses to compare it against the given hosts. |
static boolean |
matches(String[] hosts)
Here we try to get all network addresses to compare it against the given hosts. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Collection<InetAddress> getInetAddresses()
InetAddress.getLocalHost().
public static boolean matches(String[] hosts)
hosts - an array of hosts
public static boolean matches(String host)
host - either IP address (e.g. "127.0.0.1") or hostname (e.g.
"localhost")
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||