Enum Class PushTransport
- All Implemented Interfaces:
Serializable, Comparable<PushTransport>, Constable
The transport is a property of the subscription a notification lands on, never of the notification: a browser registers a Web Push subscription and is reached by VAPID, a Cordova app registers a Firebase token and is reached by FCM. The client names the transport by the member it puts in the s object of /iizi-push/subscribe - v, fc or i - which is wireKey.
APNS is held (ruling 1, 2026-09-06): the constant exists so that a subscription registered with a raw APNs token keeps its identity in storage and in listings, but no transport implements it and a send to it reports DeliveryOutcome.TRANSPORT_NOT_CONFIGURED with a reason string. iOS devices are reached through FCM.
Persistence note. The ordinal() of a constant is what the subscription table stores in its provider column and what a listing may carry on the wire. The order of these constants is therefore part of the persisted and wire contract: new constants MUST be appended at the end, never inserted or reordered, or a stored value silently changes meaning.
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsField Summary
FieldsMethod Summary
Modifier and TypeMethodDescriptionstatic PushTransportfromOrdinal(int ordinal) Gets the transport for a stored ordinal, guarding the index so that a corrupt stored value never throws.static PushTransportfromWireKey(String wireKey) Gets the transport for the client's member name.static PushTransportReturns the enum constant of this class with the specified name.static PushTransport[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
VAPID
Web Push (RFC 8030) with VAPID (RFC 8292) and aes128gcm content encryption (RFC 8291): browsers and PWAs, through a service worker.FCM
Firebase Cloud Messaging, HTTP v1 API: Cordova and native iiziRun on Android and iOS.APNS
Apple Push Notification service, native. HELD: present for identity, not implemented.
Field Details
wireKey
The member name the client uses for this transport in thesobject of a subscription:v,fcori.
Method Details
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
fromOrdinal
Gets the transport for a stored ordinal, guarding the index so that a corrupt stored value never throws.- Parameters:
ordinal- The stored ordinal.- Returns:
- The transport, or
nullwhen the ordinal is outside the constant set.
fromWireKey
Gets the transport for the client's member name.- Parameters:
wireKey- The member name:v,fcori.- Returns:
- The transport, or
nullfor an unknown name.