@Deprecated public class BasicDeviceFactory extends Object implements DeviceFactory
NB : Future Improvement : - Add a method to find a device knowing his token - Add a method to update a device (timestamp or token) - method to compare two devices, and replace when the device token has changed
| Constructor and Description |
|---|
BasicDeviceFactory()
Deprecated.
Constructs a VolatileDeviceFactory
|
| Modifier and Type | Method and Description |
|---|---|
Device |
addDevice(String id,
String token)
Deprecated.
Add a device to the map
|
Device |
getDevice(String id)
Deprecated.
Get a device according to his id
|
void |
removeDevice(String id)
Deprecated.
Remove a device
|
public BasicDeviceFactory()
public Device addDevice(String id, String token) throws Exception
addDevice in interface DeviceFactoryid - The device idtoken - The device tokenDuplicateDeviceExceptionNullIdExceptionNullDeviceTokenExceptionExceptionpublic Device getDevice(String id) throws UnknownDeviceException, NullIdException
getDevice in interface DeviceFactoryid - The device idUnknownDeviceExceptionNullIdExceptionpublic void removeDevice(String id) throws UnknownDeviceException, NullIdException
removeDevice in interface DeviceFactoryid - The device idUnknownDeviceExceptionNullIdExceptionCopyright © 2016. All rights reserved.