public class DefaultDevice extends AbstractElement implements Device
| Modifier and Type | Class and Description |
|---|---|
protected class |
DefaultDevice.DeviceDriverData
Projection of the parent entity as a driver data entity.
|
AbstractProjectableModel.AnnotationDriverDataDevice.TypeidNO_DRIVER, NO_DRIVER_SERVICE| Constructor and Description |
|---|
DefaultDevice(ProviderId providerId,
DeviceId id,
Device.Type type,
String manufacturer,
String hwVersion,
String swVersion,
String serialNumber,
ChassisId chassisId,
Annotations... annotations)
Creates a network element attributed to the specified provider.
|
| Modifier and Type | Method and Description |
|---|---|
<B extends Behaviour> |
as(Class<B> projectionClass)
Returns the specified projection of this entity if such projection
is supported.
|
protected DriverData |
asData()
Returns self as an immutable driver data instance.
|
ChassisId |
chassisId()
Returns the device chassis id.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
hwVersion()
Returns the device hardware version.
|
DeviceId |
id()
Returns the device identifier.
|
protected Driver |
locateDriver()
Locates the driver to be used by this entity.
|
String |
manufacturer()
Returns the device manufacturer name.
|
String |
serialNumber()
Returns the device serial number.
|
String |
swVersion()
Returns the device software version.
|
String |
toString() |
Device.Type |
type()
Returns the type of the infrastructure device.
|
bindAndCheckDriver, bindDriver, driver, driverService, is, setDriverServiceproviderIdannotationsclone, finalize, getClass, notify, notifyAll, wait, wait, waitannotationsproviderIdis, projectpublic DefaultDevice(ProviderId providerId, DeviceId id, Device.Type type, String manufacturer, String hwVersion, String swVersion, String serialNumber, ChassisId chassisId, Annotations... annotations)
providerId - identity of the providerid - device identifiertype - device typemanufacturer - device manufacturerhwVersion - device HW versionswVersion - device SW versionserialNumber - device serial numberchassisId - chassis idannotations - optional key/value annotationspublic Device.Type type()
Devicepublic String manufacturer()
Devicemanufacturer in interface Devicepublic String hwVersion()
Devicepublic String swVersion()
Devicepublic String serialNumber()
DeviceserialNumber in interface Devicepublic ChassisId chassisId()
Devicepublic <B extends Behaviour> B as(Class<B> projectionClass)
Projectableas in interface Projectableas in class AbstractProjectableModelB - type of behaviourprojectionClass - requested projection classprotected DriverData asData()
asData in class AbstractProjectableModelprotected Driver locateDriver()
AbstractProjectableModel
The default implementation derives the driver based on the driver
annotation value.
locateDriver in class AbstractProjectableModel