public class SimpleApnsPushNotification extends Object implements ApnsPushNotification
ApnsPushNotification
interface.ApnsPayloadBuilder
,
TokenUtil
Constructor and Description |
---|
SimpleApnsPushNotification(byte[] token,
String payload)
Constructs a new push notification with the given token and payload.
|
SimpleApnsPushNotification(byte[] token,
String payload,
Date invalidationTime)
Constructs a new push notification with the given token, payload, and expiration time.
|
SimpleApnsPushNotification(byte[] token,
String payload,
Date invalidationTime,
DeliveryPriority priority)
Constructs a new push notification with the given token, payload, delivery expiration time, and delivery
priority.
|
SimpleApnsPushNotification(byte[] token,
String payload,
DeliveryPriority priority)
Constructs a new push notification with the given token, payload, and delivery priority.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Date |
getDeliveryInvalidationTime()
Returns the time at which this push notification is no longer valid and should no longer be delivered.
|
String |
getPayload()
Returns the payload to include in this push notification.
|
DeliveryPriority |
getPriority()
Returns the priority with which this push notification should be delivered to the receiving device.
|
byte[] |
getToken()
Returns the token of the device to which this push notification should be delivered.
|
int |
hashCode() |
String |
toString() |
public SimpleApnsPushNotification(byte[] token, String payload)
token
- the device token to which this push notification should be deliveredpayload
- the payload to include in this push notificationDeliveryPriority.IMMEDIATE
public SimpleApnsPushNotification(byte[] token, String payload, Date invalidationTime)
token
- the device token to which this push notification should be deliveredpayload
- the payload to include in this push notificationinvalidationTime
- the time at which Apple's servers should stop trying to deliver this message; if
null
, no delivery attempts beyond the first will be madeDeliveryPriority.IMMEDIATE
public SimpleApnsPushNotification(byte[] token, String payload, DeliveryPriority priority)
token
- the device token to which this push notification should be deliveredpayload
- the payload to include in this push notificationpriority
- the priority with which this notification should be delivered to the receiving devicepublic SimpleApnsPushNotification(byte[] token, String payload, Date invalidationTime, DeliveryPriority priority)
token
- the device token to which this push notification should be deliveredpayload
- the payload to include in this push notificationinvalidationTime
- the time at which Apple's servers should stop trying to deliver this message; if
null
, no delivery attempts beyond the first will be madepriority
- the priority with which this notification should be delivered to the receiving devicepublic byte[] getToken()
getToken
in interface ApnsPushNotification
public String getPayload()
getPayload
in interface ApnsPushNotification
public Date getDeliveryInvalidationTime()
getDeliveryInvalidationTime
in interface ApnsPushNotification
public DeliveryPriority getPriority()
getPriority
in interface ApnsPushNotification
Copyright © 2013–2015 RelayRides. All rights reserved.