A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.playframework.com/documentation/2.5.x/api/scala/play/api/libs/concurrent/Akka$.html below:

Akka - play.api.libs.concurrent.Akka

Create a binding for an actor implemented by the given class, with the given name.

This will instantiate the actor using Play's injector, allowing it to be dependency injected itself. The returned binding will provide the ActorRef for the actor, qualified with the given name, allowing it to be injected into other components.

Example usage from a Play module:

def bindings = Seq(
  Akka.bindingOf[MyActor]("myActor"),
  ...
)

Then to use the above actor in your application, add a qualified injected dependency, like so:

class MyController @Inject() (@Named("myActor") myActor: ActorRef) extends Controller {
  ...
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4