Public Member Functions | List of all members
grpc.UnaryUnaryClientInterceptor Class Reference
Inheritance diagram for grpc.UnaryUnaryClientInterceptor:
Inheritance graph
[legend]

Public Member Functions

def intercept_unary_unary (self, continuation, client_call_details, request)
 

Detailed Description

Affords intercepting unary-unary invocations.

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

Member Function Documentation

◆ intercept_unary_unary()

def grpc.UnaryUnaryClientInterceptor.intercept_unary_unary (   self,
  continuation,
  client_call_details,
  request 
)
Intercepts a unary-unary invocation asynchronously.

Args:
  continuation: A function that proceeds with the invocation by
    executing the next interceptor in chain or invoking the
    actual RPC on the underlying Channel. It is the interceptor's
    responsibility to call it if it decides to move the RPC forward.
    The interceptor can use
    `response_future = continuation(client_call_details, request)`
    to continue with the RPC. `continuation` returns an object that is
    both a Call for the RPC and a Future. In the event of RPC
    completion, the return Call-Future's result value will be
    the response message of the RPC. Should the event terminate
    with non-OK status, the returned Call-Future's exception value
    will be an RpcError.
  client_call_details: A ClientCallDetails object describing the
    outgoing RPC.
  request: The request value for the RPC.

Returns:
    An object that is both a Call for the RPC and a Future.
    In the event of RPC completion, the return Call-Future's
    result value will be the response message of the RPC.
    Should the event terminate with non-OK status, the returned
    Call-Future's exception value will be an RpcError.

Reimplemented in tests.unit._interceptor_test._DefectiveClientInterceptor, tests.unit._interceptor_test._LoggingInterceptor, tests.unit._interceptor_test._GenericClientInterceptor, default_value_client_interceptor.DefaultValueClientInterceptor, and generic_client_interceptor._GenericClientInterceptor.

Definition at line 430 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