Lines Matching refs:method

142     # instance to the method that does the real CallMethod work.
153 for method in self.descriptor.methods:
154 setattr(cls, method.name, self._GenerateNonImplementedMethod(method))
158 """Calls the method described by a given method descriptor.
161 srvc: Instance of the service for which this method is called.
162 method_descriptor: Descriptor that represent the method to call.
163 rpc_controller: RPC controller to use for this method's execution.
165 callback: A callback to invoke after the method has completed.
169 'CallMethod() given method descriptor for wrong service type.')
170 method = getattr(srvc, method_descriptor.name)
171 return method(rpc_controller, request, callback)
177 method_descriptor: Descriptor of the method for which to return the
182 method.
186 'GetRequestClass() given method descriptor for wrong service type.')
193 method_descriptor: Descriptor of the method for which to return the
198 method.
202 'GetResponseClass() given method descriptor for wrong service type.')
205 def _GenerateNonImplementedMethod(self, method):
206 """Generates and returns a method that can be set for a service methods.
209 method: Descriptor of the service method for which a method is to be
213 A method that can be added to the service class.
216 self._NonImplementedMethod(method.name, rpc_controller, callback))
222 method_name: Name of the method being executed.
223 rpc_controller: RPC controller used to execute this method.
224 callback: A callback which will be invoked when the method finishes.
262 for method in self.descriptor.methods:
263 setattr(cls, method.name, self._GenerateStubMethod(method))
265 def _GenerateStubMethod(self, method):
267 self._StubMethod(inst, method, rpc_controller, request, callback))
275 method_descriptor: Descriptor of the invoked method.
276 rpc_controller: Rpc controller to execute the method.
278 callback: A callback to execute when the method finishes.