webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | List of all members
google.protobuf.service.RpcController Class Reference
Inheritance diagram for google.protobuf.service.RpcController:

Public Member Functions

def Reset (self)
 
def Failed (self)
 
def ErrorText (self)
 
def StartCancel (self)
 
def SetFailed (self, reason)
 
def IsCanceled (self)
 
def NotifyOnCancel (self, callback)
 

Detailed Description

An RpcController mediates a single method call.

The primary purpose of the controller is to provide a way to manipulate
settings specific to the RPC implementation and to find out about RPC-level
errors. The methods provided by the RpcController interface are intended
to be a "least common denominator" set of features which we expect all
implementations to support.  Specific implementations may provide more
advanced features (e.g. deadline propagation).

Member Function Documentation

◆ ErrorText()

def google.protobuf.service.RpcController.ErrorText (   self)
If Failed is true, returns a human-readable description of the error.

◆ Failed()

def google.protobuf.service.RpcController.Failed (   self)
Returns true if the call failed.

After a call has finished, returns true if the call failed.  The possible
reasons for failure depend on the RPC implementation.  Failed() must not
be called before a call has finished.  If Failed() returns true, the
contents of the response message are undefined.

◆ IsCanceled()

def google.protobuf.service.RpcController.IsCanceled (   self)
Checks if the client cancelled the RPC.

If true, indicates that the client canceled the RPC, so the server may
as well give up on replying to it.  The server should still call the
final "done" callback.

◆ NotifyOnCancel()

def google.protobuf.service.RpcController.NotifyOnCancel (   self,
  callback 
)
Sets a callback to invoke on cancel.

Asks that the given callback be called when the RPC is canceled.  The
callback will always be called exactly once.  If the RPC completes without
being canceled, the callback will be called after completion.  If the RPC
has already been canceled when NotifyOnCancel() is called, the callback
will be called immediately.

NotifyOnCancel() must be called no more than once per request.

◆ Reset()

def google.protobuf.service.RpcController.Reset (   self)
Resets the RpcController to its initial state.

After the RpcController has been reset, it may be reused in
a new call. Must not be called while an RPC is in progress.

◆ SetFailed()

def google.protobuf.service.RpcController.SetFailed (   self,
  reason 
)
Sets a failure reason.

Causes Failed() to return true on the client side.  "reason" will be
incorporated into the message returned by ErrorText().  If you find
you need to return machine-readable information about failures, you
should incorporate it into your response protocol buffer and should
NOT call SetFailed().

◆ StartCancel()

def google.protobuf.service.RpcController.StartCancel (   self)
Initiate cancellation.

Advises the RPC system that the caller desires that the RPC call be
canceled.  The RPC system may cancel it immediately, may wait awhile and
then cancel it, or may not even cancel the call at all.  If the call is
canceled, the "done" callback will still be called and the RpcController
will indicate that the call failed at that time.

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