|
| package |
|
| call |
|
| request |
|
| response |
|
| callback |
|
| deadline |
|
| stub |
|
| cpu_usage_mcycles |
|
|
int | IDLE = 0 |
|
int | RUNNING = 1 |
|
int | FINISHING = 2 |
|
Base class for implementing RPC of API proxy stubs.
To implement a RPC to make real asynchronous API call:
- Extend this class.
- Override _MakeCallImpl and/or _WaitImpl to do a real asynchronous call.
def google.appengine.api.apiproxy_rpc.RPC.__init__ |
( |
|
self, |
|
|
|
package = None , |
|
|
|
call = None , |
|
|
|
request = None , |
|
|
|
response = None , |
|
|
|
callback = None , |
|
|
|
deadline = None , |
|
|
|
stub = None |
|
) |
| |
Constructor for the RPC object.
All arguments are optional, and simply set members on the class.
These data members will be overriden by values passed to MakeCall.
Args:
package: string, the package for the call
call: string, the call within the package
request: ProtocolMessage instance, appropriate for the arguments
response: ProtocolMessage instance, appropriate for the response
callback: callable, called when call is complete
deadline: A double specifying the deadline for this call as the number of
seconds from the current time. Ignored if non-positive.
stub: APIProxyStub instance, used in default _WaitImpl to do real call
def google.appengine.api.apiproxy_rpc.RPC.CheckSuccess |
( |
|
self | ) |
|
If there was an exception, raise it now.
Raises:
Exception of the API call or the callback, if any.
def google.appengine.api.apiproxy_rpc.RPC.Clone |
( |
|
self | ) |
|
Make a shallow copy of this instances attributes, excluding methods.
This is usually used when an RPC has been specified with some configuration
options and is being used as a template for multiple RPCs outside of a
developer's easy control.
def google.appengine.api.apiproxy_rpc.RPC.MakeCall |
( |
|
self, |
|
|
|
package = None , |
|
|
|
call = None , |
|
|
|
request = None , |
|
|
|
response = None , |
|
|
|
callback = None , |
|
|
|
deadline = None |
|
) |
| |
Makes an asynchronous (i.e. non-blocking) API call within the
specified package for the specified call method.
It will call the _MakeRealCall to do the real job.
Args:
Same as constructor; see __init__.
Raises:
TypeError or AssertionError if an argument is of an invalid type.
AssertionError or RuntimeError is an RPC is already in use.
def google.appengine.api.apiproxy_rpc.RPC.Wait |
( |
|
self | ) |
|
Waits on the API call associated with this RPC.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/api/apiproxy_rpc.py