Record Class SecurityEventLog.Context

java.lang.Object
java.lang.Record
com.iizix.server.user.SecurityEventLog.Context
Record Components:
uid - The user, null for none.
userName - The user's name, null for none.
appID - The application, null for none.
deviceID - The device, null for none.
address - The client address, null for none.
place - The place of the address, null when not known (yet).
Enclosing class:
SecurityEventLog

public static record SecurityEventLog.Context(Long uid, String userName, String appID, String deviceID, InetAddress address, String place) extends Record
The context of an event: who and where, all optional.
Author:
Christopher Mindus
  • Field Details

  • Constructor Details

    • Context

      public Context(Long uid, String userName, String appID, String deviceID, InetAddress address, String place)
      Creates an instance of a Context record class.
      Parameters:
      uid - the value for the uid record component
      userName - the value for the userName record component
      appID - the value for the appID record component
      deviceID - the value for the deviceID record component
      address - the value for the address record component
      place - the value for the place record component
  • Method Details

    • addressText

      public String addressText()
      The address as text.
      Returns:
      The text, "-" for none.
    • 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.
    • uid

      public Long uid()
      Returns the value of the uid record component.
      Returns:
      the value of the uid record component
    • userName

      public String userName()
      Returns the value of the userName record component.
      Returns:
      the value of the userName record component
    • appID

      public String appID()
      Returns the value of the appID record component.
      Returns:
      the value of the appID record component
    • deviceID

      public String deviceID()
      Returns the value of the deviceID record component.
      Returns:
      the value of the deviceID record component
    • address

      public InetAddress address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component
    • place

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