Record Class PushServerSection

java.lang.Object
java.lang.Record
com.iizix.server.push.engine.PushServerSection
Record Components:
vapidPublicKey - VPubKey, base64url, or null when the section sets no pair.
vapidPrivateKey - VPrivKey, base64url, or null; both keys or neither (S-2).
vapidSubject - VSubject, or null.
fcmProject - fcmProject, or null.
fcmServiceAccountFile - fcmServiceAccountFile as written, or null.
fcmServiceAccount - The key file's JSON text, or null when the member is absent or the file cannot be read.
vapidPrivateKeyFile - VPrivKeyFile as written, or null.

public record PushServerSection(String vapidPublicKey, String vapidPrivateKey, String vapidSubject, String fcmProject, String fcmServiceAccountFile, String fcmServiceAccount, String vapidPrivateKeyFile) extends Record
The [server] section of the Push Notification (PN) credentials file (PUSH-CREDENTIALS.md section 3.6, ruled 2026-09-26): the PN configuration of application ID *, the iiziRun clients that have chosen no application - iiziRun Developer in a Browser (VAPID) and on a device (FCM). Resolved at use by ServerPushKeys, member by member (S-4): a member present here wins, an absent one falls through to the server settings' $push child, and the VAPID pair falls through once more to the generated spool pair.

The members are named as PushProps names them: VPubKey, VPrivKey, VSubject, fcmProject; fcmServiceAccountFile is the PATH of Google's service-account key file, whose text is read when a send needs it and carried here as fcmServiceAccount() - null when the file is missing or unreadable, which the credentials log SEVERE and the FCM transport reports as not configured (S-3); VPrivKeyFile is the PATH of a VAPID key file (PUSH-KEYFILES-DESIGN.md 9.1, ruling K-7), whose pair is read the same way and carried as vapidPublicKey() and vapidPrivateKey() - both null when the file cannot be used, in which case the reference still wins and VAPID for * is not configured.

The record never prints the private key or the service account.

Author:
Christopher Mindus
  • Field Details

  • Constructor Details

    • PushServerSection

      public PushServerSection(String vapidPublicKey, String vapidPrivateKey, String vapidSubject, String fcmProject, String fcmServiceAccountFile, String fcmServiceAccount)
      Constructor without a VAPID key file: the section of an inline pair.
      Parameters:
      vapidPublicKey - VPubKey, or null.
      vapidPrivateKey - VPrivKey, or null.
      vapidSubject - VSubject, or null.
      fcmProject - fcmProject, or null.
      fcmServiceAccountFile - fcmServiceAccountFile as written, or null.
      fcmServiceAccount - The key file's JSON text, or null.
    • PushServerSection

      public PushServerSection(String vapidPublicKey, String vapidPrivateKey, String vapidSubject, String fcmProject, String fcmServiceAccountFile, String fcmServiceAccount, String vapidPrivateKeyFile)
      Creates an instance of a PushServerSection record class.
      Parameters:
      vapidPublicKey - the value for the vapidPublicKey record component
      vapidPrivateKey - the value for the vapidPrivateKey record component
      vapidSubject - the value for the vapidSubject record component
      fcmProject - the value for the fcmProject record component
      fcmServiceAccountFile - the value for the fcmServiceAccountFile record component
      fcmServiceAccount - the value for the fcmServiceAccount record component
      vapidPrivateKeyFile - the value for the vapidPrivateKeyFile record component
  • Method Details

    • hasVapidPair

      public boolean hasVapidPair()
      Tells whether the section sets a VAPID pair.
      Returns:
      true when both keys are present.
    • isEmpty

      public boolean isEmpty()
      Tells whether every member is absent, so that the section contributes nothing.
      Returns:
      true for an empty section.
    • toString

      public String toString()
      Never the private key or the account.
      Specified by:
      toString in class Record
      Returns:
      The public members.
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • vapidPublicKey

      public String vapidPublicKey()
      Returns the value of the vapidPublicKey record component.
      Returns:
      the value of the vapidPublicKey record component
    • vapidPrivateKey

      public String vapidPrivateKey()
      Returns the value of the vapidPrivateKey record component.
      Returns:
      the value of the vapidPrivateKey record component
    • vapidSubject

      public String vapidSubject()
      Returns the value of the vapidSubject record component.
      Returns:
      the value of the vapidSubject record component
    • fcmProject

      public String fcmProject()
      Returns the value of the fcmProject record component.
      Returns:
      the value of the fcmProject record component
    • fcmServiceAccountFile

      public String fcmServiceAccountFile()
      Returns the value of the fcmServiceAccountFile record component.
      Returns:
      the value of the fcmServiceAccountFile record component
    • fcmServiceAccount

      public String fcmServiceAccount()
      Returns the value of the fcmServiceAccount record component.
      Returns:
      the value of the fcmServiceAccount record component
    • vapidPrivateKeyFile

      public String vapidPrivateKeyFile()
      Returns the value of the vapidPrivateKeyFile record component.
      Returns:
      the value of the vapidPrivateKeyFile record component