public interface AhcWSComponents extends WSClientComponents, ConfigurationComponents, AkkaComponents
Usage:
public class MyComponents extends BuiltInComponentsFromContext implements AhcWSComponents { public MyComponents(ApplicationLoader.Context context) { super(context); } // some service class that depends on WSClient public SomeService someService() { // wsClient is provided by AhcWSComponents return new SomeService(wsClient()); } // other methods }
BuiltInComponents
,
WSClient
Modifier and Type | Method and Description |
---|---|
ApplicationLifecycle |
applicationLifecycle() |
Environment |
environment() |
default WSClient |
wsClient() |
config, configuration
actorSystem, executionContext, materializer
Environment environment()
ApplicationLifecycle applicationLifecycle()
default WSClient wsClient()
wsClient
in interface WSClientComponents