|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavapns.devices.implementations.basic.BasicDeviceFactory
@Deprecated public class BasicDeviceFactory
This class implements an in-memory DeviceFactory (backed by a Map). Since this class does not persist Device objects, it should not be used in a production environment. 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 Summary | |
---|---|
BasicDeviceFactory()
Deprecated. Constructs a VolatileDeviceFactory |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicDeviceFactory()
Method Detail |
---|
public Device addDevice(String id, String token) throws DuplicateDeviceException, NullIdException, NullDeviceTokenException, Exception
addDevice
in interface DeviceFactory
id
- The device idtoken
- The device token
DuplicateDeviceException
NullIdException
NullDeviceTokenException
Exception
public Device getDevice(String id) throws UnknownDeviceException, NullIdException
getDevice
in interface DeviceFactory
id
- The device id
UnknownDeviceException
NullIdException
public void removeDevice(String id) throws UnknownDeviceException, NullIdException
removeDevice
in interface DeviceFactory
id
- The device id
UnknownDeviceException
NullIdException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |