Enum Class PushTransport

java.lang.Object
java.lang.Enum<PushTransport>
com.iizix.push.PushTransport
All Implemented Interfaces:
Serializable, Comparable<PushTransport>, Constable

public enum PushTransport extends Enum<PushTransport>
The device push transports, i.e. the third-party store-and-forward services a notification is handed to when it is not delivered in-session.

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
  • Enum Constant Details

    • VAPID

      public static final PushTransport VAPID
      Web Push (RFC 8030) with VAPID (RFC 8292) and aes128gcm content encryption (RFC 8291): browsers and PWAs, through a service worker.
    • FCM

      public static final PushTransport FCM
      Firebase Cloud Messaging, HTTP v1 API: Cordova and native iiziRun on Android and iOS.
    • APNS

      public static final PushTransport APNS
      Apple Push Notification service, native. HELD: present for identity, not implemented.
  • Field Details

    • wireKey

      public final String wireKey
      The member name the client uses for this transport in the s object of a subscription: v, fc or i.
  • Method Details

    • values

      public static PushTransport[] 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

      public static PushTransport valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromOrdinal

      public static PushTransport fromOrdinal(int ordinal)
      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 null when the ordinal is outside the constant set.
    • fromWireKey

      public static PushTransport fromWireKey(String wireKey)
      Gets the transport for the client's member name.
      Parameters:
      wireKey - The member name: v, fc or i.
      Returns:
      The transport, or null for an unknown name.