Interface RestConfSBController

  • All Superinterfaces:
    org.onosproject.protocol.http.HttpSBController

    public interface RestConfSBController
    extends org.onosproject.protocol.http.HttpSBController
    Abstraction of a RESTCONF controller. Serves as a one stop shop for obtaining RESTCONF southbound devices and (un)register listeners.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addNotificationListener​(org.onosproject.net.DeviceId deviceId, RestconfNotificationEventListener listener)
      Registers a listener for notification events that occur to restconf devices.
      void enableNotifications​(org.onosproject.net.DeviceId device, java.lang.String request, java.lang.String mediaType, RestconfNotificationEventListener callBackListener)
      This method is to be called by whoever is interested to receive Notifications from a specific device.
      boolean isNotificationEnabled​(org.onosproject.net.DeviceId deviceId)
      Returns true if a listener has been installed to listen to RESTCONF notifications sent from a particular device.
      void removeNotificationListener​(org.onosproject.net.DeviceId deviceId, RestconfNotificationEventListener listener)
      Unregisters the listener for the device.
      • Methods inherited from interface org.onosproject.protocol.http.HttpSBController

        addDevice, cancelServerSentEvents, delete, get, getDevice, getDevice, getDevices, getServerSentEvents, patch, post, post, put, removeDevice
    • Method Detail

      • enableNotifications

        void enableNotifications​(org.onosproject.net.DeviceId device,
                                 java.lang.String request,
                                 java.lang.String mediaType,
                                 RestconfNotificationEventListener callBackListener)
        This method is to be called by whoever is interested to receive Notifications from a specific device. It does a REST GET request with specified parameters to the device, and calls the provided callBackListener upon receiving notifications to notify the requester about notifications.
        Parameters:
        device - device to make the request to
        request - url of the request
        mediaType - format to retrieve the content in
        callBackListener - method to call when notifications arrives
      • addNotificationListener

        void addNotificationListener​(org.onosproject.net.DeviceId deviceId,
                                     RestconfNotificationEventListener listener)
        Registers a listener for notification events that occur to restconf devices.
        Parameters:
        deviceId - identifier of the device to which the listener is attached
        listener - the listener to notify
      • removeNotificationListener

        void removeNotificationListener​(org.onosproject.net.DeviceId deviceId,
                                        RestconfNotificationEventListener listener)
        Unregisters the listener for the device.
        Parameters:
        deviceId - identifier of the device for which the listener is to be removed
        listener - listener to be removed
      • isNotificationEnabled

        boolean isNotificationEnabled​(org.onosproject.net.DeviceId deviceId)
        Returns true if a listener has been installed to listen to RESTCONF notifications sent from a particular device.
        Parameters:
        deviceId - identifier of the device from which the notifications are generated
        Returns:
        true if listener is installed; false otherwise