pyre.components.Component

Module Contents

class pyre.components.Component.Component(name, locator, **kwds)

Bases: pyre.components.Configurable.Configurable

The base class for all components

pyre_inventory
pyre_implements
pyre_isComponent = True
pyre_setTrait(self, alias, value, priority=None, locator=None)

Assign {value} to the trait named {alias}

pyre_getTrait(self, alias)

Retrieve the value and meta-data associated with the trait named {alias}

pyre_registered(self)

Hook that gets invoked by the framework after the component instance has been registered but before any configuration events

pyre_configured(self)

Hook that gets invoked by the framework after the component instance has been configured but before the binding of any of its traits

pyre_initialized(self)

Hook that gets invoked by the framework right before the component is put into action. The component is now in a known good state, with all configurable traits fully bound and validated. This is the place where the component should acquire whatever further resources it requires.

pyre_finalized(self)

Hook that gets invoked by the framework right before the component is decommissioned. The instance should release all acquired resources.

pyre_slot(self, attribute=None)

Return the slot associated with {attribute}; if no attribute s given, return the slot with the component instance itself

pyre_how(self, attribute)

Return the priority associated with {attribute}

pyre_where(self, attribute=None)

Return the locator associated with {attribute}; if no attribute name is given, return the locator of the component instance

__str__(self)
__getattr__(self, name)

Trap attribute lookup errors and attempt to resolve the name in my inventory’s name map. This makes it possible to get the value of a trait by using any of its aliases.

__setattr__(self, name, value)

Trap attribute assignment and attempt to normalize the name before making the assignment