Class DefaultPort

    • Field Detail

      • DEFAULT_SPEED

        public static final long DEFAULT_SPEED
        Default port speed in Mbps.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultPort

        public DefaultPort​(Element element,
                           PortNumber number,
                           boolean isEnabled,
                           Annotations... annotations)
        Creates a network element attributed to the specified provider.
        Parameters:
        element - parent network element
        number - port number
        isEnabled - indicator whether the port is up and active
        annotations - optional key/value annotations
      • DefaultPort

        public DefaultPort​(Element element,
                           PortNumber number,
                           boolean isEnabled,
                           Port.Type type,
                           long portSpeed,
                           Annotations... annotations)
        Creates a network element attributed to the specified provider.
        Parameters:
        element - parent network element
        number - port number
        isEnabled - indicator whether the port is up and active
        type - port type
        portSpeed - port speed in Mbs
        annotations - optional key/value annotations
    • Method Detail

      • element

        public Element element()
        Description copied from interface: Port
        Returns the parent network element to which this port belongs.
        Specified by:
        element in interface Port
        Returns:
        parent network element
      • number

        public PortNumber number()
        Description copied from interface: Port
        Returns the port number.
        Specified by:
        number in interface Port
        Returns:
        port number
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: Port
        Indicates whether or not the port is currently up and active.
        Specified by:
        isEnabled in interface Port
        Returns:
        true if the port is operational
      • type

        public Port.Type type()
        Description copied from interface: Port
        Returns the port type.
        Specified by:
        type in interface Port
        Returns:
        port type
      • portSpeed

        public long portSpeed()
        Description copied from interface: Port
        Returns the current port speed in Mbps.
        Specified by:
        portSpeed in interface Port
        Returns:
        current port speed
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object