Class ForwardingPort

  • All Implemented Interfaces:
    Annotated, Port

    @Beta
    public abstract class ForwardingPort
    extends java.lang.Object
    implements Port
    A Port which forwards all its method calls to another Port.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.onosproject.net.Port

        Port.Type
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ForwardingPort​(Port delegate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Annotations annotations()
      Returns the key/value annotations.
      Element element()
      Returns the parent network element to which this port belongs.
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      boolean isEnabled()
      Indicates whether or not the port is currently up and active.
      PortNumber number()
      Returns the port number.
      long portSpeed()
      Returns the current port speed in Mbps.
      protected org.apache.commons.lang3.builder.EqualsBuilder toEqualsBuilder​(Port that)
      Returns EqualsBuilder comparing all Port attributes including annotations.
      java.lang.String toString()  
      protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()
      Returns MoreObjects.ToStringHelper with Port attributes excluding annotations.
      Port.Type type()
      Returns the port type.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ForwardingPort

        protected ForwardingPort​(Port delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.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
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toStringHelper

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • 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