Added a root akka folder for source files for the docs to work properly, closing ticket #541
This commit is contained in:
parent
8ecba6d740
commit
7040ef0f14
175 changed files with 10 additions and 4 deletions
|
|
@ -0,0 +1,44 @@
|
|||
/**
|
||||
* Copyright (C) 2009-2010 Scalable Solutions AB <http://scalablesolutions.se>
|
||||
*/
|
||||
|
||||
package akka.remote
|
||||
|
||||
import akka.actor.BootableActorLoaderService
|
||||
import akka.util.{Bootable, Logging}
|
||||
import akka.config.Config.config
|
||||
|
||||
/**
|
||||
* This bundle/service is responsible for booting up and shutting down the remote actors facility
|
||||
* <p/>
|
||||
* It is used in Kernel
|
||||
*/
|
||||
trait BootableRemoteActorService extends Bootable with Logging {
|
||||
self: BootableActorLoaderService =>
|
||||
|
||||
protected lazy val remoteServerThread = new Thread(new Runnable() {
|
||||
def run = {
|
||||
if (self.applicationLoader.isDefined) RemoteNode.start(self.applicationLoader.get)
|
||||
else RemoteNode.start
|
||||
}
|
||||
}, "Akka Remote Service")
|
||||
|
||||
def startRemoteService = remoteServerThread.start
|
||||
|
||||
abstract override def onLoad = {
|
||||
if (config.getBool("akka.remote.server.service", true)) {
|
||||
log.info("Initializing Remote Actors Service...")
|
||||
startRemoteService
|
||||
log.info("Remote Actors Service initialized")
|
||||
}
|
||||
super.onLoad
|
||||
}
|
||||
|
||||
abstract override def onUnload = {
|
||||
log.info("Shutting down Remote Actors Service")
|
||||
RemoteNode.shutdown
|
||||
if (remoteServerThread.isAlive) remoteServerThread.join(1000)
|
||||
log.info("Remote Actors Service has been shut down")
|
||||
super.onUnload
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue