App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
google.appengine.api.apiproxy_stub.APIProxyStub Class Reference
Inheritance diagram for google.appengine.api.apiproxy_stub.APIProxyStub:
google.appengine.api.app_identity.app_identity_stub.AppIdentityServiceStub google.appengine.api.blobstore.blobstore_stub.BlobstoreServiceStub google.appengine.api.capabilities.capability_stub.CapabilityServiceStub google.appengine.api.channel.channel_service_stub.ChannelServiceStub google.appengine.api.datastore_file_stub.DatastoreFileStub google.appengine.api.files.file_service_stub.FileServiceStub google.appengine.api.files.testutil.TestFileServiceStub google.appengine.api.images.images_not_implemented_stub.ImagesNotImplementedServiceStub google.appengine.api.images.images_stub.ImagesServiceStub google.appengine.api.labs.taskqueue.taskqueue_stub.TaskQueueServiceStub google.appengine.api.logservice.logservice_stub.LogServiceStub google.appengine.api.mail_stub.MailServiceStub google.appengine.api.memcache.memcache_stub.MemcacheServiceStub google.appengine.api.modules.modules_stub.ModulesServiceStub google.appengine.api.prospective_search.prospective_search_stub.ProspectiveSearchStub google.appengine.api.remote_socket._remote_socket_stub.RemoteSocketServiceStub google.appengine.api.search.simple_search_stub.SearchServiceStub google.appengine.api.system.system_stub.SystemServiceStub google.appengine.api.taskqueue.taskqueue_stub.TaskQueueServiceStub google.appengine.api.urlfetch_stub.URLFetchServiceStub google.appengine.api.user_service_stub.UserServiceStub google.appengine.api.xmpp.xmpp_service_stub.XmppServiceStub

Public Member Functions

def __init__
 
def CreateRPC
 
def MakeSyncCall
 
def SetError
 

Public Attributes

 request_data
 

Static Public Attributes

 THREADSAFE = False
 

Detailed Description

Base class for implementing API proxy stub classes.

To implement an API proxy stub:
  - Extend this class.
  - Override __init__ to pass in appropriate default service name.
  - Implement service methods as _Dynamic_<method>(request, response).

Constructor & Destructor Documentation

def google.appengine.api.apiproxy_stub.APIProxyStub.__init__ (   self,
  service_name,
  max_request_size = MAX_REQUEST_SIZE,
  request_data = None 
)
Constructor.

Args:
  service_name: Service name expected for all calls.
  max_request_size: int, maximum allowable size of the incoming request.  A
apiproxy_errors.RequestTooLargeError will be raised if the inbound
request exceeds this size.  Default is 1 MB.
  request_data: A request_info.RequestInfo instance used to look up state
associated with the request that generated an API call.

Member Function Documentation

def google.appengine.api.apiproxy_stub.APIProxyStub.CreateRPC (   self)
Creates RPC object instance.

Returns:
  a instance of RPC.
def google.appengine.api.apiproxy_stub.APIProxyStub.MakeSyncCall (   self,
  service,
  call,
  request,
  response,
  request_id = None 
)
The main RPC entry point.

Args:
  service: Must be name as provided to service_name of constructor.
  call: A string representing the rpc to make.  Must be part of
the underlying services methods and impemented by _Dynamic_<call>.
  request: A protocol buffer of the type corresponding to 'call'.
  response: A protocol buffer of the type corresponding to 'call'.
  request_id: A unique string identifying the request associated with the
  API call.
def google.appengine.api.apiproxy_stub.APIProxyStub.SetError (   self,
  error,
  method = None,
  error_rate = 1 
)
Set an error condition that may be raised when calls made to stub.

If a method is specified, the error will only apply to that call.
The error rate is applied to the method specified or all calls if
method is not set.

Args:
  error: An instance of apiproxy_errors.Error or None for no error.
  method: A string representing the method that the error will affect.
  error_rate: a number from [0, 1] that sets the chance of the error,
defaults to 1.

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