Package oshi.software.os.mac
Class MacNetworkParams
- java.lang.Object
-
- oshi.software.common.AbstractNetworkParams
-
- oshi.software.os.mac.MacNetworkParams
-
- All Implemented Interfaces:
NetworkParams
@ThreadSafe final class MacNetworkParams extends AbstractNetworkParams
MacNetworkParams class.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
DEFAULT_GATEWAY
private static java.lang.String
IPV6_ROUTE_HEADER
private static org.slf4j.Logger
LOG
private static SystemB
SYS
-
Constructor Summary
Constructors Constructor Description MacNetworkParams()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDomainName()
Gets the Domain Name of the machine executing OSHI.java.lang.String
getHostName()
Gets the HostName of the machine executing OSHI.java.lang.String
getIpv4DefaultGateway()
Gets the default gateway(routing destination for 0.0.0.0/0) for IPv4 connections.java.lang.String
getIpv6DefaultGateway()
Gets default gateway(routing destination for ::/0) for IPv6 connections.-
Methods inherited from class oshi.software.common.AbstractNetworkParams
getDnsServers, searchGateway, toString
-
-
-
-
Field Detail
-
LOG
private static final org.slf4j.Logger LOG
-
SYS
private static final SystemB SYS
-
IPV6_ROUTE_HEADER
private static final java.lang.String IPV6_ROUTE_HEADER
- See Also:
- Constant Field Values
-
DEFAULT_GATEWAY
private static final java.lang.String DEFAULT_GATEWAY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDomainName
public java.lang.String getDomainName()
Description copied from interface:NetworkParams
Gets the Domain Name of the machine executing OSHI.- Specified by:
getDomainName
in interfaceNetworkParams
- Overrides:
getDomainName
in classAbstractNetworkParams
- Returns:
- the domain name
-
getHostName
public java.lang.String getHostName()
Description copied from interface:NetworkParams
Gets the HostName of the machine executing OSHI.- Specified by:
getHostName
in interfaceNetworkParams
- Overrides:
getHostName
in classAbstractNetworkParams
- Returns:
- the hostname
-
getIpv4DefaultGateway
public java.lang.String getIpv4DefaultGateway()
Description copied from interface:NetworkParams
Gets 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:NetworkParams
Gets default gateway(routing destination for ::/0) for IPv6 connections.- Returns:
- default gateway for IPv6, or empty string if not defined.
-
-