Package oshi.software.os.windows
Class WindowsNetworkParams
- java.lang.Object
-
- oshi.software.common.AbstractNetworkParams
-
- oshi.software.os.windows.WindowsNetworkParams
-
- All Implemented Interfaces:
NetworkParams
@ThreadSafe final class WindowsNetworkParams extends AbstractNetworkParams
WindowsNetworkParams class.
-
-
Field Summary
Fields Modifier and Type Field Description private static intCOMPUTER_NAME_DNS_DOMAIN_FULLY_QUALIFIEDprivate static org.slf4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description WindowsNetworkParams()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getDnsServers()Gets the DNS Servers configured for this machine.java.lang.StringgetDomainName()Gets the Domain Name of the machine executing OSHI.java.lang.StringgetHostName()Gets the HostName of the machine executing OSHI.java.lang.StringgetIpv4DefaultGateway()Gets the default gateway(routing destination for 0.0.0.0/0) for IPv4 connections.java.lang.StringgetIpv6DefaultGateway()Gets default gateway(routing destination for ::/0) for IPv6 connections.private static java.lang.StringparseIpv4Route()private static java.lang.StringparseIpv6Route()-
Methods inherited from class oshi.software.common.AbstractNetworkParams
searchGateway, toString
-
-
-
-
Field Detail
-
LOG
private static final org.slf4j.Logger LOG
-
COMPUTER_NAME_DNS_DOMAIN_FULLY_QUALIFIED
private static final int COMPUTER_NAME_DNS_DOMAIN_FULLY_QUALIFIED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDomainName
public java.lang.String getDomainName()
Description copied from interface:NetworkParamsGets the Domain Name of the machine executing OSHI.- Specified by:
getDomainNamein interfaceNetworkParams- Overrides:
getDomainNamein classAbstractNetworkParams- Returns:
- the domain name
-
getDnsServers
public java.lang.String[] getDnsServers()
Description copied from interface:NetworkParamsGets the DNS Servers configured for this machine.- Specified by:
getDnsServersin interfaceNetworkParams- Overrides:
getDnsServersin classAbstractNetworkParams- Returns:
- the DNS servers
-
getHostName
public java.lang.String getHostName()
Description copied from interface:NetworkParamsGets the HostName of the machine executing OSHI.- Specified by:
getHostNamein interfaceNetworkParams- Overrides:
getHostNamein classAbstractNetworkParams- Returns:
- the hostname
-
getIpv4DefaultGateway
public java.lang.String getIpv4DefaultGateway()
Description copied from interface:NetworkParamsGets the default gateway(routing destination for 0.0.0.0/0) for IPv4 connections.- Returns:
- default gateway for IPv4, or empty string if not defined.
-
getIpv6DefaultGateway
public java.lang.String getIpv6DefaultGateway()
Description copied from interface:NetworkParamsGets default gateway(routing destination for ::/0) for IPv6 connections.- Returns:
- default gateway for IPv6, or empty string if not defined.
-
parseIpv4Route
private static java.lang.String parseIpv4Route()
-
parseIpv6Route
private static java.lang.String parseIpv6Route()
-
-