CommandBroker

class CommandBroker(serverConfig: ServerConfig, logger: Logger? = null) : Broker

This broker is designed to run raw commands on the backend to create a server. The resulting PID is then managed as if it were a valid server.

Constructors

Link copied to clipboard
constructor(serverConfig: ServerConfig, logger: Logger? = null)

Functions

Link copied to clipboard
open override fun address(): Result<InetSocketAddress>

Get the address of the server

Link copied to clipboard
open override fun getStatus(): Status

Get the status of the server

Link copied to clipboard
open override fun isRunning(): Boolean

Check if the server is running

Link copied to clipboard
open override fun reconcile(config: ServerConfig): Result<Runnable?>

Reconcile any changes to our configuration.

Link copied to clipboard
open override fun removeServer(): Result<Unit>

Attempt to remove the server

Link copied to clipboard
open override fun startServer(): Result<Unit>

Attempt to start the server if it is not already running

Link copied to clipboard
open override fun stopServer(): Result<Unit>

Attempt to stop the server if it is running