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 __init__ (self, service_descriptor)
 
def BuildService (self, cls)
 
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 _CallMethod (self, srvc, method_descriptor, rpc_controller, request, callback)
 
def _GenerateNonImplementedMethod (self, method)
 
def _GenerateNonImplementedMethod (self, method)
 
def _GetRequestClass (self, method_descriptor)
 
def _GetRequestClass (self, method_descriptor)
 
def _GetResponseClass (self, method_descriptor)
 
def _GetResponseClass (self, method_descriptor)
 
def _NonImplementedMethod (self, method_name, rpc_controller, callback)
 
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 bloaty/third_party/protobuf/python/google/protobuf/service_reflection.py.

Constructor & Destructor Documentation

◆ __init__() [1/2]

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 bloaty/third_party/protobuf/python/google/protobuf/service_reflection.py.

◆ __init__() [2/2]

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 127 of file protobuf/python/google/protobuf/service_reflection.py.

Member Function Documentation

◆ _CallMethod() [1/2]

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 bloaty/third_party/protobuf/python/google/protobuf/service_reflection.py.

◆ _CallMethod() [2/2]

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 159 of file protobuf/python/google/protobuf/service_reflection.py.

◆ _GenerateNonImplementedMethod() [1/2]

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 bloaty/third_party/protobuf/python/google/protobuf/service_reflection.py.

◆ _GenerateNonImplementedMethod() [2/2]

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 208 of file protobuf/python/google/protobuf/service_reflection.py.

◆ _GetRequestClass() [1/2]

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 bloaty/third_party/protobuf/python/google/protobuf/service_reflection.py.

◆ _GetRequestClass() [2/2]

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 176 of file protobuf/python/google/protobuf/service_reflection.py.

◆ _GetResponseClass() [1/2]

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 bloaty/third_party/protobuf/python/google/protobuf/service_reflection.py.

◆ _GetResponseClass() [2/2]

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 192 of file protobuf/python/google/protobuf/service_reflection.py.

◆ _NonImplementedMethod() [1/2]

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 bloaty/third_party/protobuf/python/google/protobuf/service_reflection.py.

◆ _NonImplementedMethod() [2/2]

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 221 of file protobuf/python/google/protobuf/service_reflection.py.

◆ BuildService() [1/2]

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 bloaty/third_party/protobuf/python/google/protobuf/service_reflection.py.

◆ BuildService() [2/2]

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

Args:
  cls: The class that will be constructed.

Definition at line 136 of file protobuf/python/google/protobuf/service_reflection.py.

Member Data Documentation

◆ CallMethod

google.protobuf.service_reflection._ServiceBuilder.CallMethod

◆ cls

google.protobuf.service_reflection._ServiceBuilder.cls

◆ descriptor

google.protobuf.service_reflection._ServiceBuilder.descriptor

◆ GetDescriptor

google.protobuf.service_reflection._ServiceBuilder.GetDescriptor

◆ GetRequestClass

google.protobuf.service_reflection._ServiceBuilder.GetRequestClass

◆ GetResponseClass

google.protobuf.service_reflection._ServiceBuilder.GetResponseClass

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


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