|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.notnoop.apns.EnhancedApnsNotification
public class EnhancedApnsNotification
Represents an APNS notification to be sent to Apple service.
| Field Summary | |
|---|---|
static Date |
MAXIMUM_DATE
The infinite future for the purposes of Apple expiry date |
static int |
MAXIMUM_EXPIRY
The infinite future for the purposes of Apple expiry date |
| Constructor Summary | |
|---|---|
EnhancedApnsNotification(int identifier,
int expiryTime,
byte[] dtoken,
byte[] payload)
Constructs an instance of ApnsNotification. |
|
EnhancedApnsNotification(int identifier,
int expiryTime,
String dtoken,
String payload)
Constructs an instance of ApnsNotification. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
byte[] |
getDeviceToken()
Returns the binary representation of the device token. |
int |
getExpiry()
Returns the expiry date of the notification, a fixed UNIX epoch date expressed in seconds |
int |
getIdentifier()
Returns the identifier of the current message. |
byte[] |
getPayload()
Returns the binary representation of the payload. |
int |
hashCode()
|
static int |
INCREMENT_ID()
|
int |
length()
Returns the length of the message in bytes as it is encoded on the wire. |
byte[] |
marshall()
Returns the binary representation of the message as expected by the APNS server. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAXIMUM_EXPIRY
public static final Date MAXIMUM_DATE
| Constructor Detail |
|---|
public EnhancedApnsNotification(int identifier,
int expiryTime,
String dtoken,
String payload)
ApnsNotification.
The message encodes the payload with a UTF-8 encoding.
dtoken - The Hex of the device token of the destination phonepayload - The payload message to be sent
public EnhancedApnsNotification(int identifier,
int expiryTime,
byte[] dtoken,
byte[] payload)
ApnsNotification.
dtoken - The binary representation of the destination device tokenpayload - The binary representation of the payload to be sent| Method Detail |
|---|
public static int INCREMENT_ID()
public byte[] getDeviceToken()
getDeviceToken in interface ApnsNotificationpublic byte[] getPayload()
getPayload in interface ApnsNotificationpublic int getIdentifier()
ApnsNotification
getIdentifier in interface ApnsNotificationpublic int getExpiry()
ApnsNotification
getExpiry in interface ApnsNotificationpublic byte[] marshall()
marshall in interface ApnsNotificationpublic int length()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||