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'smaxUsers, -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 Summary
ConstructorsConstructorDescriptionAdmission(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 aAdmissionrecord class.Method Summary
Modifier and TypeMethodDescriptionintceiling()Returns the value of theceilingrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thegraceUntilrecord component.final inthashCode()Returns a hash code value for this object.intmaxUsers()Returns the value of themaxUsersrecord component.message()Gets the text of the refusal: what the user is told, and the log.booleanReturns the value of theopensEpisoderecord component.reason()Returns the value of thereasonrecord component.booleanrefused()Returns the value of therefusedrecord component.longReturns the value of therefuseFromrecord component.booleanReturns the value of theserverAdminrecord component.final StringtoString()Returns a string representation of this record class.intusers()Returns the value of theusersrecord component.verdict()Returns the value of theverdictrecord component.
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 aAdmissionrecord class.- Parameters:
verdict- the value for theverdictrecord componentreason- the value for thereasonrecord componentusers- the value for theusersrecord componentmaxUsers- the value for themaxUsersrecord componentceiling- the value for theceilingrecord componentgraceUntil- the value for thegraceUntilrecord componentopensEpisode- the value for theopensEpisoderecord componentrefuseFrom- the value for therefuseFromrecord componentserverAdmin- the value for theserverAdminrecord componentrefused- the value for therefusedrecord component
Method Details
message
Gets the text of the refusal: what the user is told, and the log.- Returns:
- The text.
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes.verdict
reason
users
maxUsers
ceiling
graceUntil
public long graceUntil()Returns the value of thegraceUntilrecord component.- Returns:
- the value of the
graceUntilrecord component
opensEpisode
public boolean opensEpisode()Returns the value of theopensEpisoderecord component.- Returns:
- the value of the
opensEpisoderecord component
refuseFrom
public long refuseFrom()Returns the value of therefuseFromrecord component.- Returns:
- the value of the
refuseFromrecord component
serverAdmin
public boolean serverAdmin()Returns the value of theserverAdminrecord component.- Returns:
- the value of the
serverAdminrecord component
refused