Class OtuPortMapper

    • Constructor Summary

      Constructors 
      Constructor Description
      OtuPortMapper()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<OtuPort> as​(org.onosproject.net.Port port)
      Returns port mapped to <P>.
      boolean is​(org.onosproject.net.Port port)
      Returns true if this port is capable of being projected as <P>.
      protected java.util.Optional<OtuPort> mapPort​(org.onosproject.net.Port port)
      Returns port mapped to <P>.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OtuPortMapper

        public OtuPortMapper()
    • Method Detail

      • is

        public boolean is​(org.onosproject.net.Port port)
        Description copied from class: AbstractPortMapper
        Returns true if this port is capable of being projected as <P>.

        Note: Subclasses should override and implement short-cut conditions and call super.is(port).

        Specified by:
        is in interface PortMapper<OtuPort>
        Overrides:
        is in class AbstractPortMapper<OtuPort>
        Parameters:
        port - port
        Returns:
        true if this port can be projected as the given type
      • as

        public java.util.Optional<OtuPort> as​(org.onosproject.net.Port port)
        Description copied from class: AbstractPortMapper
        Returns port mapped to <P>.

        Note: Subclasses should override and check if port is already of type P and directly return Optional.of((P) port), if not call super.as(port).

        Specified by:
        as in interface PortMapper<OtuPort>
        Overrides:
        as in class AbstractPortMapper<OtuPort>
        Parameters:
        port - Port to map
        Returns:
        port mapped to <P>
      • mapPort

        protected java.util.Optional<OtuPort> mapPort​(org.onosproject.net.Port port)
        Description copied from class: AbstractPortMapper
        Returns port mapped to <P>.
        Specified by:
        mapPort in class AbstractPortMapper<OtuPort>
        Parameters:
        port - Port to map
        Returns:
        port mapped to <P>