Package org.onosproject.net.optical
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.BehaviourRepresentation of a optical network infrastructure device.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.onosproject.net.Portport(org.onosproject.net.Port port)Returns most specific projection of theportor theportitself.<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 theportif such projection is supported.<T extends org.onosproject.net.Port>
booleanportIs(org.onosproject.net.Port port, java.lang.Class<T> portClass)Returns true ifportis capable of being projected as the specified class.
-
-
-
Method Detail
-
portIs
<T extends org.onosproject.net.Port> boolean portIs(org.onosproject.net.Port port, java.lang.Class<T> portClass)Returns true ifportis capable of being projected as the specified class.- Type Parameters:
T- type of Port- Parameters:
port- Port instance to testportClass- 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 theportif such projection is supported.- Type Parameters:
T- type of Port- Parameters:
port- Port instance to projectportClass- 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 theportor theportitself.- Parameters:
port- Port instance- Returns:
- projection instance or
portitself
-
-