Module com.zerodeplibs.webpush
Class PreparerBuilder.RequestPreparationInfo
- java.lang.Object
-
- com.zerodeplibs.webpush.httpclient.PreparerBuilder.RequestPreparationInfo
-
- Enclosing class:
- PreparerBuilder<T>
public static class PreparerBuilder.RequestPreparationInfo extends Object
Represents information which is required for an application to request the delivery of a push message.
Instances of this class are constructed with (and therefore hold) a push service url, values for HTTP header fields and an encrypted request body(if a push message is specified).
Thread Safety:Instances of this class are immutable. So they are thread-safe.
- Author:
- Tomoki Sato
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Compares the given object with this object based on their properties.Optional<EncryptedPushMessage>getEncryptedPushMessage()Gets theEncryptedPushMessage.StringgetEndpointUrl()Gets the endpoint url to which a push message is send.Optional<String>getTopic()Gets the topic.StringgetTtlString()Gets the value of TTL.StringgetUrgency()Gets the value of Urgency.StringgetVapidHeader()Gets the credential for VAPID.inthashCode()Returns the hash code value for this object based on its properties.StringtoString()
-
-
-
Method Detail
-
getEndpointUrl
public String getEndpointUrl()
Gets the endpoint url to which a push message is send.- Returns:
- the endpoint url.
-
getVapidHeader
public String getVapidHeader()
Gets the credential for VAPID. The returned value should be used to set the Authorization HTTP header field.- Returns:
- the credential for VAPID.
- See Also:
VAPIDKeyPair.generateAuthorizationHeaderValue(VAPIDJWTParam)
-
getEncryptedPushMessage
public Optional<EncryptedPushMessage> getEncryptedPushMessage()
Gets theEncryptedPushMessage. If a push message is specified at the time of the creation, an Optional containing theEncryptedPushMessageis returned.- Returns:
- an
Optionalthat may or may not contain theEncryptedPushMessage.
-
getUrgency
public String getUrgency()
Gets the value of Urgency. The returned value should be used to set the Urgency HTTP header field.- Returns:
- the value of Urgency.
-
getTopic
public Optional<String> getTopic()
Gets the topic. The value should be used to set the Topic HTTP header field. If a topic is specified at the time of the creation, an Optional containing the topic is returned.- Returns:
- an
Optionalthat may or may not contain the topic.
-
equals
public boolean equals(Object o)
Compares the given object with this object based on their properties.
-
hashCode
public int hashCode()
Returns the hash code value for this object based on its properties.
-
-