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-restartspid- the game process id; changes on an auto-restartaccountId- the account's UUID (seeLauncherAccount.id())accountName- the account's display namecharacterIndex- the Steam character, orLaunchOptions.NO_CHARACTERkind- what kind of client it isorigin- who launched itlaunchedBy- the host that launched it, whenoriginisLaunchedClient.Origin.AUTOMATIONrestartOf- the previous pid, when auto-restart replaced the processstate- where the launch isstartedAtMs- when the launch started, in unix millisecondsagentSha- the SHA-256 of the agent injected into it; empty before injectionisAgentStale- whether a newer agent has been published sincelicence- 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhat kind of client it is.static final recordThe host connection that launched a client.static final recordA client's licence.static enumA licence's state; seeLaunchedClient.Licence.static enumWho launched it: the launcher's own UI, or a host over automation.static enumWhere a launch is. -
Constructor Summary
ConstructorsConstructorDescriptionLaunchedClient(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) Creates an instance of aLaunchedClientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccountIdrecord component.Returns the value of theaccountNamerecord component.agentSha()Returns the value of theagentSharecord component.intReturns the value of thecharacterIndexrecord component.clientId()Returns the value of theclientIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisAgentStalerecord component.kind()Returns the value of thekindrecord component.Returns the value of thelaunchedByrecord component.licence()Returns the value of thelicencerecord component.origin()Returns the value of theoriginrecord component.longpid()Returns the value of thepidrecord component.Returns the value of therestartOfrecord component.longReturns the value of thestartedAtMsrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LaunchedClient
public 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) Creates an instance of aLaunchedClientrecord class.- Parameters:
clientId- the value for theclientIdrecord componentpid- the value for thepidrecord componentaccountId- the value for theaccountIdrecord componentaccountName- the value for theaccountNamerecord componentcharacterIndex- the value for thecharacterIndexrecord componentkind- the value for thekindrecord componentorigin- the value for theoriginrecord componentlaunchedBy- the value for thelaunchedByrecord componentrestartOf- the value for therestartOfrecord componentstate- the value for thestaterecord componentstartedAtMs- the value for thestartedAtMsrecord componentagentSha- the value for theagentSharecord componentisAgentStale- the value for theisAgentStalerecord componentlicence- the value for thelicencerecord component
-
-
Method Details
-
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. -
clientId
-
pid
-
accountId
-
accountName
Returns the value of theaccountNamerecord component.- Returns:
- the value of the
accountNamerecord component
-
characterIndex
public int characterIndex()Returns the value of thecharacterIndexrecord component.- Returns:
- the value of the
characterIndexrecord component
-
kind
-
origin
-
launchedBy
Returns the value of thelaunchedByrecord component.- Returns:
- the value of the
launchedByrecord component
-
restartOf
-
state
-
startedAtMs
public long startedAtMs()Returns the value of thestartedAtMsrecord component.- Returns:
- the value of the
startedAtMsrecord component
-
agentSha
-
isAgentStale
public boolean isAgentStale()Returns the value of theisAgentStalerecord component.- Returns:
- the value of the
isAgentStalerecord component
-
licence
-