Class NetworkOshi

java.lang.Object
io.deephaven.process.NetworkOshi
All Implemented Interfaces:
PropertySet

@Immutable public abstract class NetworkOshi extends Object implements PropertySet
NetworkParams presents network parameters of running OS, such as DNS, host name etc.
  • Constructor Details

    • NetworkOshi

      public NetworkOshi()
  • Method Details

    • getHostName

      @Parameter public abstract String getHostName()

      getHostName.

      Returns:
      Gets host name
    • getDomainName

      @Parameter public abstract Optional<String> getDomainName()

      getDomainName.

      Returns:
      Gets domain name
    • getDnsServers

      @Parameter public abstract io.deephaven.process.DnsServers getDnsServers()

      getDnsServers.

      Returns:
      Gets DNS servers
    • getIpv4DefaultGateway

      @Parameter public abstract Optional<String> getIpv4DefaultGateway()

      getIpv4DefaultGateway.

      Returns:
      Gets default gateway(routing destination for 0.0.0.0/0) for IPv4
    • getIpv6DefaultGateway

      @Parameter public abstract Optional<String> getIpv6DefaultGateway()

      getIpv6DefaultGateway.

      Returns:
      Gets default gateway(routing destination for ::/0) for IPv6
    • traverse

      public final void traverse(PropertyVisitor visitor)
      Description copied from interface: PropertySet
      Traverse this property set and output the property key/values to the given visitor.

      Callers should typically prefer to call PropertyVisitor.visitProperties(PropertySet), as the inversion of logic allows the visitor (the more stateful object) to potentially perform initialization logic and traverse more efficiently.

      Specified by:
      traverse in interface PropertySet
      Parameters:
      visitor - the visitor
      See Also:
    • from

      public static NetworkOshi from(oshi.software.os.NetworkParams network)