|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavapns.devices.implementations.basic.BasicDevice
public class BasicDevice
This class is used to represent a Device (iPhone)
Constructor Summary | |
---|---|
BasicDevice()
|
|
BasicDevice(String token)
Default constructor. |
|
BasicDevice(String token,
boolean validate)
|
|
BasicDevice(String id,
String token,
Timestamp register)
Constructor |
Method Summary | |
---|---|
String |
getDeviceId()
Getter |
Timestamp |
getLastRegister()
Getter |
String |
getToken()
Getter |
void |
setDeviceId(String id)
Setter |
void |
setLastRegister(Timestamp lastRegister)
|
void |
setToken(String token)
Setter the device token |
void |
validateTokenFormat()
|
static void |
validateTokenFormat(String token)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicDevice(String token) throws InvalidDeviceTokenFormatException
token
- The device token
InvalidDeviceTokenFormatException
public BasicDevice(String token, boolean validate) throws InvalidDeviceTokenFormatException
InvalidDeviceTokenFormatException
public BasicDevice()
public BasicDevice(String id, String token, Timestamp register) throws InvalidDeviceTokenFormatException
id
- The device idtoken
- The device token
InvalidDeviceTokenFormatException
Method Detail |
---|
public void validateTokenFormat() throws InvalidDeviceTokenFormatException
InvalidDeviceTokenFormatException
public static void validateTokenFormat(String token) throws InvalidDeviceTokenFormatException
InvalidDeviceTokenFormatException
public String getDeviceId()
getDeviceId
in interface Device
public String getToken()
getToken
in interface Device
public Timestamp getLastRegister()
getLastRegister
in interface Device
public void setDeviceId(String id)
setDeviceId
in interface Device
id
- the device idpublic void setToken(String token)
setToken
in interface Device
token
- public void setLastRegister(Timestamp lastRegister)
setLastRegister
in interface Device
lastRegister
- the last register
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |