MillDaemonServer

mill.server.MillDaemonServer
See theMillDaemonServer companion object
abstract class MillDaemonServer[State](daemonDir: Path, acceptTimeout: FiniteDuration, locks: Locks, testLogEvenWhenServerIdWrong: Boolean) extends ProxyStreamServer

Models a long-lived server that receives requests from a client and calls a main0 method to run the commands in-process. Provides the command args, env variables, JVM properties, wrapped input/output streams, and other metadata related to the client command

Attributes

Companion
object
Source
MillDaemonServer.scala
Graph
Supertypes
class Server
class Object
trait Matchable
class Any
Known subtypes

Members list

Type members

Inherited classlikes

case class ProxyStreamServerData(stdout: PrintStream, stderr: PrintStream, writtenExitCode: AtomicBoolean, customData: ProxyStreamServer.this.PreHandleConnectionCustomData)

Attributes

Inherited from:
ProxyStreamServer
Source
ProxyStreamServer.scala
Supertypes
trait Serializable
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Inherited types

Attributes

Inherited from:
ProxyStreamServer
Source
ProxyStreamServer.scala

Value members

Abstract methods

def main0(args: Array[String], stateCache: State, mainInteractive: Boolean, streams: SystemStreams, env: Map[String, String], setIdle: Boolean => Unit, userSpecifiedProperties: Map[String, String], initialSystemProperties: Map[String, String], stopServer: StopServer): (Boolean, State)

Attributes

Source
MillDaemonServer.scala
def out: Path

Attributes

Source
MillDaemonServer.scala
def outLock: Lock

Attributes

Source
MillDaemonServer.scala
def stateCache0: State

Initial state.

Initial state.

Attributes

Source
MillDaemonServer.scala

Inherited methods

override protected def checkIfClientAlive(connectionData: ConnectionData, stopServer: StopServer, data: PreHandleConnectionData): Boolean

Returns true if the client is still alive. Invoked from another thread.

Returns true if the client is still alive. Invoked from another thread.

Attributes

Definition Classes
Inherited from:
ProxyStreamServer
Source
ProxyStreamServer.scala
final override protected def handleConnection(connectionData: ConnectionData, stopServer: StopServer, setIdle: SetIdle, data: PreHandleConnectionData): Unit

Handle a single client connection in a separate thread.

Handle a single client connection in a separate thread.

Attributes

Definition Classes
Inherited from:
ProxyStreamServer
Source
ProxyStreamServer.scala
override protected def onExceptionInHandleConnection(connectionData: ConnectionData, stopServer: StopServer, data: ProxyStreamServerData, exception: Throwable): Unit

Invoked in handleConnection results in an exception.

Invoked in handleConnection results in an exception.

Attributes

Definition Classes
Inherited from:
ProxyStreamServer
Source
ProxyStreamServer.scala
override protected def onStopServer(from: String, reason: String, exitCode: Int, connectionData: ConnectionData, data: Option[PreHandleConnectionData]): Unit

Invoked when the server is stopped.

Invoked when the server is stopped.

Value parameters

data

will be None if preHandleConnection haven't been invoked yet.

Attributes

Definition Classes
Inherited from:
ProxyStreamServer
Source
ProxyStreamServer.scala
final override protected def preHandleConnection(connectionData: ConnectionData, stopServer: StopServer): PreHandleConnectionData

Invoked before a thread that runs handleConnection is spawned.

Invoked before a thread that runs handleConnection is spawned.

Attributes

Definition Classes
Inherited from:
ProxyStreamServer
Source
ProxyStreamServer.scala
def run(): Unit

Attributes

Inherited from:
Server
Source
Server.scala
def serverLog(s: String): Unit

Attributes

Inherited from:
Server
Source
Server.scala
def serverLog0(s: String): Unit

Attributes

Inherited from:
Server
Source
Server.scala

Inherited fields

val processId: Long

Attributes

Inherited from:
Server
Source
Server.scala