Package com.iizix.push.vapid
Class Notification
java.lang.Object
com.iizix.push.vapid.Notification
Nested Class Summary
Constructor Summary
ConstructorDescriptionNotification
(Subscription subscription, String payload) Notification
(Subscription subscription, String payload, Urgency urgency) Notification
(String endpoint, String userPublicKey, String userAuth, byte[] payload) Notification
(String endpoint, String userPublicKey, String userAuth, byte[] payload, int ttl) Notification
(String endpoint, String userPublicKey, String userAuth, String payload) Notification
(String endpoint, String userPublicKey, String userAuth, String payload, Urgency urgency) Notification
(String endpoint, PublicKey userPublicKey, byte[] userAuth, byte[] payload) Notification
(String endpoint, PublicKey userPublicKey, byte[] userAuth, byte[] payload, int ttl) Notification
(String endpoint, ECPublicKey userPublicKey, byte[] userAuth, byte[] payload, int ttl, Urgency urgency, String topic) Method Summary
Constructor Details
Notification
public Notification(String endpoint, ECPublicKey userPublicKey, byte[] userAuth, byte[] payload, int ttl, Urgency urgency, String topic) Notification
Notification
public Notification(String endpoint, String userPublicKey, String userAuth, byte[] payload, int ttl) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException Notification
Notification
public Notification(String endpoint, String userPublicKey, String userAuth, byte[] payload) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException Notification
public Notification(String endpoint, String userPublicKey, String userAuth, String payload) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException Notification
public Notification(String endpoint, String userPublicKey, String userAuth, String payload, Urgency urgency) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException Notification
public Notification(Subscription subscription, String payload) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException Notification
public Notification(Subscription subscription, String payload, Urgency urgency) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException
Method Details
getEndpoint
getUserPublicKey
getUserAuth
public byte[] getUserAuth()getPayload
public byte[] getPayload()hasPayload
public boolean hasPayload()hasUrgency
public boolean hasUrgency()hasTopic
public boolean hasTopic()isGcm
public boolean isGcm()Detect if the notification is for a GCM-based subscription- Returns:
isFcm
public boolean isFcm()getTTL
public int getTTL()getUrgency
getTopic
getOrigin
- Throws:
MalformedURLException
builder