Class GrpcProxyBuilder<T>
- java.lang.Object
-
- io.helidon.microprofile.grpc.client.GrpcProxyBuilder<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Tbuild()Build a gRPC client dynamic proxy of the required type.static <T> GrpcProxyBuilder<T>create(io.grpc.Channel channel, Class<T> type)Create aGrpcProxyBuilderthat can build gRPC dynamic proxies for a given gRPC service interface.static <T> GrpcProxyBuilder<T>create(Class<T> type)Create aGrpcProxyBuilderthat can build gRPC dynamic proxies for a given gRPC service interface using in-process channel.static <T> GrpcProxyBuilder<T>create(String serverName, Class<T> type)Create aGrpcProxyBuilderthat can build gRPC dynamic proxies for a given gRPC service interface using in-process channel.
-
-
-
Method Detail
-
create
public static <T> GrpcProxyBuilder<T> create(Class<T> type)
Create aGrpcProxyBuilderthat can build gRPC dynamic proxies for a given gRPC service interface using in-process channel.This method will attempt to create in-process channel for the default gRPC server. If you have changed the gRPC server name, use
create(String, Class)instead.The class passed to this method should be properly annotated with
GrpcandGrpcMethodannotations so that the proxy can properly route calls to the server.- Type Parameters:
T- the service type- Parameters:
type- the service type- Returns:
- a
GrpcProxyBuilderthat can build dynamic proxies for the gRPC service
-
create
public static <T> GrpcProxyBuilder<T> create(String serverName, Class<T> type)
Create aGrpcProxyBuilderthat can build gRPC dynamic proxies for a given gRPC service interface using in-process channel.The class passed to this method should be properly annotated with
GrpcandGrpcMethodannotations so that the proxy can properly route calls to the server.- Type Parameters:
T- the service type- Parameters:
serverName- the name of the gRPC server proxy should connect totype- the service type- Returns:
- a
GrpcProxyBuilderthat can build dynamic proxies for the gRPC service
-
create
public static <T> GrpcProxyBuilder<T> create(io.grpc.Channel channel, Class<T> type)
Create aGrpcProxyBuilderthat can build gRPC dynamic proxies for a given gRPC service interface.The class passed to this method should be properly annotated with
GrpcandGrpcMethodannotations so that the proxy can properly route calls to the server.- Type Parameters:
T- the service type- Parameters:
channel- theChannelto connect to the servertype- the service type- Returns:
- a
GrpcProxyBuilderthat can build dynamic proxies for the gRPC service
-
-