Package play.libs.ws.ahc
Interface AhcWSComponents
- All Superinterfaces:
ConfigurationComponents,PekkoComponents,WSClientComponents
public interface AhcWSComponents
extends WSClientComponents, ConfigurationComponents, PekkoComponents
AsyncHttpClient WS implementation components.
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
}
- See Also:
-
Method Summary
Methods inherited from interface play.components.ConfigurationComponents
config, configurationMethods inherited from interface play.components.PekkoComponents
actorSystem, coordinatedShutdown, executionContext, materializer
-
Method Details
-
environment
Environment environment() -
applicationLifecycle
ApplicationLifecycle applicationLifecycle() -
wsClient
- Specified by:
wsClientin interfaceWSClientComponents
-
standaloneWSClient
default play.libs.ws.StandaloneWSClient standaloneWSClient() -
asyncHttpClient
default play.shaded.ahc.org.asynchttpclient.AsyncHttpClient asyncHttpClient()
-