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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
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.IMMEDIATE
public 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.IMMEDIATE
public 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 String getToken()
getToken
in interface ApnsPushNotification
public String getPayload()
getPayload
in interface ApnsPushNotification
public Date getExpiration()
getExpiration
in interface ApnsPushNotification
public DeliveryPriority getPriority()
getPriority
in interface ApnsPushNotification
public String getTopic()
getTopic
in interface ApnsPushNotification
Copyright © 2013–2016 RelayRides. All rights reserved.