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