Package circuits :: Package app :: Module env :: Class Environment

Class Environment

    object --+            
             |            
  core.Manager --+        
                 |        
core.BaseComponent --+    
                     |    
        core.Component --+
                         |
                        Environment

Environment(path, name, version=VERSION, config=CONFIG) -> Environment

Creates a new environment component that by default only holds configuration and logger components.

This component can be extended to provide more complex system and application environments. This component will expose the following events:

Nested Classes

Inherited from core.Component: __metaclass__

Instance Methods
Environment
__init__(path, name, version=VERSION, config=CONFIG)
initializes x; see x.__class__.__doc__ for signature
 
onCREATE(E)
Create a new Environment.
 
onVERIFY(E)
Verify the Environment by checking it's version against the expected version.
 
onLOAD(E, verify=False)
Load the Environment.

Inherited from core.BaseComponent: __repr__, register, unregister

Inherited from core.Manager: __add__, __iadd__, __isub__, __len__, __sub__, flush, join, push, run, send, start, stop

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods

Inherited from core.Component: __new__

Class Variables
  channel = 'env'
The Component's Channel
  version = 1
Instance Variables

Inherited from core.Manager: manager

Properties

Inherited from core.Manager: name, running, state

Inherited from object: __class__

Method Details

__init__(path, name, version=VERSION, config=CONFIG)
(Constructor)

 

initializes x; see x.__class__.__doc__ for signature

Returns: Environment
Overrides: object.__init__
(inherited documentation)

onCREATE(E)

 

Create a new Environment. The Environment path given by self.path must not already exist.

Decorators:
  • @handler("create")

onVERIFY(E)

 

Verify the Environment by checking it's version against the expected version.

If the Environment's version does not match, send an EnvNeedsUpgrade event. If the Environment is invalid and cannot be read, send an Invalid event.

Decorators:
  • @handler("verify")

onLOAD(E, verify=False)

 

Load the Environment. Load the configuration and logging components. If verify=True, verify the Environment first.

Decorators:
  • @handler("load")