Package org.mockserver.grpc
package org.mockserver.grpc
-
ClassDescriptionTransport-neutral helper that matches an inbound gRPC bidi message (as JSON) against a
GrpcBidiRule'smatchJsonpattern.Thex-grpc-*request headers MockServer derives itself from the gRPC request (the:pathand the decoded frame), as opposed to metadata the client sent.Synthesizes schema-valid example protobuf messages from a loaded protobufDescriptors.Descriptor.A gRPC protocol-level failure, carrying thegrpc-statusthe client should be told.Translates a MockServer-internal gRPC exchange (the JSON representation thatGrpcToHttpRequestHandlerproduces after decoding an inbound protobuf request) to and from the wire form a real upstream gRPC server expects, so that a matchedFORWARD-class expectation — or the anonymous proxy no-match path — can relay a gRPC call to an upstream service and record the decoded exchange.Handles grpc.health.v1.Health/Check requests without a proto descriptor.Resolves the gRPC status a client should observe for a givenHttpResponse, independently of transport.The resolved status, plus whether it came from an HTTP-level failure (in which case the response body is not a protobuf message of the method's output type and must be dropped).Handles gRPC Server Reflection requests without a generated proto stub.Enforces the client'sgrpc-timeoutfor a streaming RPC, terminating it mid-stream withDEADLINE_EXCEEDEDwhen the deadline elapses.Transport-neutral helper that encodes a single gRPC stream message (JSON) into a gRPC length-prefixed frame, ready to be written as an HTTP/2 DATA frame or an HTTP/3 DATA frame.Transport-neutral renderer that turns aGrpcStreamMessagebidi response into the JSON string to emit on the wire, applying optional response templating against the matched inbound gRPC message.Parses the gRPCgrpc-timeoutrequest header, which carries the client's deadline for the whole RPC.Translates between gRPC-Web framing and standard gRPC framing.Incremental gRPC length-prefixed frame decoder that accumulates across multiplefeed()calls, retaining any trailing partial bytes for the next call.