Interface GrpcClientProvider
-
Method Summary
Modifier and TypeMethodDescription<T extends akka.grpc.javadsl.AkkaGrpcClient>
TgrpcClientFor
(Class<T> serviceClass, String serviceName) Returns a gRPC client to interact with the specified service.
-
Method Details
-
grpcClientFor
<T extends akka.grpc.javadsl.AkkaGrpcClient> T grpcClientFor(Class<T> serviceClass, String serviceName) Returns a gRPC client to interact with the specified service.If the serviceName is a service name without protocol or domain the client will be configured to connect to another service deployed with that name on the same Akka project. The runtime will take care of routing requests to the service and keeping the data safe by encrypting the connection between services and identifying the client as coming from this service.
If it is a full dns name prefixed with "http://" or "https://" it will connect to services available on the public internet.
The client lifecycle is managed by the runtime, service code should not call invalid input: '{@code close() on the client. // FIXME what about powerapi client interface for request headers? @param serviceClass A gRPC service client interface generated by Akka gRPC'
-