Interface ClientLauncher


public interface ClientLauncher
Launches, stops and watches game clients through the BotWithUs launcher's background service. A ManagementScript reaches it through ManagementContext.clientLauncher().

Every call is a round trip to the service. A call that fails throws LauncherException; its code is what to branch on. Two codes are raised by the host itself, because no service answered: LauncherException.SERVICE_UNAVAILABLE (the service is not running, is restarting, or did not answer in time) and LauncherException.SERVICE_STOPPED (the user stopped it from the tray). The host never starts the service; it keeps reconnecting while it runs.

Scope. A script that does not manage the whole host sees only the accounts and clients its targets cover. Unlike the ClientOrchestrator, which answers an out-of-scope call with a failed result, this interface throws LauncherException.NOT_PERMITTED: every other failure here is an exception too, so one more kind of refusal is reported the same way. A script paused on a group may still see and stop that group's clients, but may not launch one.

After the service comes back (a LauncherEvent.ServiceRestored event), events sent while it was away are gone and none are replayed. Call clients() to see where things stand.