java.lang.Object
org.rockhopper.smarthome.wes.jwes.discovery.WesUtils

public class WesUtils extends Object
  • Constructor Details

    • WesUtils

      public WesUtils()
  • Method Details

    • getInterfaceIPs

      public static TreeSet<String> getInterfaceIPs()
      Gets every IPv4 Address on each Interface except the loopback The Address format is ip/subnet
      Returns:
      The collected IPv4 Addresses
    • getNetworkIPs

      public static LinkedHashSet<String> getNetworkIPs(TreeSet<String> interfaceIPs)
      Takes the interfaceIPs and fetches every IP which can be assigned on their network
      Parameters:
      interfaceIPs - The IPs which are assigned to the Network Interfaces
      Returns:
      Every single IP which can be assigned on the Networks the computer is connected to
    • nativePing

      public static boolean nativePing(String hostname, int port, int timeout) throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • httpPing

      public static Boolean httpPing(String host, int httpPort)
    • getMac

      public static String getMac(String host, int tcpPort)
    • isValid_WES_MACAddress

      public static boolean isValid_WES_MACAddress(String mac)