Package org.onosproject.net.driver
Interface DriverData
-
- All Superinterfaces:
Annotations
,MutableAnnotations
- All Known Implementing Classes:
AbstractProjectableModel.AnnotationDriverData
,DefaultDevice.DeviceDriverData
,DefaultDriverData
public interface DriverData extends MutableAnnotations
Container for data about an entity, e.g. device, link. Data is stored usingMutableAnnotations
. Note that only derivatives ofHandlerBehaviour
can expect mutability from the backing driver data instance; other behaviours must rely on immutableAnnotations
only.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T extends Behaviour>
Tbehaviour(java.lang.Class<T> behaviourClass)
Returns the specified facet of behaviour to access the device data.DeviceId
deviceId()
Returns the device identifier.Driver
driver()
Returns the parent device driver.-
Methods inherited from interface org.onosproject.net.Annotations
keys, value
-
Methods inherited from interface org.onosproject.net.MutableAnnotations
clear, set
-
-
-
-
Method Detail
-
driver
Driver driver()
Returns the parent device driver.- Returns:
- device driver
-
deviceId
DeviceId deviceId()
Returns the device identifier.- Returns:
- device identifier
-
behaviour
default <T extends Behaviour> T behaviour(java.lang.Class<T> behaviourClass)
Returns the specified facet of behaviour to access the device data. Implementations are expected to defer to the backing driver for creation of the requested behaviour.- Type Parameters:
T
- type of behaviour- Parameters:
behaviourClass
- behaviour class- Returns:
- requested behaviour or null if not supported
-
-