@Singleton public class DeviceManagerImpl extends Object implements DeviceManager
| Constructor and Description |
|---|
DeviceManagerImpl(DeviceList deviceList) |
| Modifier and Type | Method and Description |
|---|---|
Device |
addDevice(DeviceDescriptor descriptor)
Add Device into
deviceList. |
Device |
addDevice(DeviceDescriptor descriptor,
Preferences preferences)
Create an instance of a device driver.
|
int |
deviceCount()
Size query for deviceList
|
Device |
getDevice(int i)
Indexed getter for deviceList elements
|
int |
getDeviceIndex(Device device)
Getter for the index of
device. |
IDriver |
getNullDriver()
Returns null driver of Generic Device.
|
Device |
removeDevice(int i)
Remover for deviceList elements.
|
@Inject public DeviceManagerImpl(DeviceList deviceList)
public Device addDevice(DeviceDescriptor descriptor, Preferences preferences)
DeviceManageraddDevice in interface DeviceManagerdescriptor - the class name of the device driverpreferences - the preferencespublic Device addDevice(DeviceDescriptor descriptor)
DeviceManagerdeviceList. A new Preferences node will be
created for the Device.addDevice in interface DeviceManagerDevice value created.public Device getDevice(int i)
DeviceManagergetDevice in interface DeviceManagerpublic Device removeDevice(int i)
DeviceManagerremoveDevice in interface DeviceManagerDevice object removed.public int deviceCount()
DeviceManagerdeviceCount in interface DeviceManagerpublic int getDeviceIndex(Device device)
DeviceManagerdevice.getDeviceIndex in interface DeviceManagerpublic IDriver getNullDriver()
DeviceManagergetNullDriver in interface DeviceManagerCopyright © 2014. All Rights Reserved.