Interface DeviceProviderService

    • Method Detail

      • deviceConnected

        void deviceConnected​(DeviceId deviceId,
                             DeviceDescription deviceDescription)
        Signals the core that a device has connected or has been detected somehow.
        Parameters:
        deviceId - device identifier
        deviceDescription - information about network device
      • deviceDisconnected

        void deviceDisconnected​(DeviceId deviceId)
        Signals the core that a device has disconnected or is no longer reachable.
        Parameters:
        deviceId - identity of the device to be removed
      • updatePorts

        void updatePorts​(DeviceId deviceId,
                         java.util.List<PortDescription> portDescriptions)
        Updates information about all ports of a device. It is up to the core to determine what has changed.
        Parameters:
        deviceId - identity of the device
        portDescriptions - list of device ports
      • deletePort

        default void deletePort​(DeviceId deviceId,
                                PortDescription portDescription)
        Delete information about a single port of a device. It is up to the core to determine what has changed.
        Parameters:
        deviceId - identity of the device
        portDescription - device port description
      • portStatusChanged

        void portStatusChanged​(DeviceId deviceId,
                               PortDescription portDescription)
        Notifies the core about port status change of a single port.
        Parameters:
        deviceId - identity of the device
        portDescription - description of the port that changed
      • receivedRoleReply

        void receivedRoleReply​(DeviceId deviceId,
                               MastershipRole requested,
                               MastershipRole response)
        Notifies the core about the result of a role request sent to a device. This method assumes that the provider knows the original role that was requested for a given response, if that is not the case, and only the response is known to the provider, then receivedRoleReply(DeviceId, MastershipRole) should be used instead.
        Parameters:
        deviceId - identity of the device
        requested - mastership role that was requested by the node
        response - mastership role the switch accepted
      • receivedRoleReply

        default void receivedRoleReply​(DeviceId deviceId,
                                       MastershipRole response)
        Notifies the core about a mastership role reported by the given device for this node.
        Parameters:
        deviceId - identity of the device
        response - mastership role the switch accepted
      • updatePortStatistics

        void updatePortStatistics​(DeviceId deviceId,
                                  java.util.Collection<PortStatistics> portStatistics)
        Updates statistics about all ports of a device.
        Parameters:
        deviceId - identity of the device
        portStatistics - list of device port statistics