App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | List of all members
google.appengine.api.apiproxy_stub_map.ListOfHooks Class Reference
Inheritance diagram for google.appengine.api.apiproxy_stub_map.ListOfHooks:

Public Member Functions

def __init__
 
def __len__
 
def Append
 
def Push
 
def Clear
 
def Call
 

Detailed Description

An ordered collection of hooks for a particular API call.

A hook is a function that has exactly the same signature as
a service stub. It will be called before or after an api hook is
executed, depending on whether this list is for precall of postcall hooks.
Hooks can be used for debugging purposes (check certain
pre- or postconditions on api calls) or to apply patches to protocol
buffers before/after a call gets submitted.

Constructor & Destructor Documentation

def google.appengine.api.apiproxy_stub_map.ListOfHooks.__init__ (   self)
Constructor.

Member Function Documentation

def google.appengine.api.apiproxy_stub_map.ListOfHooks.__len__ (   self)
Returns the amount of elements in the collection.
def google.appengine.api.apiproxy_stub_map.ListOfHooks.Append (   self,
  key,
  function,
  service = None 
)
Appends a hook at the end of the list.

Args:
  key: a unique key (within the module) for this particular function.
If something from the same module with the same key is already
registered, nothing will be added.
  function: the hook to be added.
  service: optional argument that restricts the hook to a particular api

Returns:
  True if the collection was modified.
def google.appengine.api.apiproxy_stub_map.ListOfHooks.Call (   self,
  service,
  call,
  request,
  response,
  rpc = None,
  error = None 
)
Invokes all hooks in this collection.

NOTE: For backwards compatibility, if error is not None, hooks
with 4 or 5 arguments are *not* called.  This situation
(error=None) only occurs when the RPC request raised an exception;
in the past no hooks would be called at all in that case.

Args:
  service: string representing which service to call
  call: string representing which function to call
  request: protocol buffer for the request
  response: protocol buffer for the response
  rpc: optional RPC used to make this call
  error: optional Exception instance to be passed as 6th argument
def google.appengine.api.apiproxy_stub_map.ListOfHooks.Clear (   self)
Removes all hooks from the list (useful for unit tests).
def google.appengine.api.apiproxy_stub_map.ListOfHooks.Push (   self,
  key,
  function,
  service = None 
)
Inserts a hook at the beginning of the list.

Args:
  key: a unique key (within the module) for this particular function.
If something from the same module with the same key is already
registered, nothing will be added.
  function: the hook to be added.
  service: optional argument that restricts the hook to a particular api

Returns:
  True if the collection was modified.

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