public class DefaultHostInfoDiscovery extends java.lang.Object implements HostInfoDiscovery
HostInfoDiscovery.
Discovery logic for finding ip address is:
HostInfoDiscovery.HostInfo| Constructor and Description |
|---|
DefaultHostInfoDiscovery() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<java.net.NetworkInterface> |
getAllAvailableInterfaces() |
HostInfoDiscovery.HostInfo |
getHostInfo()
Gets the host info.
|
void |
setLoopback(boolean loopback)
Sets if loopback should be discovered.
|
void |
setMatchInterface(java.lang.String matchInterface)
Use interface as a candidate if its name is matching with a
given pattern.
|
void |
setMatchIpv4(java.lang.String matchIpv4)
Sets the match ipv4.
|
void |
setPointToPoint(boolean pointToPoint)
Sets if interfaces marked as point to point should be handled.
|
void |
setPreferInterface(java.util.List<java.lang.String> preferInterface)
Sets the preferred interfaces.
|
java.lang.String |
toString() |
public HostInfoDiscovery.HostInfo getHostInfo()
HostInfoDiscoverygetHostInfo in interface HostInfoDiscoverypublic void setMatchIpv4(java.lang.String matchIpv4)
matchIpv4 - the new match ipv4public void setMatchInterface(java.lang.String matchInterface)
matchInterface - the new match interface regex patterNetworkInterface.getName()public void setPreferInterface(java.util.List<java.lang.String> preferInterface)
preferInterface - the new preferred interface listpublic void setPointToPoint(boolean pointToPoint)
FALSE.pointToPoint - the new point to point flagNetworkInterface.isPointToPoint()public void setLoopback(boolean loopback)
FALSE.loopback - the new loopback flagprotected java.util.List<java.net.NetworkInterface> getAllAvailableInterfaces()
throws java.net.SocketException
java.net.SocketExceptionpublic java.lang.String toString()
toString in class java.lang.Object