grpc.RpcMethodHandler Class Reference
Inheritance diagram for grpc.RpcMethodHandler:
Inheritance graph
[legend]

Detailed Description

An implementation of a single RPC method.

Attributes:
  request_streaming: Whether the RPC supports exactly one request message
    or any arbitrary number of request messages.
  response_streaming: Whether the RPC supports exactly one response message
    or any arbitrary number of response messages.
  request_deserializer: A callable :term:`deserializer` that accepts a byte string and
    returns an object suitable to be passed to this object's business
    logic, or None to indicate that this object's business logic should be
    passed the raw request bytes.
  response_serializer: A callable :term:`serializer` that accepts an object produced
    by this object's business logic and returns a byte string, or None to
    indicate that the byte strings produced by this object's business logic
    should be transmitted on the wire as they are.
  unary_unary: This object's application-specific business logic as a
    callable value that takes a request value and a ServicerContext object
    and returns a response value. Only non-None if both request_streaming
    and response_streaming are False.
  unary_stream: This object's application-specific business logic as a
    callable value that takes a request value and a ServicerContext object
    and returns an iterator of response values. Only non-None if
    request_streaming is False and response_streaming is True.
  stream_unary: This object's application-specific business logic as a
    callable value that takes an iterator of request values and a
    ServicerContext object and returns a response value. Only non-None if
    request_streaming is True and response_streaming is False.
  stream_stream: This object's application-specific business logic as a
    callable value that takes an iterator of request values and a
    ServicerContext object and returns an iterator of response values.
    Only non-None if request_streaming and response_streaming are both
    True.

Definition at line 1288 of file src/python/grpcio/grpc/__init__.py.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:31