Making most of the innards of microkernel.Main private

This commit is contained in:
Viktor Klang 2012-05-23 16:31:13 +02:00
parent ee4a7ce76a
commit 25ff921b42

View file

@ -59,9 +59,9 @@ trait Bootable {
* Main class for running the microkernel. * Main class for running the microkernel.
*/ */
object Main { object Main {
val quiet = getBoolean("akka.kernel.quiet") private val quiet = getBoolean("akka.kernel.quiet")
def log(s: String) = if (!quiet) println(s) private def log(s: String) = if (!quiet) println(s)
def main(args: Array[String]) = { def main(args: Array[String]) = {
if (args.isEmpty) { if (args.isEmpty) {
@ -90,7 +90,7 @@ object Main {
log("Successfully started Akka") log("Successfully started Akka")
} }
def createClassLoader(): ClassLoader = { private def createClassLoader(): ClassLoader = {
if (ActorSystem.GlobalHome.isDefined) { if (ActorSystem.GlobalHome.isDefined) {
val home = ActorSystem.GlobalHome.get val home = ActorSystem.GlobalHome.get
val deploy = new File(home, "deploy") val deploy = new File(home, "deploy")
@ -106,7 +106,7 @@ object Main {
} }
} }
def loadDeployJars(deploy: File): ClassLoader = { private def loadDeployJars(deploy: File): ClassLoader = {
val jars = deploy.listFiles.filter(_.getName.endsWith(".jar")) val jars = deploy.listFiles.filter(_.getName.endsWith(".jar"))
val nestedJars = jars flatMap { jar val nestedJars = jars flatMap { jar
@ -122,7 +122,7 @@ object Main {
new URLClassLoader(urls, Thread.currentThread.getContextClassLoader) new URLClassLoader(urls, Thread.currentThread.getContextClassLoader)
} }
def addShutdownHook(bootables: Seq[Bootable]): Unit = { private def addShutdownHook(bootables: Seq[Bootable]): Unit = {
Runtime.getRuntime.addShutdownHook(new Thread(new Runnable { Runtime.getRuntime.addShutdownHook(new Thread(new Runnable {
def run = { def run = {
log("") log("")
@ -138,7 +138,7 @@ object Main {
})) }))
} }
def banner = """ private def banner = """
============================================================================== ==============================================================================
ZZ: ZZ: