Package org.apache.pekko.osgi
Class OsgiActorSystemFactory
- java.lang.Object
-
- org.apache.pekko.osgi.OsgiActorSystemFactory
-
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
Constructors Constructor Description OsgiActorSystemFactory(org.osgi.framework.BundleContext context, scala.Option<java.lang.ClassLoader> fallbackClassLoader, com.typesafe.config.Config config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static com.typesafe.config.Config
$lessinit$greater$default$3()
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.java.lang.String
actorSystemName(scala.Option<java.lang.String> name)
Determine the name for thepekko.actor.ActorSystem
Returns a default value ofbundle-<bundle id>-ActorSystem
is no name is being specifiedstatic OsgiActorSystemFactory
apply(org.osgi.framework.BundleContext context, com.typesafe.config.Config config)
org.osgi.framework.BundleContext
context()
ActorSystem
createActorSystem(java.lang.String name)
Creates thepekko.actor.ActorSystem
, using the name specifiedActorSystem
createActorSystem(scala.Option<java.lang.String> name)
Creates thepekko.actor.ActorSystem
, using the name specified.scala.Option<java.lang.ClassLoader>
fallbackClassLoader()
static java.lang.ClassLoader
pekkoActorClassLoader()
Class loader of pekko-actor bundle.
-
-
-
Method Detail
-
$lessinit$greater$default$3
public static com.typesafe.config.Config $lessinit$greater$default$3()
-
pekkoActorClassLoader
public static java.lang.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<java.lang.ClassLoader> fallbackClassLoader()
-
createActorSystem
public ActorSystem createActorSystem(java.lang.String name)
Creates thepekko.actor.ActorSystem
, using the name specified
-
createActorSystem
public ActorSystem createActorSystem(scala.Option<java.lang.String> name)
Creates thepekko.actor.ActorSystem
, using the name specified.A default name (
bundle-<bundle id>-ActorSystem
) is assigned when you pass alongNone
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 java.lang.String actorSystemName(scala.Option<java.lang.String> name)
Determine the name for thepekko.actor.ActorSystem
Returns a default value ofbundle-<bundle id>-ActorSystem
is no name is being specified
-
-