Package org.onosproject.net.device
Interface DeviceDescriptionDiscovery
-
- All Superinterfaces:
Behaviour
,HandlerBehaviour
public interface DeviceDescriptionDiscovery extends HandlerBehaviour
Handler behaviour capable of creating device and port descriptions. These descriptions should be appropriately annotated to support downstream projections of the respective devices and their ports.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DeviceDescription
discoverDeviceDetails()
Returns a device description appropriately annotated to support downstream model extension via projections of the resulting device, as in the following example.List<PortDescription>
discoverPortDetails()
Returns a list of port descriptions appropriately annotated to support downstream model extension via projections of their parent device, as in the following example.default void
discoverPortDetails(Consumer<PortDescription> consumer)
Invoke given lamda function when port descriptions are discovered.-
Methods inherited from interface org.onosproject.net.driver.HandlerBehaviour
handler, setHandler
-
-
-
-
Method Detail
-
discoverDeviceDetails
DeviceDescription discoverDeviceDetails()
Returns a device description appropriately annotated to support downstream model extension via projections of the resulting device, as in the following example.MicrowaveDevice device = deviceService.get(id).as(MicrowaveDevice.class);
- Returns:
- annotated device description
-
discoverPortDetails
List<PortDescription> discoverPortDetails()
Returns a list of port descriptions appropriately annotated to support downstream model extension via projections of their parent device, as in the following example.MicrowaveDevice device = deviceService.get(id).as(MicrowaveDevice.class); List<MicrowavePort> ports = device.microwavePorts(deviceService.getPorts(id));
- Returns:
- annotated device description
-
discoverPortDetails
default void discoverPortDetails(Consumer<PortDescription> consumer)
Invoke given lamda function when port descriptions are discovered.- Parameters:
consumer
- consumer to process port description
-
-