Class BasicHostConfig


  • public final class BasicHostConfig
    extends BasicElementConfig<HostId>
    Basic configuration for network end-station hosts.
    • Constructor Detail

      • BasicHostConfig

        public BasicHostConfig()
    • 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 BasicElementConfig<HostId>
        Returns:
        true if the data is valid; false otherwise
      • name

        public String name()
        Description copied from class: BasicElementConfig
        Returns friendly label for the element. If not set, returns the element identifier.
        Overrides:
        name in class BasicElementConfig<HostId>
        Returns:
        friendly label or element identifier itself if not set
      • locations

        public Set<HostLocation> locations()
        Returns the location of the host.
        Returns:
        location of the host or null if none specified
        Throws:
        IllegalArgumentException - if locations are set but empty or not specified with correct format
      • auxLocations

        public Set<HostLocation> auxLocations()
        Returns the auxLocations of the host.
        Returns:
        auxLocations of the host or null if none specified
        Throws:
        IllegalArgumentException - if auxLocations are set but empty or not specified with correct format
      • setLocations

        public BasicHostConfig setLocations​(Set<HostLocation> locations)
        Sets the location of the host.
        Parameters:
        locations - location of the host or null to unset
        Returns:
        the config of the host
      • setAuxLocations

        public BasicHostConfig setAuxLocations​(Set<HostLocation> auxLocations)
        Sets the auxLocations of the host.
        Parameters:
        auxLocations - auxLocations of the host or null to unset
        Returns:
        the config of the host
      • ipAddresses

        public Set<IpAddress> ipAddresses()
        Returns IP addresses of the host.
        Returns:
        IP addresses of the host or null if not set
        Throws:
        IllegalArgumentException - if not specified with correct format
      • setIps

        public BasicHostConfig setIps​(Set<IpAddress> ipAddresses)
        Sets the IP addresses of the host.
        Parameters:
        ipAddresses - IP addresses of the host or null to unset
        Returns:
        the config of the host
      • innerVlan

        public VlanId innerVlan()
      • outerTpid

        public EthType outerTpid()