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-fcmServiceAccountFileas written, or null.fcmServiceAccount- The key file's JSON text, or null when the member is absent or the file cannot be read.vapidPrivateKeyFile-VPrivKeyFileas 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 Summary
FieldsConstructor Summary
ConstructorsConstructorDescriptionPushServerSection(String vapidPublicKey, String vapidPrivateKey, String vapidSubject, String fcmProject, String fcmServiceAccountFile, String fcmServiceAccount) Constructor without a VAPID key file: the section of an inline pair.PushServerSection(String vapidPublicKey, String vapidPrivateKey, String vapidSubject, String fcmProject, String fcmServiceAccountFile, String fcmServiceAccount, String vapidPrivateKeyFile) Creates an instance of aPushServerSectionrecord class.Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefcmProjectrecord component.Returns the value of thefcmServiceAccountrecord component.Returns the value of thefcmServiceAccountFilerecord component.final inthashCode()Returns a hash code value for this object.booleanTells whether the section sets a VAPID pair.booleanisEmpty()Tells whether every member is absent, so that the section contributes nothing.toString()Never the private key or the account.Returns the value of thevapidPrivateKeyrecord component.Returns the value of thevapidPrivateKeyFilerecord component.Returns the value of thevapidPublicKeyrecord component.Returns the value of thevapidSubjectrecord component.
Field Details
EMPTY
No section: every member absent.
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-fcmServiceAccountFileas 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 aPushServerSectionrecord class.- Parameters:
vapidPublicKey- the value for thevapidPublicKeyrecord componentvapidPrivateKey- the value for thevapidPrivateKeyrecord componentvapidSubject- the value for thevapidSubjectrecord componentfcmProject- the value for thefcmProjectrecord componentfcmServiceAccountFile- the value for thefcmServiceAccountFilerecord componentfcmServiceAccount- the value for thefcmServiceAccountrecord componentvapidPrivateKeyFile- the value for thevapidPrivateKeyFilerecord 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
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).vapidPublicKey
Returns the value of thevapidPublicKeyrecord component.- Returns:
- the value of the
vapidPublicKeyrecord component
vapidPrivateKey
Returns the value of thevapidPrivateKeyrecord component.- Returns:
- the value of the
vapidPrivateKeyrecord component
vapidSubject
Returns the value of thevapidSubjectrecord component.- Returns:
- the value of the
vapidSubjectrecord component
fcmProject
Returns the value of thefcmProjectrecord component.- Returns:
- the value of the
fcmProjectrecord component
fcmServiceAccountFile
Returns the value of thefcmServiceAccountFilerecord component.- Returns:
- the value of the
fcmServiceAccountFilerecord component
fcmServiceAccount
Returns the value of thefcmServiceAccountrecord component.- Returns:
- the value of the
fcmServiceAccountrecord component
vapidPrivateKeyFile
Returns the value of thevapidPrivateKeyFilerecord component.- Returns:
- the value of the
vapidPrivateKeyFilerecord component