twisted.python.roots.Homogenous

Package twisted :: Package python :: Module roots :: Class Homogenous |
[frames | no frames]

## Class Homogenous

    Collection --+
                 |
       Constrained --+
                     |
                    Homogenous

Known Subclasses:
  `VirtualHostCollection`

A homogenous collection of entities.

I will only contain entities that are an instance of the class or type specified by my 'entityType' attribute.

Method Summary
| ``entityConstraint`(self, entity)` A method that determines whether an entity may be added to me.
| `getEntityType(self)`
| `getNameType(self)`
Inherited from Constrained
| ``nameConstraint`(self, name)` A method that determines whether an entity may be added to me with a given name.
| ``putEntity`(self, name, entity)` Store an entity if it meets both constraints.
| ``reallyPutEntity`(self, name, entity)`
Inherited from Collection
| ``__init__`(self, entities)` Initialize me.
| ``delEntity`(self, name)` Remove a static reference for 'name'.
| ``getDynamicEntity`(self, name, request)` Subclass this to generate an entity on demand.
| ``getEntity`(self, name, request)` Retrieve an entity from me.
| ``getStaticEntity`(self, name)` Get an entity that was added to me using putEntity.
| ``listDynamicEntities`(self, request)` A list of all name, entity that I can generate on demand.
| ``listDynamicNames`(self)` Retrieve a list of the names of entities that I store references to.
| ``listEntities`(self, request)` Retrieve a list of all name, entity pairs I contain.
| ``listNames`(self, request)` Retrieve a list of all names for entities that I contain.
| ``listStaticEntities`(self)` Retrieve a list of all name, entity pairs that I store references to.
| ``listStaticNames`(self)` Retrieve a list of the names of entities that I store references to.
| ``removeEntity`(self, name, request)` Remove an entity for 'name', based on the content of 'request'.
| ``storeEntity`(self, name, request)` Store an entity for 'name', based on the content of 'request'.

Class Variable Summary
`type` | `entityType` = `types.instance`

Method Details

### entityConstraint(self, entity) A method that determines whether an entity may be added to me. If the constraint is satisfied, return 1; if the constraint is not satisfied, either return 0 or raise a descriptive ConstraintViolation. Overrides: `twisted.python.roots.Constrained.entityConstraint` (inherited documentation)

Generated by Epydoc 2.0 on Sat May 15 20:08:33 2004 | http://epydoc.sf.net