Record Class PushSendOptions
java.lang.Object
java.lang.Record
com.iizix.push.PushSendOptions
- Record Components:
timeToLive- How long the push services should keep trying, ornullfor the default.urgency- The delivery urgency, ornullforDeliveryUrgency.DEFAULT.deliveryMode- In-session, device or both, ornullforIPushSettings.getDefaultDeliveryMode().
public record PushSendOptions(Duration timeToLive, DeliveryUrgency urgency, DeliveryMode deliveryMode) extends Record
The per-send options of the Push Notification API. Every component may be
null, meaning the default; null for the whole options argument means every default.The time-to-live is a Duration, so no caller has to know that the wire and the transports count seconds (ruling R10, RFC 8030) while the engine counts milliseconds (IPushNotification.getTimeToLiveMillis()). A timeToLive here overrides the notification's own. Its range is one minute to 28 days, the bounds of IPushSettings; a value outside it is refused with IllegalArgumentException by the method it is passed to, never clamped silently. null means the application's TTL property in its .iiziPush, and 28 days when the application has none.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsConstructorDescriptionPushSendOptions(Duration timeToLive, DeliveryUrgency urgency, DeliveryMode deliveryMode) Creates an instance of aPushSendOptionsrecord class.Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeliveryModerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thetimeToLiverecord component.final StringtoString()Returns a string representation of this record class.urgency()Returns the value of theurgencyrecord component.
Constructor Details
PushSendOptions
Creates an instance of aPushSendOptionsrecord class.- Parameters:
timeToLive- the value for thetimeToLiverecord componenturgency- the value for theurgencyrecord componentdeliveryMode- the value for thedeliveryModerecord component
Method Details
toString
hashCode
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).timeToLive
Returns the value of thetimeToLiverecord component.- Returns:
- the value of the
timeToLiverecord component
urgency
deliveryMode
Returns the value of thedeliveryModerecord component.- Returns:
- the value of the
deliveryModerecord component