Package com.vaadin.flow.server.webpush
Record Class WebPushSubscription
java.lang.Object
java.lang.Record
com.vaadin.flow.server.webpush.WebPushSubscription
- Record Components:
endpoint- a custom URL pointing to a push server, which can be used to send a push message to the particular service worker instance that subscribed to the push service. For this reason, it is a good idea to keep your endpoint a secret, so others do not hijack it and abuse the push functionality.keys- an object containing the keys that used to encrypt the payload.
- All Implemented Interfaces:
Serializable
public record WebPushSubscription(String endpoint, WebPushKeys keys)
extends Record
implements Serializable
Represents a Web Push subscription that Push Manager gives back, when a user
subscribes to push notifications in browser.
-
Constructor Summary
ConstructorsConstructorDescriptionWebPushSubscription(String endpoint, WebPushKeys keys) Creates an instance of aWebPushSubscriptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionendpoint()Returns the value of theendpointrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.keys()Returns the value of thekeysrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
endpoint
Returns the value of theendpointrecord component.- Returns:
- the value of the
endpointrecord component
-
keys
Returns the value of thekeysrecord component.- Returns:
- the value of the
keysrecord component
-