Class RequestCaptureInterceptor

java.lang.Object
org.grpcmock.interceptors.RequestCaptureInterceptor
All Implemented Interfaces:
io.grpc.ServerInterceptor

public final class RequestCaptureInterceptor extends Object implements io.grpc.ServerInterceptor
Author:
Fadelis
  • Constructor Details

    • RequestCaptureInterceptor

      public RequestCaptureInterceptor()
  • Method Details

    • requestsFor

      public <ReqT> List<CapturedRequest<ReqT>> requestsFor(@Nonnull RequestPattern<ReqT> requestPattern)
    • callCountFor

      public int callCountFor(@Nonnull RequestPattern<?> requestPattern)
    • clear

      public void clear()
    • interceptCall

      public <ReqT, RespT> io.grpc.ServerCall.Listener<ReqT> interceptCall(io.grpc.ServerCall<ReqT,RespT> call, io.grpc.Metadata metadata, io.grpc.ServerCallHandler<ReqT,RespT> next)
      Specified by:
      interceptCall in interface io.grpc.ServerInterceptor
    • getCapturedRequest

      public static <ReqT> CapturedRequest<ReqT> getCapturedRequest()