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,
java.lang.String manufacturer,
java.lang.String hwVersion,
java.lang.String swVersion,
java.lang.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(java.lang.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(java.lang.Object obj) |
int |
hashCode() |
java.lang.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.
|
java.lang.String |
manufacturer()
Returns the device manufacturer name.
|
java.lang.String |
serialNumber()
Returns the device serial number.
|
java.lang.String |
swVersion()
Returns the device software version.
|
java.lang.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, java.lang.String manufacturer, java.lang.String hwVersion, java.lang.String swVersion, java.lang.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 java.lang.String manufacturer()
Devicemanufacturer in interface Devicepublic java.lang.String hwVersion()
Devicepublic java.lang.String swVersion()
Devicepublic java.lang.String serialNumber()
DeviceserialNumber in interface Devicepublic ChassisId chassisId()
Devicepublic <B extends Behaviour> B as(java.lang.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 AbstractProjectableModelpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object