Interface RestConfSBController
-
- All Superinterfaces:
org.onosproject.protocol.http.HttpSBController
public interface RestConfSBController extends org.onosproject.protocol.http.HttpSBControllerAbstraction 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 voidaddNotificationListener(org.onosproject.net.DeviceId deviceId, RestconfNotificationEventListener listener)Registers a listener for notification events that occur to restconf devices.voidenableNotifications(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.booleanisNotificationEnabled(org.onosproject.net.DeviceId deviceId)Returns true if a listener has been installed to listen to RESTCONF notifications sent from a particular device.voidremoveNotificationListener(org.onosproject.net.DeviceId deviceId, RestconfNotificationEventListener listener)Unregisters the listener for the device.
-
-
-
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 torequest- url of the requestmediaType- format to retrieve the content incallBackListener- 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 attachedlistener- 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 removedlistener- 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
-
-