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.

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

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

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

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