Class OsgiActorSystemFactory

java.lang.Object
org.apache.pekko.osgi.OsgiActorSystemFactory

public class OsgiActorSystemFactory extends 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 Details

    • OsgiActorSystemFactory

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

    • $lessinit$greater$default$3

      public static com.typesafe.config.Config $lessinit$greater$default$3()
    • pekkoActorClassLoader

      public static ClassLoader pekkoActorClassLoader()
      Class loader of pekko-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<ClassLoader> fallbackClassLoader()
    • createActorSystem

      public ActorSystem createActorSystem(String name)
      Creates the pekko.actor.ActorSystem, using the name specified
    • createActorSystem

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

      A default name (bundle-&lt;bundle id&gt;-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 pekko-actor bundle. Configuration files found in pekko-actor bundle
    • actorSystemName

      public String actorSystemName(scala.Option<String> name)
      Determine the name for the pekko.actor.ActorSystem Returns a default value of bundle-&lt;bundle id&gt;-ActorSystem is no name is being specified