public class SimpleApnsPushNotification extends Object implements ApnsPushNotification
ApnsPushNotification interface.ApnsPayloadBuilder| Constructor and Description |
|---|
SimpleApnsPushNotification(String token,
String topic,
String payload)
Constructs a new push notification with the given token, topic, and payload.
|
SimpleApnsPushNotification(String token,
String topic,
String payload,
Date invalidationTime)
Constructs a new push notification with the given token, topic, payload, and expiration time.
|
SimpleApnsPushNotification(String token,
String topic,
String payload,
Date invalidationTime,
DeliveryPriority priority)
Constructs a new push notification with the given token, topic, payload, delivery expiration time, and delivery
priority.
|
SimpleApnsPushNotification(String token,
String topic,
String payload,
Date invalidationTime,
DeliveryPriority priority,
String collapseId)
Constructs a new push notification with the given token, topic, payload, delivery expiration time, delivery
priority, and "collapse identifier."
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getCollapseId()
Returns the "collapse ID" for this push notification, which allows it to supersede or be superseded by other
notifications with the same ID.
|
Date |
getExpiration()
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.
|
String |
getToken()
Returns the token of the device to which this push notification should be delivered.
|
String |
getTopic()
Returns the topic to which this push notification should be sent.
|
int |
hashCode() |
String |
toString() |
public SimpleApnsPushNotification(String token, String topic, String payload)
token - the device token to which this push notification should be deliveredtopic - the topic to which this notification should be sentpayload - the payload to include in this push notificationDeliveryPriority.IMMEDIATEpublic SimpleApnsPushNotification(String token, String topic, String payload, Date invalidationTime)
token - the device token to which this push notification should be deliveredtopic - the topic to which this notification should be sentpayload - 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.IMMEDIATEpublic SimpleApnsPushNotification(String token, String topic, String payload, Date invalidationTime, DeliveryPriority priority)
token - the device token to which this push notification should be deliveredtopic - the topic to which this notification should be sentpayload - 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 SimpleApnsPushNotification(String token, String topic, String payload, Date invalidationTime, DeliveryPriority priority, String collapseId)
token - the device token to which this push notification should be delivered; must not be nulltopic - the topic to which this notification should be sent; must not be nullpayload - the payload to include in this push notification; must not be nullinvalidationTime - 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 devicecollapseId - the "collapse identifier" for this notification, which allows it to supersede or be superseded
by other notifications with the same identifierpublic String getToken()
getToken in interface ApnsPushNotificationpublic String getPayload()
getPayload in interface ApnsPushNotificationpublic Date getExpiration()
getExpiration in interface ApnsPushNotificationpublic DeliveryPriority getPriority()
getPriority in interface ApnsPushNotificationpublic String getTopic()
getTopic in interface ApnsPushNotificationpublic String getCollapseId()
getCollapseId in interface ApnsPushNotificationCopyright © 2013–2018 Turo. All rights reserved.