Record Class AppPushConfigs.Signer

java.lang.Object
java.lang.Record
com.iizix.server.push.engine.AppPushConfigs.Signer
Record Components:
rowAppId - The application of the row.
appId - The configuration that signs: rowAppId, or AppPushConfigs.NO_APP for a row made under the server's own key or project (RR-21 C); null when no configuration of this server can.
mismatch - Why none can, the reason of DeliveryOutcome.KEY_MISMATCH; null when appId is set.
Enclosing class:
AppPushConfigs

public static record AppPushConfigs.Signer(String rowAppId, String appId, String mismatch) extends Record
The credentials a subscription row is signed with (AppPushConfigs.signer(SubscriptionRecord)): the configuration of an application, the row's own or AppPushConfigs.NO_APP, or none.
Author:
Christopher Mindus
  • Constructor Summary

    Constructors
    Constructor
    Description
    Signer(String rowAppId, String appId, String mismatch)
    Creates an instance of a Signer record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the appId record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    explain(String reason)
    Completes a reason about the configuration that signs, saying that it is *'s when the row is another application's, so that a TRANSPORT_NOT_CONFIGURED of a row signed as * does not read as the application's.
    final int
    Returns a hash code value for this object.
    boolean
    Tells whether no configuration of this server can sign for the row.
    boolean
    Tells whether the row of an application is signed with the server's own * configuration.
    Returns the value of the mismatch record component.
    Returns the value of the rowAppId record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Signer

      public Signer(String rowAppId, String appId, String mismatch)
      Creates an instance of a Signer record class.
      Parameters:
      rowAppId - the value for the rowAppId record component
      appId - the value for the appId record component
      mismatch - the value for the mismatch record component
  • Method Details

    • isMismatch

      public boolean isMismatch()
      Tells whether no configuration of this server can sign for the row.
      Returns:
      true for KEY_MISMATCH.
    • isStar

      public boolean isStar()
      Tells whether the row of an application is signed with the server's own * configuration.
      Returns:
      true for a row made under *'s key or project for another application.
    • explain

      public String explain(String reason)
      Completes a reason about the configuration that signs, saying that it is *'s when the row is another application's, so that a TRANSPORT_NOT_CONFIGURED of a row signed as * does not read as the application's.
      Parameters:
      reason - The reason.
      Returns:
      The reason, completed when isStar().
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
    • rowAppId

      public String rowAppId()
      Returns the value of the rowAppId record component.
      Returns:
      the value of the rowAppId record component
    • appId

      public String appId()
      Returns the value of the appId record component.
      Returns:
      the value of the appId record component
    • mismatch

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