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 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 identifier
        proxy - 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 ONOS
        eventsUrl - The resource on the device that supplies an SSE_INBOUND stream