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

Public Member Functions

def intercept_service (self, continuation, handler_call_details)
 

Detailed Description

Affords intercepting incoming RPCs on the service-side.

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

Member Function Documentation

◆ intercept_service()

def grpc.ServerInterceptor.intercept_service (   self,
  continuation,
  handler_call_details 
)
Intercepts incoming RPCs before handing them over to a handler.

Args:
  continuation: A function that takes a HandlerCallDetails and
    proceeds to invoke the next interceptor in the chain, if any,
    or the RPC handler lookup logic, with the call details passed
    as an argument, and returns an RpcMethodHandler instance if
    the RPC is considered serviced, or None otherwise.
  handler_call_details: A HandlerCallDetails describing the RPC.

Returns:
  An RpcMethodHandler with which the RPC may be serviced if the
  interceptor chooses to service this RPC, or None otherwise.

Reimplemented in tests.unit._interceptor_test._GenericServerInterceptor, tests.unit._interceptor_test._LoggingInterceptor, customized_auth_server.SignatureValidationInterceptor, and request_header_validator_interceptor.RequestHeaderValidatorInterceptor.

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