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.AnnotationDriverData
Device.Type
id
NO_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, setDriverService
providerId
annotations
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
annotations
providerId
is, project
public 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()
Device
public String manufacturer()
Device
manufacturer
in interface Device
public String hwVersion()
Device
public String swVersion()
Device
public String serialNumber()
Device
serialNumber
in interface Device
public ChassisId chassisId()
Device
public <B extends Behaviour> B as(Class<B> projectionClass)
Projectable
as
in interface Projectable
as
in class AbstractProjectableModel
B
- type of behaviourprojectionClass
- requested projection classprotected DriverData asData()
asData
in class AbstractProjectableModel
protected Driver locateDriver()
AbstractProjectableModel
The default implementation derives the driver based on the driver
annotation value.
locateDriver
in class AbstractProjectableModel