Class AbstractNetworkParams

    • Constructor Detail

      • AbstractNetworkParams

        public AbstractNetworkParams()
    • Method Detail

      • getDomainName

        public java.lang.String getDomainName()
        Specified by:
        getDomainName in interface NetworkParams
        Returns:
        Gets domain name
      • getHostName

        public java.lang.String getHostName()
        Specified by:
        getHostName in interface NetworkParams
        Returns:
        Gets host name
      • getDnsServers

        public java.lang.String[] getDnsServers()
        Specified by:
        getDnsServers in interface NetworkParams
        Returns:
        Gets 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