Record Class AccountNotices.Context

java.lang.Object
java.lang.Record
com.iizix.server.user.AccountNotices.Context
Record Components:
address - The client address as text, null when unknown.
place - The approximate place (the city, region and country the address resolves to), null when unknown.
base - The base of the mailed links as https://host[:port], null when unknown.
device - The device line, e.g. "Browser, Windows" or "Apple iPhone15,2 (iOS 26.1)", null when unknown.
Enclosing class:
AccountNotices

public static record AccountNotices.Context(String address, String place, String base, String device) extends Record
Where the change was made from: the client address and the approximate place, each null when unknown, the base of the links the mail carries - the origin the client session reached the server by, else the server's configured external URL (MailLinkBase, R-145), null when neither is known - and the device line the server has for the session (ClientDeviceName), null when unknown.
Author:
Christopher Mindus
  • Field Details

  • Constructor Details

    • Context

      public Context(String address, String place)
      A context without a link base and a device: the address and the place.
      Parameters:
      address - The client address as text, null when unknown.
      place - The approximate place, null when unknown.
    • Context

      public Context(String address, String place, String base)
      A context without a device: the address, the place and the link base.
      Parameters:
      address - The client address as text, null when unknown.
      place - The approximate place, null when unknown.
      base - The base of the mailed links, null when unknown.
    • Context

      public Context(String address, String place, String base, String device)
      Creates an instance of a Context record class.
      Parameters:
      address - the value for the address record component
      place - the value for the place record component
      base - the value for the base record component
      device - the value for the device record component
  • Method Details

    • 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.
    • address

      public String 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
    • base

      public String base()
      Returns the value of the base record component.
      Returns:
      the value of the base record component
    • device

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