Record Class LaunchedClient

java.lang.Object
java.lang.Record
com.botwithus.bot.api.script.LaunchedClient
Record Components:
clientId - the service's id; stable across auto-restarts
pid - the game process id; changes on an auto-restart
accountId - the account's UUID (see LauncherAccount.id())
accountName - the account's display name
characterIndex - the Steam character, or LaunchOptions.NO_CHARACTER
kind - what kind of client it is
origin - who launched it
launchedBy - the host that launched it, when origin is LaunchedClient.Origin.AUTOMATION
restartOf - the previous pid, when auto-restart replaced the process
state - where the launch is
startedAtMs - when the launch started, in unix milliseconds
agentSha - the SHA-256 of the agent injected into it; empty before injection
isAgentStale - whether a newer agent has been published since
licence - the state of its licence

public record LaunchedClient(String clientId, long pid, String accountId, String accountName, int characterIndex, LaunchedClient.Kind kind, LaunchedClient.Origin origin, Optional<LaunchedClient.LaunchedBy> launchedBy, OptionalLong restartOf, LaunchedClient.State state, long startedAtMs, String agentSha, boolean isAgentStale, LaunchedClient.Licence licence) extends Record
A client the launcher service manages, as it reported it.
  • Constructor Details

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

      public String clientId()
      Returns the value of the clientId record component.
      Returns:
      the value of the clientId record component
    • pid

      public long pid()
      Returns the value of the pid record component.
      Returns:
      the value of the pid record component
    • accountId

      public String accountId()
      Returns the value of the accountId record component.
      Returns:
      the value of the accountId record component
    • accountName

      public String accountName()
      Returns the value of the accountName record component.
      Returns:
      the value of the accountName record component
    • characterIndex

      public int characterIndex()
      Returns the value of the characterIndex record component.
      Returns:
      the value of the characterIndex record component
    • kind

      public LaunchedClient.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • origin

      public LaunchedClient.Origin origin()
      Returns the value of the origin record component.
      Returns:
      the value of the origin record component
    • launchedBy

      public Optional<LaunchedClient.LaunchedBy> launchedBy()
      Returns the value of the launchedBy record component.
      Returns:
      the value of the launchedBy record component
    • restartOf

      public OptionalLong restartOf()
      Returns the value of the restartOf record component.
      Returns:
      the value of the restartOf record component
    • state

      public LaunchedClient.State state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • startedAtMs

      public long startedAtMs()
      Returns the value of the startedAtMs record component.
      Returns:
      the value of the startedAtMs record component
    • agentSha

      public String agentSha()
      Returns the value of the agentSha record component.
      Returns:
      the value of the agentSha record component
    • isAgentStale

      public boolean isAgentStale()
      Returns the value of the isAgentStale record component.
      Returns:
      the value of the isAgentStale record component
    • licence

      public LaunchedClient.Licence licence()
      Returns the value of the licence record component.
      Returns:
      the value of the licence record component