Components required for circuit breakers.
Abstract service locator that provides circuit breaking.
A service locator that uses static configuration.
Components for using the configuration service locator.
Convenience for constructing service clients in a non Lagom server application.
Convenience for constructing service clients in a non Lagom server application.
It is important to invoke #stop when the application is no longer needed, as this will trigger the shutdown of all thread and connection pools.
The Lagom service client components.
A round robin service locator, that cycles through a list of URIs.
Components for using the round robin service locator.
The Lagom service client implementor.
The Lagom service client implementor.
Instances of this must also implement ServiceClientConstructor, so that the implementClient
macro can
generate code that constructs the service client.
Lagom service client constructor.
Lagom service client constructor.
This API should not be used directly, it will be invoked by the client generated by ServiceClient.implement in order to construct the client and obtain the dependencies necessary for the client to operate.
The reason for a separation between this interface and ServiceClient is so that the #construct method doesn't appear on the user facing ServiceClient API. The macro it generates will cast the ServiceClient to a ServiceClientConstructor in order to invoke it.
Although this API should not directly be used by end users, the code generated by the ServiceClient macro does
cause end users to have a binary dependency on this class, which is why it's in the scaladsl
package.
The service client context.
The service client context.
This API should not be used directly, it will be invoked by the client generated by ServiceClient.implement in order to implement each service call and topic.
The service client context is essentially a map of service calls and topics, constructed from a service descriptor, that allows a ServiceCall to be easily constructed by the services methods.
Although this API should not directly be used by end users, the code generated by the ServiceClient macro does
cause end users to have a binary dependency on this class, which is why it's in the scaladsl
package.
The service client implementation context.
The service client implementation context.
This API should not be used directly, it will be invoked by the client generated by ServiceClient.implement in order to resolve the service descriptor.
The purpose of this API is to capture the dependencies required in order to implement a service client, such as the HTTP and WebSocket clients.
Although this API should not directly be used by end users, the code generated by the ServiceClient macro does
cause end users to have a binary dependency on this class, which is why it's in the scaladsl
package.
A static service locator, that always resolves the same URI.
Components for using the static service locator.
Abstract service locator that provides circuit breaking.
Generally, only the ServiceLocator.locate() method needs to be implemented, however doWithServiceImpl() can be overridden if the service locator wants to handle failures in some way.