jove.notebook.Server.scala Maven / Gradle / Ivy
The newest version!
package jove.notebook
import java.io.File
import jove.helpers.Kernels
import jove.notebook.components._
import jove.notebook.services._
class ServerState(contentDir: File) { server =>
val kernel = new Kernels
val kernelWs = new KernelWS
val session = new Session(server.kernel)
val config = new Config
lazy val content = new Content(server.kernel, server.contentDir)
}
object Server {
def apiPlan(state: ServerState): Plan =
Config(state.config)
.orElse(Contents(state.content, state.kernel))
.orElse(Kernel(state.kernelWs, state.session))
.orElse(KernelSpecs(state.kernel))
.orElse(Sessions(state.kernel, state.session))
}