Different Executors for WSClient

There are questions for general play framework having separate execution contexts, I have seen a thread in google groups below which sheds some light on this:


but I am still unclear how to obtain the builder from the shaded config from an injected WSClient instance from my controller:

class ToranController @Inject()(config: Configuration,
ws: WSClient,
webExecutionContext: WebExecutionContext,
clExecutionContext: CLExecutionContext,
val controllerComponents: ControllerComponents)
extends BaseController {

val wsAhcClient = ws.underlying[DefaultAsyncHttpClient]
val wsAhcConfig = wsAhcClient.getConfig

where I see the threadpools attribute in the wsAhcConfig set to “AsyncHttpClient” which presumably references some configuration which is dynamically set as it is not present in the reference.conf.

For now I would like to manually set my execution contexts with the two injected in my controller.