Class ValidatingInterceptor
java.lang.Object
org.lognet.springboot.grpc.validation.ValidatingInterceptor
- All Implemented Interfaces:
io.grpc.ServerInterceptor
,org.springframework.core.Ordered
public class ValidatingInterceptor
extends Object
implements io.grpc.ServerInterceptor, org.springframework.core.Ordered
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorsConstructorDescriptionValidatingInterceptor(jakarta.validation.Validator validator, FailureHandlingSupport failureHandlingSupport)
-
Method Summary
Modifier and TypeMethodDescriptionint
getOrder()
<ReqT, RespT>
io.grpc.ServerCall.Listener<ReqT>interceptCall(io.grpc.ServerCall<ReqT,RespT> call, io.grpc.Metadata headers, io.grpc.ServerCallHandler<ReqT,RespT> next)
-
Constructor Details
-
ValidatingInterceptor
public ValidatingInterceptor(jakarta.validation.Validator validator, FailureHandlingSupport failureHandlingSupport)
-
-
Method Details
-
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:
interceptCall
in interfaceio.grpc.ServerInterceptor
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
order
- Returns:
this
.
-