added configurator trait
This commit is contained in:
parent
27355ec510
commit
22bd4f54e9
2 changed files with 35 additions and 0 deletions
0
deploy/.keep
Normal file
0
deploy/.keep
Normal file
35
kernel/src/main/scala/config/Configurator.scala
Normal file
35
kernel/src/main/scala/config/Configurator.scala
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* Copyright (C) 2009 Scalable Solutions.
|
||||
*/
|
||||
|
||||
package se.scalablesolutions.akka.kernel.config
|
||||
|
||||
import ScalaConfig.{RestartStrategy, Component}
|
||||
|
||||
trait Configurator {
|
||||
/**
|
||||
* Returns the active abject or actor that has been put under supervision for the class specified.
|
||||
*
|
||||
* @param clazz the class for the active object
|
||||
* @return the active object for the class
|
||||
*/
|
||||
def getInstance[T](clazz: Class[T]): T
|
||||
|
||||
def getComponentInterfaces: List[Class[_]]
|
||||
|
||||
def isDefined(clazz: Class[_]): Boolean
|
||||
}
|
||||
|
||||
trait ActiveObjectConfigurator extends Configurator {
|
||||
def getExternalDependency[T](clazz: Class[T]): T
|
||||
|
||||
def configure(restartStrategy: RestartStrategy, components: List[Component]): ActiveObjectConfigurator
|
||||
|
||||
def inject: ActiveObjectConfigurator
|
||||
|
||||
def supervise: ActiveObjectConfigurator
|
||||
|
||||
def reset
|
||||
|
||||
def stop
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue