Update docs and use Option[String] in the activator instead of null

This commit is contained in:
Gert Vanthienen 2012-06-12 16:57:25 +02:00
parent cfbf13ec2a
commit f33c45090d
2 changed files with 11 additions and 7 deletions

View file

@ -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>

View file

@ -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