akka.osgi
Class OsgiActorSystemFactory

java.lang.Object
  extended by akka.osgi.OsgiActorSystemFactory
Direct Known Subclasses:
BlueprintActorSystemFactory

public class OsgiActorSystemFactory
extends java.lang.Object

Factory class to create ActorSystem implementations in an OSGi environment. This mainly involves dealing with bundle classloaders appropriately to ensure that configuration files and classes get loaded properly


Constructor Summary
OsgiActorSystemFactory(org.osgi.framework.BundleContext context, scala.Option<java.lang.ClassLoader> fallbackClassLoader, com.typesafe.config.Config config)
           
 
Method Summary
 com.typesafe.config.Config actorSystemConfig(org.osgi.framework.BundleContext context)
          Strategy method to create the Config for the ActorSystem ensuring that the default/reference configuration is loaded from the akka-actor bundle.
 java.lang.String actorSystemName(scala.Option<java.lang.String> name)
          Determine the name for the ActorSystem Returns a default value of bundle--ActorSystem is no name is being specified
static java.lang.ClassLoader akkaActorClassLoader()
          Class loader of akka-actor bundle.
static OsgiActorSystemFactory apply(org.osgi.framework.BundleContext context, com.typesafe.config.Config config)
           
 org.osgi.framework.BundleContext context()
           
 ActorSystem createActorSystem(scala.Option<java.lang.String> name)
          Creates the ActorSystem, using the name specified.
 ActorSystem createActorSystem(java.lang.String name)
          Creates the ActorSystem, using the name specified
 scala.Option<java.lang.ClassLoader> fallbackClassLoader()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsgiActorSystemFactory

public OsgiActorSystemFactory(org.osgi.framework.BundleContext context,
                              scala.Option<java.lang.ClassLoader> fallbackClassLoader,
                              com.typesafe.config.Config config)
Method Detail

akkaActorClassLoader

public static java.lang.ClassLoader akkaActorClassLoader()
Class loader of akka-actor bundle.


apply

public static OsgiActorSystemFactory apply(org.osgi.framework.BundleContext context,
                                           com.typesafe.config.Config config)

context

public org.osgi.framework.BundleContext context()

fallbackClassLoader

public scala.Option<java.lang.ClassLoader> fallbackClassLoader()

createActorSystem

public ActorSystem createActorSystem(java.lang.String name)
Creates the ActorSystem, using the name specified


createActorSystem

public ActorSystem createActorSystem(scala.Option<java.lang.String> name)
Creates the ActorSystem, using the name specified.

A default name (bundle--ActorSystem) is assigned when you pass along None instead.


actorSystemConfig

public com.typesafe.config.Config actorSystemConfig(org.osgi.framework.BundleContext context)
Strategy method to create the Config for the ActorSystem ensuring that the default/reference configuration is loaded from the akka-actor bundle. Configuration files found in akka-actor bundle


actorSystemName

public java.lang.String actorSystemName(scala.Option<java.lang.String> name)
Determine the name for the ActorSystem Returns a default value of bundle--ActorSystem is no name is being specified