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.tools.devappserver2.instance.InstanceFactory Class Reference
Inheritance diagram for google.appengine.tools.devappserver2.instance.InstanceFactory:
google.appengine.tools.devappserver2.go_runtime.GoRuntimeInstanceFactory google.appengine.tools.devappserver2.java_runtime.JavaRuntimeInstanceFactory google.appengine.tools.devappserver2.php_runtime.PHPRuntimeInstanceFactory google.appengine.tools.devappserver2.python_runtime.PythonRuntimeInstanceFactory google.appengine.tools.devappserver2.vm_runtime_proxy.VMRuntimeInstanceFactory

Public Member Functions

def __init__
 
def get_restart_directories
 
def files_changed
 
def configuration_changed
 
def new_instance
 

Public Attributes

 request_data
 
 max_concurrent_requests
 
 max_background_threads
 

Static Public Attributes

 START_URL_MAP = None
 
 WARMUP_URL_MAP = None
 
 SUPPORTS_INTERACTIVE_REQUESTS = False
 
 FILE_CHANGE_INSTANCE_RESTART_POLICY = None
 

Detailed Description

An abstract factory that creates instances for an InstancePool.

Attributes:
  max_concurrent_requests: The maximum number of concurrent requests that
      Instances created by this factory can handle. If the Instances do not
      support concurrent requests then the value should be 1.
  START_URL_MAP: An apinfo.URLMap that should be used as the default
      /_ah/start handler if no user-specified script handler matches.
  WARMUP_URL_MAP: An apinfo.URLMap that should be used as the default
      /_ah/warmup handler if no user-specified script handler matches.

Constructor & Destructor Documentation

def google.appengine.tools.devappserver2.instance.InstanceFactory.__init__ (   self,
  request_data,
  max_concurrent_requests,
  max_background_threads = 0 
)
Initializer for InstanceFactory.

Args:
  request_data: A wsgi_request_info.WSGIRequestInfo instance that will be
  populated with Instance data for use by the API stubs.
  max_concurrent_requests: The maximum number of concurrent requests that
  Instances created by this factory can handle. If the Instances do not
  support concurrent requests then the value should be 1.
  max_background_threads: The maximum number of background threads that
  the instance can handle. If the instance does not support background
  threads then the value should be 0.

Member Function Documentation

def google.appengine.tools.devappserver2.instance.InstanceFactory.configuration_changed (   self,
  config_changes 
)
Called when the configuration of the module has changed.

Args:
  config_changes: A set containing the changes that occured. See the
  *_CHANGED constants in the application_configuration module.
def google.appengine.tools.devappserver2.instance.InstanceFactory.files_changed (   self)
Called when a file relevant to the factory *might* have changed.
def google.appengine.tools.devappserver2.instance.InstanceFactory.get_restart_directories (   self)
Returns a list of directories changes in which should trigger a restart.

Returns:
  A list of directory paths. Changes (i.e. files added, deleted or modified)
  in these directories will trigger the restart of all instances created
  with this factory.
def google.appengine.tools.devappserver2.instance.InstanceFactory.new_instance (   self,
  instance_id,
  expect_ready_request = False 
)
Create and return a new Instance.

Args:
  instance_id: A string or integer representing the unique (per module) id
  of the instance.
  expect_ready_request: If True then the instance will be sent a special
  request (i.e. /_ah/warmup or /_ah/start) before it can handle external
  requests.

Returns:
  The newly created instance.Instance.

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