Class VAPIDEnvelope
java.lang.Object
org.deltava.mail.VAPIDEnvelope
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<NotificationEnvelope<?>>
,NotificationEnvelope<PushEndpoint>
An envelope for VAPID messages.
- Since:
- 10.0
- Version:
- 10.6
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.deltava.beans.NotificationEnvelope
NotificationEnvelope.Protocol
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the audience used to generate the JWT for this message.getBody()
Returns the message body.Returns the envelope creation date.Returns the destination address.Returns the expiration time of this Envelope within the VAPID service.Returns this envelope's notification protocol.getToken()
Returns the JWT token.void
Updates the message body.void
Updates the expiration time of this Envelope within the VAPID service.void
Updates the JWT token used to authenticate this message.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.deltava.beans.NotificationEnvelope
compareTo
-
Constructor Details
-
VAPIDEnvelope
Creates the envelope.- Parameters:
ep
- the PushEndpoint to send to
-
-
Method Details
-
getAudience
Returns the audience used to generate the JWT for this message.- Returns:
- the procotol/domain
-
getBody
-
getCreatedOn
Description copied from interface:NotificationEnvelope
Returns the envelope creation date.- Specified by:
getCreatedOn
in interfaceNotificationEnvelope<PushEndpoint>
- Returns:
- the creation date/time
-
getEndpoint
Description copied from interface:NotificationEnvelope
Returns the destination address.- Specified by:
getEndpoint
in interfaceNotificationEnvelope<PushEndpoint>
- Returns:
- the address
-
getProtocol
Description copied from interface:NotificationEnvelope
Returns this envelope's notification protocol.- Specified by:
getProtocol
in interfaceNotificationEnvelope<PushEndpoint>
- Returns:
- the Protocol
-
getExpiryTime
Returns the expiration time of this Envelope within the VAPID service.- Returns:
- the expiration date/time
-
getToken
-
setBody
-
setToken
Updates the JWT token used to authenticate this message.- Parameters:
jwt
- the JWT token
-
setExpirationTime
Updates the expiration time of this Envelope within the VAPID service. The expiration time must be non-null and after the creation time.- Parameters:
dt
- the expiration date/time
-