Package org.apache.pekko.actor
Interface IndirectActorProducer
public interface IndirectActorProducer
This interface defines a class of actor creation strategies deviating from
the usual default of just reflectively instantiating the
Actor
subclass. It can be used to allow a dependency injection framework to
determine the actual actor class and how it shall be instantiated.-
Method Summary
-
Method Details
-
produce
Actor produce()This factory method must produce a fresh actor instance upon each invocation. It is not permitted to return the same instance more than once. -
actorClass
This method is used byPropsto determine the type of actor which will be created. This means that an instance of thisIndirectActorProducerwill be created in order to call this method during any call toProps.actorClass(); it should be noted that such calls may performed during actor set-up before the actual actor’s instantiation, and that the instance created for callingactorClassis not necessarily reused later to produce the actor.
-