Creates a Spring-backed actor reference by name with optional constructor arguments.
Creates a Spring-backed actor reference by name with optional constructor arguments.
This factory method is typically used to disambiguate in the case of multiple beans defined for the same type. If this is not the case, consider using the preferred type-based reference factory methods.
Example:
@Bean def myActor = actorOf("myActorBean2")
name of the underlying bean
optional constructor arguments
Creates a Spring-backed actor reference by type with constructor arguments.
Creates a Spring-backed actor reference by type with constructor arguments.
Looks up the Spring bean of the given type and constructor arguments (using Spring's BeanFactory.getBean(class, args)
).
This factory method is typically used when the target actor needs to be customized per consumer during configuration.
Example:
val someString = "some string" @Bean def myActor = actorOf[MyActor](someString)
Creates a Spring-backed actor reference by type.
Creates a Spring-backed actor reference by type.
Looks up the Spring bean of the given type, which is expected to be an Actor. This factory method satisfies most use cases and is appropriate when a single actor of a given type is defined.
Example:
@Bean
def myActor = actorOf[MyActor]
Extend this trait to add factory helper methods to actors.