javapns.devices
Interface Device

All Known Implementing Classes:
BasicDevice

public interface Device

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

Author:
Sylvain Pedneault

Method Summary
 String getDeviceId()
          An id representing a particular device.
 Timestamp getLastRegister()
           
 String getToken()
          A device token.
 void setDeviceId(String id)
          An id representing a particular device.
 void setLastRegister(Timestamp lastRegister)
           
 void setToken(String token)
          Set the device token
 

Method Detail

getDeviceId

String getDeviceId()
An id representing a particular device. Note that this is a local reference to the device, which is not related to the actual device UUID or other device-specific identification. Most of the time, this deviceId should be the same as the token.

Returns:
the device id

getToken

String getToken()
A device token.

Returns:
the device token

getLastRegister

Timestamp getLastRegister()
Returns:
the last register

setDeviceId

void setDeviceId(String id)
An id representing a particular device. Note that this is a local reference to the device, which is not related to the actual device UUID or other device-specific identification. Most of the time, this deviceId should be the same as the token.

Parameters:
id - the device id

setToken

void setToken(String token)
Set the device token

Parameters:
token -

setLastRegister

void setLastRegister(Timestamp lastRegister)
Parameters:
lastRegister - the last register