Package org.onosproject.protocol.rest
Interface RestSBController
-
- All Superinterfaces:
HttpSBController
public interface RestSBController extends HttpSBController
Abstraction of an REST controller. Serves as a one stop shop for obtaining Rest southbound devices.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddProxiedDevice(org.onosproject.net.DeviceId deviceId, RestSBDevice proxy)Add a new association between a proxied device exposed to ONOS and a REST proxy server.java.util.Set<org.onosproject.net.DeviceId>getProxiedDevices(org.onosproject.net.DeviceId proxyId)Get all the proxied device exposed to ONOS ids under the same REST proxy server.RestSBDevicegetProxySBDevice(org.onosproject.net.DeviceId deviceId)Get a REST proxied server given a device id.voidremoveProxiedDevice(org.onosproject.net.DeviceId deviceId)Remove the association between a proxied device exposed to ONOS and a REST proxy server.voidstartServerSentEvents(org.onosproject.net.DeviceId deviceId, java.lang.String eventsUrl)Call on the Rest SB interface for a device to request ServerSentEvents from events URL.-
Methods inherited from interface org.onosproject.protocol.http.HttpSBController
addDevice, cancelServerSentEvents, delete, get, getDevice, getDevice, getDevices, getServerSentEvents, patch, post, post, put, removeDevice
-
-
-
-
Method Detail
-
addProxiedDevice
void addProxiedDevice(org.onosproject.net.DeviceId deviceId, RestSBDevice proxy)Add a new association between a proxied device exposed to ONOS and a REST proxy server.- Parameters:
deviceId- REST device identifierproxy- REST proxy device
-
removeProxiedDevice
void removeProxiedDevice(org.onosproject.net.DeviceId deviceId)
Remove the association between a proxied device exposed to ONOS and a REST proxy server.- Parameters:
deviceId- REST device identifier
-
getProxiedDevices
java.util.Set<org.onosproject.net.DeviceId> getProxiedDevices(org.onosproject.net.DeviceId proxyId)
Get all the proxied device exposed to ONOS ids under the same REST proxy server.- Parameters:
proxyId- REST proxy device identifier- Returns:
- set of device ids under same proxy
-
getProxySBDevice
RestSBDevice getProxySBDevice(org.onosproject.net.DeviceId deviceId)
Get a REST proxied server given a device id.- Parameters:
deviceId- the id of proxied device exposed to ONOS- Returns:
- the corresponding REST proxied device
-
startServerSentEvents
void startServerSentEvents(org.onosproject.net.DeviceId deviceId, java.lang.String eventsUrl)Call on the Rest SB interface for a device to request ServerSentEvents from events URL. These events will be converted to ONOS events and forwarded to any registered listener through the EventDispatcher system. Drivers can implement listeners in their own particular way depending on the type of data expected. To register and unregister listeners use the addListener and removeListener methods. These listeners will get messages from all devices. To stop a particular device's event stream use the cancelServerSentEvents for that device.- Parameters:
deviceId- the id of the device exposed to ONOSeventsUrl- The resource on the device that supplies an SSE_INBOUND stream
-
-