Package google :: Package protobuf :: Module service :: Class RpcChannel
[hide private]
[frames] | no frames]

Class RpcChannel

source code

object --+
         |
        RpcChannel

Abstract interface for an RPC channel.

An RpcChannel represents a communication line to a service which can be used
to call that service's methods.  The service may be running on another
machine. Normally, you should not use an RpcChannel directly, but instead
construct a stub {@link Service} wrapping it.  Example:

Example:
  RpcChannel channel = rpcImpl.Channel("remotehost.example.com:1234")
  RpcController controller = rpcImpl.Controller()
  MyService service = MyService_Stub(channel)
  service.MyMethod(controller, request, callback)

Instance Methods [hide private]
 
CallMethod(self, method_descriptor, rpc_controller, request, response_class, done)
Calls the method identified by the descriptor.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

CallMethod(self, method_descriptor, rpc_controller, request, response_class, done)

source code 

Calls the method identified by the descriptor.

Call the given method of the remote service. The signature of this procedure looks the same as Service.CallMethod(), but the requirements are less strict in one important way: the request object doesn't have to be of any specific class as long as its descriptor is method.input_type.