Record Class LicenseCounter.Admission

java.lang.Object
java.lang.Record
com.iizix.server.user.LicenseCounter.Admission
Record Components:
verdict - The verdict.
reason - Why.
users - The users counted if the user is admitted.
maxUsers - The document's maxUsers, -1 for no limit.
ceiling - The ceiling, -1 for no limit.
graceUntil - The end of the grace episode the verdict refers to, 0 for none.
opensEpisode - true when admitting the user opens a grace episode.
refuseFrom - When new sign-ins of an unlicensed server are to be refused, 0 while licensed.
serverAdmin - true for a sign-in to the ServerAdmin application (RB-9 (a)).
refused - true when the sign-in IS refused: LicenseCounter.Verdict.REFUSE, the switch on, and not ServerAdmin.
Enclosing class:
LicenseCounter

public static record LicenseCounter.Admission(LicenseCounter.Verdict verdict, LicenseCounter.Reason reason, int users, int maxUsers, int ceiling, long graceUntil, boolean opensEpisode, long refuseFrom, boolean serverAdmin, boolean refused) extends Record
The verdict for one sign-in of a user not counted yet.
Author:
Christopher Mindus
  • Constructor Details

    • Admission

      public Admission(LicenseCounter.Verdict verdict, LicenseCounter.Reason reason, int users, int maxUsers, int ceiling, long graceUntil, boolean opensEpisode, long refuseFrom, boolean serverAdmin, boolean refused)
      Creates an instance of a Admission record class.
      Parameters:
      verdict - the value for the verdict record component
      reason - the value for the reason record component
      users - the value for the users record component
      maxUsers - the value for the maxUsers record component
      ceiling - the value for the ceiling record component
      graceUntil - the value for the graceUntil record component
      opensEpisode - the value for the opensEpisode record component
      refuseFrom - the value for the refuseFrom record component
      serverAdmin - the value for the serverAdmin record component
      refused - the value for the refused record component
  • Method Details

    • message

      public String message()
      Gets the text of the refusal: what the user is told, and the log.
      Returns:
      The text.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • verdict

      public LicenseCounter.Verdict verdict()
      Returns the value of the verdict record component.
      Returns:
      the value of the verdict record component
    • reason

      public LicenseCounter.Reason reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • users

      public int users()
      Returns the value of the users record component.
      Returns:
      the value of the users record component
    • maxUsers

      public int maxUsers()
      Returns the value of the maxUsers record component.
      Returns:
      the value of the maxUsers record component
    • ceiling

      public int ceiling()
      Returns the value of the ceiling record component.
      Returns:
      the value of the ceiling record component
    • graceUntil

      public long graceUntil()
      Returns the value of the graceUntil record component.
      Returns:
      the value of the graceUntil record component
    • opensEpisode

      public boolean opensEpisode()
      Returns the value of the opensEpisode record component.
      Returns:
      the value of the opensEpisode record component
    • refuseFrom

      public long refuseFrom()
      Returns the value of the refuseFrom record component.
      Returns:
      the value of the refuseFrom record component
    • serverAdmin

      public boolean serverAdmin()
      Returns the value of the serverAdmin record component.
      Returns:
      the value of the serverAdmin record component
    • refused

      public boolean refused()
      Returns the value of the refused record component.
      Returns:
      the value of the refused record component