class twisted.web.vhost.NameVirtualHost(resource.Resource): (source)
I am a resource which represents named virtual hosts.
Class Variable | default | Undocumented |
Method | __init__ | Initialize. |
Instance Variable | hosts | Undocumented |
Method | listStaticEntities | Undocumented |
Method | getStaticEntity | Undocumented |
Method | addHost | Add a host to this virtual host. |
Method | removeHost | Remove a host. |
Method | render | Implementation of resource.Resource's render method. |
Method | getChild | Implementation of resource.Resource's getChild method. |
Method | _getResourceForRequest | (Internal) Get the appropriate resource for the given host. |
Inherited from Resource:
Class Variable | server | Undocumented |
Instance Variable | children | Undocumented |
Class Variable | isLeaf | Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource. |
Method | listStaticNames | Undocumented |
Method | listNames | Undocumented |
Method | listEntities | Undocumented |
Method | listDynamicNames | Undocumented |
Method | listDynamicEntities | Undocumented |
Method | getDynamicEntity | Undocumented |
Method | delEntity | Undocumented |
Method | reallyPutEntity | Undocumented |
Method | getChildWithDefault | Retrieve a static or dynamically generated child resource from me. |
Method | getChildForRequest | Undocumented |
Method | putChild | Register a static child. |
Method | render_HEAD | Default handling of HEAD method. |
Add a host to this virtual host.
This will take a host named `name', and map it to a resource `resrc'. For example, a setup for our virtual hosts would be:
nvh.addHost('divunal.com', divunalDirectory) nvh.addHost('www.divunal.com', divunalDirectory) nvh.addHost('twistedmatrix.com', twistedMatrixDirectory) nvh.addHost('www.twistedmatrix.com', twistedMatrixDirectory)
(Internal) Get the appropriate resource for the given host.
Implementation of resource.Resource's render method.
Implementation of resource.Resource's getChild method.