public class EnhancedApnsNotification extends Object implements ApnsNotification
Modifier and Type | Field and Description |
---|---|
static int |
MAXIMUM_EXPIRY
The infinite future for the purposes of Apple expiry date
|
Constructor and Description |
---|
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 . |
Modifier and Type | Method and Description |
---|---|
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() |
public static final int MAXIMUM_EXPIRY
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 sentpublic 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 sentpublic static int INCREMENT_ID()
public byte[] getDeviceToken()
getDeviceToken
in interface ApnsNotification
public byte[] getPayload()
getPayload
in interface ApnsNotification
public int getIdentifier()
ApnsNotification
getIdentifier
in interface ApnsNotification
public int getExpiry()
ApnsNotification
getExpiry
in interface ApnsNotification
public byte[] marshall()
marshall
in interface ApnsNotification
public int length()
Copyright © 2015. All rights reserved.