javapns.devices
Interface DeviceFactory

All Known Implementing Classes:
BasicDeviceFactory

Deprecated. Phasing out DeviceFactory because it has become irrelevant in the new library architecture

@Deprecated
public interface DeviceFactory

This is the common interface for all DeviceFactories. It allows the PushNotificationManager to support multiple implementations of DeviceFactory (in-memory, JPA-backed, etc.)

Author:
Sylvain Pedneault

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
 

Method Detail

addDevice

Device addDevice(String id,
                 String token)
                 throws DuplicateDeviceException,
                        NullIdException,
                        NullDeviceTokenException,
                        Exception
Deprecated. 
Add a device to the map

Parameters:
id - The local device id
token - The device token
Returns:
The device created
Throws:
DuplicateDeviceException
NullIdException
NullDeviceTokenException
Exception

getDevice

Device getDevice(String id)
                 throws UnknownDeviceException,
                        NullIdException
Deprecated. 
Get a device according to his id

Parameters:
id - The local device id
Returns:
The device
Throws:
UnknownDeviceException
NullIdException

removeDevice

void removeDevice(String id)
                  throws UnknownDeviceException,
                         NullIdException
Deprecated. 
Remove a device

Parameters:
id - The local device id
Throws:
UnknownDeviceException
NullIdException