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

Public Member Functions

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

Public Attributes

 CallMethod
 
 cls
 
 descriptor
 
 GetDescriptor
 
 GetRequestClass
 
 GetResponseClass
 

Private Member Functions

def _CallMethod (self, srvc, method_descriptor, rpc_controller, request, callback)
 
def _GenerateNonImplementedMethod (self, method)
 
def _GetRequestClass (self, method_descriptor)
 
def _GetResponseClass (self, method_descriptor)
 
def _NonImplementedMethod (self, method_name, rpc_controller, callback)
 

Detailed Description

This class constructs a protocol service class using a service descriptor.

Given a service descriptor, this class constructs a class that represents
the specified service descriptor. One service builder instance constructs
exactly one service class. That means all instances of that class share the
same builder.

Definition at line 114 of file service_reflection.py.

Constructor & Destructor Documentation

◆ __init__()

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

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

Definition at line 124 of file service_reflection.py.

Member Function Documentation

◆ _CallMethod()

def google.protobuf.service_reflection._ServiceBuilder._CallMethod (   self,
  srvc,
  method_descriptor,
  rpc_controller,
  request,
  callback 
)
private
Calls the method described by a given method descriptor.

Args:
  srvc: Instance of the service for which this method is called.
  method_descriptor: Descriptor that represent the method to call.
  rpc_controller: RPC controller to use for this method's execution.
  request: Request protocol message.
  callback: A callback to invoke after the method has completed.

Definition at line 156 of file service_reflection.py.

◆ _GenerateNonImplementedMethod()

def google.protobuf.service_reflection._ServiceBuilder._GenerateNonImplementedMethod (   self,
  method 
)
private
Generates and returns a method that can be set for a service methods.

Args:
  method: Descriptor of the service method for which a method is to be
generated.

Returns:
  A method that can be added to the service class.

Definition at line 205 of file service_reflection.py.

◆ _GetRequestClass()

def google.protobuf.service_reflection._ServiceBuilder._GetRequestClass (   self,
  method_descriptor 
)
private
Returns the class of the request protocol message.

Args:
  method_descriptor: Descriptor of the method for which to return the
request protocol message class.

Returns:
  A class that represents the input protocol message of the specified
  method.

Definition at line 173 of file service_reflection.py.

◆ _GetResponseClass()

def google.protobuf.service_reflection._ServiceBuilder._GetResponseClass (   self,
  method_descriptor 
)
private
Returns the class of the response protocol message.

Args:
  method_descriptor: Descriptor of the method for which to return the
response protocol message class.

Returns:
  A class that represents the output protocol message of the specified
  method.

Definition at line 189 of file service_reflection.py.

◆ _NonImplementedMethod()

def google.protobuf.service_reflection._ServiceBuilder._NonImplementedMethod (   self,
  method_name,
  rpc_controller,
  callback 
)
private
The body of all methods in the generated service class.

Args:
  method_name: Name of the method being executed.
  rpc_controller: RPC controller used to execute this method.
  callback: A callback which will be invoked when the method finishes.

Definition at line 218 of file service_reflection.py.

◆ BuildService()

def google.protobuf.service_reflection._ServiceBuilder.BuildService (   self,
  cls 
)
Constructs the service class.

Args:
  cls: The class that will be constructed.

Definition at line 133 of file service_reflection.py.

Member Data Documentation

◆ CallMethod

google.protobuf.service_reflection._ServiceBuilder.CallMethod

Definition at line 148 of file service_reflection.py.

◆ cls

google.protobuf.service_reflection._ServiceBuilder.cls

Definition at line 147 of file service_reflection.py.

◆ descriptor

google.protobuf.service_reflection._ServiceBuilder.descriptor

Definition at line 131 of file service_reflection.py.

◆ GetDescriptor

google.protobuf.service_reflection._ServiceBuilder.GetDescriptor

Definition at line 149 of file service_reflection.py.

◆ GetRequestClass

google.protobuf.service_reflection._ServiceBuilder.GetRequestClass

Definition at line 151 of file service_reflection.py.

◆ GetResponseClass

google.protobuf.service_reflection._ServiceBuilder.GetResponseClass

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