Package deltavsoft :: Module rcfproto :: Class RcfProtoController |
[frames] | no frames]

# Class RcfProtoController

source code

    google.protobuf.service.RpcController --+
                                            |
                                           RcfProtoController

RPC controller interface, for both server-side and client-side code.

Instance Methods
__init__(self, channel, session) | source code
Reset(self) Resets the RcfProtoController to its initial state so that it may be reused in a new call. | source code
Failed(self) Client-side: After a call has finished, returns true if the call failed. | source code
ErrorText(self) Client-side: If Failed() is true, returns a human-readable description of the error. | source code
StartCancel(self) Client-side: Cancels an RPC that is in progress. | source code
SetFailed(self, reason) Server-side: Causes Failed() to return true on the client-side. | source code
IsCanceled(self) Server-side: If true, indicates that the client canceled the RPC, so the server may as well give up on replying to it. | source code
NotifyOnCancel(self, callback) Asks that the given callback be called when the RPC is canceled. | source code
GetSession(self) | source code
GetChannel(self) | source code

Method Details

### Reset(self) | source code
Resets the RcfProtoController to its initial state so that it may be reused in a new call. Must not be called while an RPC is in progress.

### Failed(self) | source code
Client-side: After a call has finished, returns true if the call failed. Failed() must not be called before a call has finished. If Failed() returns true, the contents of the response message are undefined.

### StartCancel(self) | source code
Client-side: Cancels an RPC that is in progress. Once canceled, the "done" callback will still be called and the RcfProtoController will indicate that the call failed at that time.

### SetFailed(self, reason) | source code
Server-side: 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().

### IsCanceled(self) | source code
Server-side: 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(self, callback) | source code
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.