Class GrpcValidation
java.lang.Object
io.helidon.webserver.grpc.validation.GrpcValidation
- All Implemented Interfaces:
io.grpc.ServerInterceptor, NamedService, GrpcServerService
public final class GrpcValidation
extends Object
implements io.grpc.ServerInterceptor, GrpcServerService
gRPC validation support.
Maps ValidationException thrown while handling a gRPC call to Status.INVALID_ARGUMENT.
-
Method Summary
Modifier and TypeMethodDescriptionstatic GrpcValidationcreate()Create gRPC validation support.<ReqT,RespT>
io.grpc.ServerCall.Listener<ReqT> interceptCall(io.grpc.ServerCall<ReqT, RespT> call, io.grpc.Metadata headers, io.grpc.ServerCallHandler<ReqT, RespT> next) WeightedBag<io.grpc.ServerInterceptor> Insert a list of server interceptors for a gRPC call.name()Name of this implementation, as provided inConfiguredProvider.create(Config, String).type()Type of this implementation, to distinguish instances of same type, with differentNamedService.name().Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GrpcServerService
interceptorsModifier and TypeMethodDescriptiondefault WeightedBag<io.grpc.ServerInterceptor> interceptors(ServiceRegistry serviceRegistry) Insert a list of server interceptors for a gRPC call, using the provided service registry for dependencies.
-
Method Details
-
create
Create gRPC validation support.- Returns:
- gRPC validation support
-
type
Description copied from interface:NamedServiceType of this implementation, to distinguish instances of same type, with differentNamedService.name(). Use for exampleConfiguredProvider.configKey()to define the type.- Specified by:
typein interfaceGrpcServerService- Specified by:
typein interfaceNamedService- Returns:
- type of this service
-
name
Description copied from interface:NamedServiceName of this implementation, as provided inConfiguredProvider.create(Config, String).- Specified by:
namein interfaceGrpcServerService- Specified by:
namein interfaceNamedService- Returns:
- name of this service
-
interceptors
Description copied from interface:GrpcServerServiceInsert a list of server interceptors for a gRPC call.- Specified by:
interceptorsin interfaceGrpcServerService- Returns:
- weighted bag of interceptors
-
interceptCall
public <ReqT,RespT> io.grpc.ServerCall.Listener<ReqT> interceptCall(io.grpc.ServerCall<ReqT, RespT> call, io.grpc.Metadata headers, io.grpc.ServerCallHandler<ReqT, RespT> next) - Specified by:
interceptCallin interfaceio.grpc.ServerInterceptor
-