Go to the latest version of this document.

# ``twisted`.`web`.`vhost`.`VirtualHostCollection``

class documentation

`class VirtualHostCollection(roots.Homogenous): (source)`

Constructor: `VirtualHostCollection(nvh)`

View In Hierarchy

Wrapper for virtual hosts collection.

This exists for configuration purposes.

Method | `__init__` | Initialize me.
Method | `delEntity` | Remove a static reference for 'name'.
Method | `getStaticEntity` | Get an entity that was added to me using putEntity.
Method | `listStaticEntities` | Retrieve a list of all name, entity pairs that I store references to.
Method | `reallyPutEntity` | Undocumented
Instance Variable | `nvh` | Undocumented

Inherited from `Homogenous`:

Method | `entityConstraint` | A method that determines whether an entity may be added to me.
Method | `getEntityType` | Undocumented
Method | `getNameType` | Undocumented

Inherited from `Constrained` (via `Homogenous`):

Method | `nameConstraint` | A method that determines whether an entity may be added to me with a given name.
Method | `putEntity` | Store an entity if it meets both constraints.

Inherited from `Collection` (via `Homogenous`, `Constrained`):

Method | `getDynamicEntity` | Subclass this to generate an entity on demand.
Method | `getEntity` | Retrieve an entity from me.
Method | `listDynamicEntities` | A list of all name, entity that I can generate on demand.
Method | `listDynamicNames` | Retrieve a list of the names of entities that I store references to.
Method | `listEntities` | Retrieve a list of all name, entity pairs I contain.
Method | `listNames` | Retrieve a list of all names for entities that I contain.
Method | `listStaticNames` | Retrieve a list of the names of entities that I store references to.
Method | `removeEntity` | Remove an entity for 'name', based on the content of 'request'.
Method | `storeEntity` | Store an entity for 'name', based on the content of 'request'.
Instance Variable | `entities` | Undocumented

def __init__(self, nvh): (source)
overrides `twisted.python.roots.Collection.__init__`

Initialize me.

def delEntity(self, name): (source)
overrides `twisted.python.roots.Collection.delEntity`

Remove a static reference for 'name'.

Raises a KeyError if the operation fails.

def getStaticEntity(self, name): (source)
overrides `twisted.python.roots.Collection.getStaticEntity`

Get an entity that was added to me using putEntity.

This method will return 'None' if it fails.

def listStaticEntities(self): (source)
overrides `twisted.python.roots.Collection.listStaticEntities`

Retrieve a list of all name, entity pairs that I store references to.

See getStaticEntity.

def reallyPutEntity(self, name, entity): (source)
overrides `twisted.python.roots.Constrained.reallyPutEntity`

Undocumented

nvh = (source)

Undocumented