public interface HttpSBController
| Modifier and Type | Method and Description |
|---|---|
void |
addDevice(RestSBDevice device)
Adds a device to the device map.
|
boolean |
delete(org.onosproject.net.DeviceId device,
String request,
InputStream payload,
String mediaType)
Does a HTTP DELETE request with specified parameters to the device.
|
InputStream |
get(org.onosproject.net.DeviceId device,
String request,
String mediaType)
Does a HTTP GET request with specified parameters to the device.
|
RestSBDevice |
getDevice(org.onosproject.net.DeviceId deviceInfo)
Returns a device by node identifier.
|
RestSBDevice |
getDevice(org.onlab.packet.IpAddress ip,
int port)
Returns a device by Ip and Port.
|
Map<org.onosproject.net.DeviceId,RestSBDevice> |
getDevices()
Returns all the devices known to this controller.
|
boolean |
patch(org.onosproject.net.DeviceId device,
String request,
InputStream payload,
String mediaType)
Does a HTTP PATCH request with specified parameters to the device.
|
boolean |
post(org.onosproject.net.DeviceId device,
String request,
InputStream payload,
String mediaType)
Does a HTTP POST request with specified parameters to the device.
|
<T> T |
post(org.onosproject.net.DeviceId device,
String request,
InputStream payload,
String mediaType,
Class<T> responseClass)
Does a HTTP POST request with specified parameters to the device.
|
boolean |
put(org.onosproject.net.DeviceId device,
String request,
InputStream payload,
String mediaType)
Does a HTTP PUT request with specified parameters to the device.
|
void |
removeDevice(org.onosproject.net.DeviceId deviceId)
Removes the device from the devices map.
|
Map<org.onosproject.net.DeviceId,RestSBDevice> getDevices()
RestSBDevice getDevice(org.onosproject.net.DeviceId deviceInfo)
deviceInfo - node identifierRestSBDevice getDevice(org.onlab.packet.IpAddress ip, int port)
ip - device ipport - device portvoid addDevice(RestSBDevice device)
device - to be addedvoid removeDevice(org.onosproject.net.DeviceId deviceId)
deviceId - to be removedboolean post(org.onosproject.net.DeviceId device,
String request,
InputStream payload,
String mediaType)
device - device to make the request torequest - url of the requestpayload - payload of the request as an InputStreammediaType - type of content in the payload i.e. application/json<T> T post(org.onosproject.net.DeviceId device,
String request,
InputStream payload,
String mediaType,
Class<T> responseClass)
T - post return typedevice - device to make the request torequest - url of the requestpayload - payload of the request as an InputStreammediaType - type of content in the payload i.e. application/jsonresponseClass - the type of response object we are interested in,
such as String, InputStream.boolean put(org.onosproject.net.DeviceId device,
String request,
InputStream payload,
String mediaType)
device - device to make the request torequest - resource path of the requestpayload - payload of the request as an InputStreammediaType - type of content in the payload i.e. application/jsonInputStream get(org.onosproject.net.DeviceId device, String request, String mediaType)
device - device to make the request torequest - url of the requestmediaType - format to retrieve the content inboolean patch(org.onosproject.net.DeviceId device,
String request,
InputStream payload,
String mediaType)
device - device to make the request torequest - url of the requestpayload - payload of the request as an InputStreammediaType - format to retrieve the content inboolean delete(org.onosproject.net.DeviceId device,
String request,
InputStream payload,
String mediaType)
device - device to make the request torequest - url of the requestpayload - payload of the request as an InputStreammediaType - type of content in the payload i.e. application/json