Class OpticalDeviceServiceView

  • All Implemented Interfaces:
    org.onosproject.event.ListenerService<org.onosproject.net.device.DeviceEvent,​org.onosproject.net.device.DeviceListener>, org.onosproject.net.device.DeviceService

    @Beta
    public class OpticalDeviceServiceView
    extends org.onosproject.net.utils.ForwardingDeviceService
    implements org.onosproject.net.device.DeviceService
    Decorator, which provides a DeviceService view, which returns Ports in optical specific ports.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected OpticalDeviceServiceView​(org.onosproject.net.device.DeviceService base)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addListener​(org.onosproject.net.device.DeviceListener listener)  
      org.onosproject.net.device.DeviceEvent augment​(org.onosproject.net.device.DeviceEvent event)
      Transform Port instance on the event to Optical specific port, if it is well-formed.
      org.onosproject.net.Port augment​(org.onosproject.net.Port port)
      Transform Port instance to Optical specific port, if it is well-formed.
      org.onosproject.net.device.PortStatistics getDeltaStatisticsForPort​(org.onosproject.net.DeviceId deviceId, org.onosproject.net.PortNumber portNumber)  
      org.onosproject.net.Port getPort​(org.onosproject.net.DeviceId deviceId, org.onosproject.net.PortNumber portNumber)  
      java.util.List<org.onosproject.net.Port> getPorts​(org.onosproject.net.DeviceId deviceId)  
      org.onosproject.net.device.PortStatistics getStatisticsForPort​(org.onosproject.net.DeviceId deviceId, org.onosproject.net.PortNumber portNumber)  
      static OpticalDeviceServiceView opticalView​(org.onosproject.net.device.DeviceService base)
      Wraps the given DeviceService to provide a view, which returns port as optical specific Port class.
      void removeListener​(org.onosproject.net.device.DeviceListener listener)  
      • Methods inherited from class org.onosproject.net.utils.ForwardingDeviceService

        delegate, getAvailableDeviceCount, getAvailableDevices, getAvailableDevices, getDevice, getDeviceCount, getDevices, getDevices, getLastUpdatedInstant, getPortDeltaStatistics, getPortStatistics, getRole, isAvailable, localStatus
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.onosproject.net.device.DeviceService

        getAvailableDeviceCount, getAvailableDevices, getAvailableDevices, getDevice, getDeviceCount, getDevices, getDevices, getLastUpdatedInstant, getPort, getPortDeltaStatistics, getPortStatistics, getRole, isAvailable, localStatus
    • Constructor Detail

      • OpticalDeviceServiceView

        protected OpticalDeviceServiceView​(org.onosproject.net.device.DeviceService base)
    • Method Detail

      • opticalView

        public static OpticalDeviceServiceView opticalView​(org.onosproject.net.device.DeviceService base)
        Wraps the given DeviceService to provide a view, which returns port as optical specific Port class.
        Parameters:
        base - DeviceService view to use as baseline.
        Returns:
        Decorated view of base
      • augment

        public org.onosproject.net.device.DeviceEvent augment​(org.onosproject.net.device.DeviceEvent event)
        Transform Port instance on the event to Optical specific port, if it is well-formed.
        Parameters:
        event - original event to transform
        Returns:
        transformed DeviceEvent
      • augment

        public org.onosproject.net.Port augment​(org.onosproject.net.Port port)
        Transform Port instance to Optical specific port, if it is well-formed.
        Parameters:
        port - Port instance to translate
        Returns:
        Optical specific port instance or original port.
      • addListener

        public void addListener​(org.onosproject.net.device.DeviceListener listener)
        Specified by:
        addListener in interface org.onosproject.event.ListenerService<org.onosproject.net.device.DeviceEvent,​org.onosproject.net.device.DeviceListener>
        Overrides:
        addListener in class org.onosproject.net.utils.ForwardingDeviceService
      • removeListener

        public void removeListener​(org.onosproject.net.device.DeviceListener listener)
        Specified by:
        removeListener in interface org.onosproject.event.ListenerService<org.onosproject.net.device.DeviceEvent,​org.onosproject.net.device.DeviceListener>
        Overrides:
        removeListener in class org.onosproject.net.utils.ForwardingDeviceService
      • getPorts

        public java.util.List<org.onosproject.net.Port> getPorts​(org.onosproject.net.DeviceId deviceId)
        Specified by:
        getPorts in interface org.onosproject.net.device.DeviceService
        Overrides:
        getPorts in class org.onosproject.net.utils.ForwardingDeviceService
      • getStatisticsForPort

        public org.onosproject.net.device.PortStatistics getStatisticsForPort​(org.onosproject.net.DeviceId deviceId,
                                                                              org.onosproject.net.PortNumber portNumber)
        Specified by:
        getStatisticsForPort in interface org.onosproject.net.device.DeviceService
      • getDeltaStatisticsForPort

        public org.onosproject.net.device.PortStatistics getDeltaStatisticsForPort​(org.onosproject.net.DeviceId deviceId,
                                                                                   org.onosproject.net.PortNumber portNumber)
        Specified by:
        getDeltaStatisticsForPort in interface org.onosproject.net.device.DeviceService
      • getPort

        public org.onosproject.net.Port getPort​(org.onosproject.net.DeviceId deviceId,
                                                org.onosproject.net.PortNumber portNumber)
        Specified by:
        getPort in interface org.onosproject.net.device.DeviceService
        Overrides:
        getPort in class org.onosproject.net.utils.ForwardingDeviceService