Class InProcessGRPCServer.MessageSizeChecker

  • All Implemented Interfaces:
    io.grpc.ServerInterceptor
    Enclosing class:
    InProcessGRPCServer

    public static class InProcessGRPCServer.MessageSizeChecker
    extends java.lang.Object
    implements io.grpc.ServerInterceptor
    This interceptor is needed for testing RESOURCE_EXHAUSTED error handling because in-process gRPC server doesn't check and cannot be configured to check message size.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <ReqT,​RespT>
      io.grpc.ServerCall.Listener<ReqT>
      interceptCall​(io.grpc.ServerCall<ReqT,​RespT> call, io.grpc.Metadata headers, io.grpc.ServerCallHandler<ReqT,​RespT> next)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MessageSizeChecker

        public MessageSizeChecker()
      • MessageSizeChecker

        public MessageSizeChecker​(int maxMessageSize)
    • Method Detail

      • 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 interface io.grpc.ServerInterceptor