Class ForwardingPort

  • All Implemented Interfaces:
    Annotated, Port

    @Beta
    public abstract class ForwardingPort
    extends Object
    implements Port
    A Port which forwards all its method calls to another Port.
    • Constructor Detail

      • ForwardingPort

        protected ForwardingPort​(Port delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toEqualsBuilder

        protected org.apache.commons.lang3.builder.EqualsBuilder toEqualsBuilder​(Port that)
        Returns EqualsBuilder comparing all Port attributes including annotations.

        To add extra fields to equality, call super.toEqualsBuilder(..) and append fields. To remove field from comparison, override this method or manually implement equals().

        Parameters:
        that - object to compare to
        Returns:
        builder object
      • toStringHelper

        protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()
        Returns MoreObjects.ToStringHelper with Port attributes excluding annotations.
        Returns:
        MoreObjects.ToStringHelper
      • annotations

        public Annotations annotations()
        Description copied from interface: Annotated
        Returns the key/value annotations.
        Specified by:
        annotations in interface Annotated
        Returns:
        key/value annotations
      • 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