Interface OpticalDevice

  • All Superinterfaces:
    org.onosproject.net.Annotated, org.onosproject.net.driver.Behaviour, org.onosproject.net.Device, org.onosproject.net.Element, org.onosproject.net.driver.Projectable, org.onosproject.net.Provided
    All Known Implementing Classes:
    DefaultOpticalDevice

    @Beta
    public interface OpticalDevice
    extends org.onosproject.net.Device, org.onosproject.net.driver.Behaviour
    Representation of a optical network infrastructure device.
    • Nested Class Summary

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

        org.onosproject.net.Device.Type
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.onosproject.net.Port port​(org.onosproject.net.Port port)
      Returns most specific projection of the port or the port itself.
      <T extends org.onosproject.net.Port>
      java.util.Optional<T>
      portAs​(org.onosproject.net.Port port, java.lang.Class<T> portClass)
      Returns the specified projection of the port if such projection is supported.
      <T extends org.onosproject.net.Port>
      boolean
      portIs​(org.onosproject.net.Port port, java.lang.Class<T> portClass)
      Returns true if port is capable of being projected as the specified class.
      • Methods inherited from interface org.onosproject.net.Annotated

        annotations
      • Methods inherited from interface org.onosproject.net.driver.Behaviour

        data, setData
      • Methods inherited from interface org.onosproject.net.Device

        chassisId, hwVersion, id, manufacturer, serialNumber, swVersion, type
      • Methods inherited from interface org.onosproject.net.driver.Projectable

        as, is, project
      • Methods inherited from interface org.onosproject.net.Provided

        providerId
    • Method Detail

      • portIs

        <T extends org.onosproject.net.Port> boolean portIs​(org.onosproject.net.Port port,
                                                            java.lang.Class<T> portClass)
        Returns true if port is capable of being projected as the specified class.
        Type Parameters:
        T - type of Port
        Parameters:
        port - Port instance to test
        portClass - requested projection class
        Returns:
        true if the requested projection is supported
      • portAs

        <T extends org.onosproject.net.Port> java.util.Optional<T> portAs​(org.onosproject.net.Port port,
                                                                          java.lang.Class<T> portClass)
        Returns the specified projection of the port if such projection is supported.
        Type Parameters:
        T - type of Port
        Parameters:
        port - Port instance to project
        portClass - requested projection class
        Returns:
        projection instance or empty if not supported.
      • port

        org.onosproject.net.Port port​(org.onosproject.net.Port port)
        Returns most specific projection of the port or the port itself.
        Parameters:
        port - Port instance
        Returns:
        projection instance or port itself