Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
google.protobuf.service_reflection._ServiceStubBuilder Class Reference
Inheritance diagram for google.protobuf.service_reflection._ServiceStubBuilder:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, service_descriptor)
 
def BuildServiceStub (self, cls)
 

Public Attributes

 cls
 
 descriptor
 

Private Member Functions

def _GenerateStubMethod (self, method)
 
def _StubMethod (self, stub, method_descriptor, rpc_controller, request, callback)
 

Private Attributes

 __init__
 

Detailed Description

Constructs a protocol service stub class using a service descriptor.

Given a service descriptor, this class constructs a suitable stub class.
A stub is just a type-safe wrapper around an RpcChannel which emulates a
local implementation of the service.

One service stub builder instance constructs exactly one class. It means all
instances of that class share the same service stub builder.

Definition at line 230 of file service_reflection.py.

Constructor & Destructor Documentation

◆ __init__()

def google.protobuf.service_reflection._ServiceStubBuilder.__init__ (   self,
  service_descriptor 
)
Initializes an instance of the service stub class builder.

Args:
  service_descriptor: ServiceDescriptor to use when constructing the
stub class.

Definition at line 242 of file service_reflection.py.

Member Function Documentation

◆ _GenerateStubMethod()

def google.protobuf.service_reflection._ServiceStubBuilder._GenerateStubMethod (   self,
  method 
)
private

Definition at line 265 of file service_reflection.py.

◆ _StubMethod()

def google.protobuf.service_reflection._ServiceStubBuilder._StubMethod (   self,
  stub,
  method_descriptor,
  rpc_controller,
  request,
  callback 
)
private
The body of all service methods in the generated stub class.

Args:
  stub: Stub instance.
  method_descriptor: Descriptor of the invoked method.
  rpc_controller: Rpc controller to execute the method.
  request: Request protocol message.
  callback: A callback to execute when the method finishes.
Returns:
  Response message (in case of blocking call).

Definition at line 269 of file service_reflection.py.

◆ BuildServiceStub()

def google.protobuf.service_reflection._ServiceStubBuilder.BuildServiceStub (   self,
  cls 
)
Constructs the stub class.

Args:
  cls: The class that will be constructed.

Definition at line 251 of file service_reflection.py.

Member Data Documentation

◆ __init__

google.protobuf.service_reflection._ServiceStubBuilder.__init__
private

Definition at line 261 of file service_reflection.py.

◆ cls

google.protobuf.service_reflection._ServiceStubBuilder.cls

Definition at line 260 of file service_reflection.py.

◆ descriptor

google.protobuf.service_reflection._ServiceStubBuilder.descriptor

Definition at line 249 of file service_reflection.py.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:10