Class AbstractNetworkParams

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String NAMESERVER  
    • Constructor Detail

      • AbstractNetworkParams

        public AbstractNetworkParams()
    • 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 interface NetworkParams
        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 interface NetworkParams
        Returns:
        the hostname
      • getDnsServers

        public java.lang.String[] getDnsServers()
        Description copied from interface: NetworkParams
        Gets the DNS Servers configured for this machine.
        Specified by:
        getDnsServers in interface NetworkParams
        Returns:
        the DNS servers
      • searchGateway

        protected static java.lang.String searchGateway​(java.util.List<java.lang.String> lines)
        Convenience method to parse the output of the `route` command. While the command arguments vary between OS's the output is consistently parsable.
        Parameters:
        lines - output of OS-specific route command
        Returns:
        default gateway
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object