Class NetworkConfiguration


  • public class NetworkConfiguration
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PATTERN_INET4ADDRESS  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.TreeMap<java.lang.String,​NetworkInterface<?>> getInterfaces()
      Gets the network interfaces configuration.
      com.google.gson.JsonObject toJson()
      Return this NetworkConfiguration as a JSON object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PATTERN_INET4ADDRESS

        public static final java.lang.String PATTERN_INET4ADDRESS
        See Also:
        Constant Field Values
    • Constructor Detail

      • NetworkConfiguration

        public NetworkConfiguration​(java.util.TreeMap<java.lang.String,​NetworkInterface<?>> interfaces)
    • Method Detail

      • toJson

        public com.google.gson.JsonObject toJson()
        Return this NetworkConfiguration as a JSON object.

         {
           "interfaces": {
             [name: string]: {
               "dhcp"?: boolean,
               "linkLocalAddressing"?: boolean,
               "gateway"?: string,
               "dns"?: string,
               "addresses"?: string[]
             }
           }
         }
         
        Returns:
        this configuration as JSON
      • getInterfaces

        public java.util.TreeMap<java.lang.String,​NetworkInterface<?>> getInterfaces()
        Gets the network interfaces configuration.
        Returns:
        a map of network interfaces per name