Update docs and use Option[String] in the activator instead of null
This commit is contained in:
parent
cfbf13ec2a
commit
f33c45090d
2 changed files with 11 additions and 7 deletions
|
|
@ -2,9 +2,13 @@
|
||||||
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
|
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
|
||||||
xmlns:akka="http://akka.io/xmlns/blueprint/v1.0.0">
|
xmlns:akka="http://akka.io/xmlns/blueprint/v1.0.0">
|
||||||
|
|
||||||
<akka:actor-system name="BlueprintSystem">
|
<akka:actor-system name="BlueprintSystem" />
|
||||||
<akka:actor class="org.apache.servicemix.examples.akka.Listener"/>
|
|
||||||
<akka:actor class="org.apache.servicemix.examples.akka.Master"/>
|
|
||||||
</akka:actor-system>
|
|
||||||
|
|
||||||
|
<akka:actor-system name="BlueprintSystemWithConfig">
|
||||||
|
<akka:config>
|
||||||
|
some.config {
|
||||||
|
key=value
|
||||||
|
}
|
||||||
|
</akka:config>
|
||||||
|
</akka:actor-system>
|
||||||
</blueprint>
|
</blueprint>
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ import java.util.Properties
|
||||||
* Abstract {@link BundleActivator} implementation to bootstrap and configure an {@link ActorSystem} in an
|
* Abstract {@link BundleActivator} implementation to bootstrap and configure an {@link ActorSystem} in an
|
||||||
* OSGi environment.
|
* OSGi environment.
|
||||||
*/
|
*/
|
||||||
abstract class ActorSystemActivator(nameFor: (BundleContext) ⇒ String) extends BundleActivator {
|
abstract class ActorSystemActivator(nameFor: (BundleContext) ⇒ Option[String]) extends BundleActivator {
|
||||||
|
|
||||||
def this() = this({ context: BundleContext ⇒ null })
|
def this() = this({ context: BundleContext ⇒ None })
|
||||||
def this(name: String) = this({ context: BundleContext ⇒ name })
|
def this(name: String) = this({ context: BundleContext ⇒ Some(name) })
|
||||||
|
|
||||||
var system: ActorSystem = null
|
var system: ActorSystem = null
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue