Class InterfaceConfig

  • @Beta
    public class InterfaceConfig
    extends Config<ConnectPoint>
    Configuration for interfaces.
    • Constructor Detail

      • InterfaceConfig

        public InterfaceConfig()
    • Method Detail

      • isValid

        public boolean isValid()
        Description copied from class: Config
        Indicates whether or not the backing JSON node contains valid data.

        Default implementation returns true. Subclasses are expected to override this with their own validation. Implementations are free to throw a RuntimeException if data is invalid.

        isValid in class Config<ConnectPoint>
        true if the data is valid; false otherwise
      • getInterfaces

        public Set<Interface> getInterfaces()
                                     throws ConfigException
        Retrieves all interfaces configured on this port.
        set of interfaces
        ConfigException - if there is any error in the JSON config
      • addInterface

        public void addInterface​(Interface intf)
        Adds an interface to the config.
        intf - interface to add
      • removeInterface

        public void removeInterface​(String name)
        Removes an interface from the config.
        name - name of the interface to remove