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 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.voidUpdates the message body.voidUpdates the expiration time of this Envelope within the VAPID service.voidUpdates the JWT token used to authenticate this message.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:NotificationEnvelopeReturns the envelope creation date.- Specified by:
getCreatedOnin interfaceNotificationEnvelope<PushEndpoint>- Returns:
- the creation date/time
-
getEndpoint
Description copied from interface:NotificationEnvelopeReturns the destination address.- Specified by:
getEndpointin interfaceNotificationEnvelope<PushEndpoint>- Returns:
- the address
-
getProtocol
Description copied from interface:NotificationEnvelopeReturns this envelope's notification protocol.- Specified by:
getProtocolin 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
-