class documentation

class NameVirtualHost(resource.Resource): (source)

View In Hierarchy

I am a resource which represents named virtual hosts.
Method __init__ Initialize.
Method addHost Add a host to this virtual host.
Method getChild Implementation of resource.Resource's getChild method.
Method getStaticEntity Undocumented
Method listStaticEntities Undocumented
Method removeHost Remove a host.
Method render Implementation of resource.Resource's render method.
Class Variable default Undocumented
Instance Variable hosts Undocumented
Method _getResourceForRequest (Internal) Get the appropriate resource for the given host.

Inherited from Resource:

Method delEntity Undocumented
Method getChildForRequest Undocumented
Method getChildWithDefault Retrieve a static or dynamically generated child resource from me.
Method getDynamicEntity Undocumented
Method listDynamicEntities Undocumented
Method listDynamicNames Undocumented
Method listEntities Undocumented
Method listNames Undocumented
Method listStaticNames Undocumented
Method putChild Register a static child.
Method reallyPutEntity Undocumented
Method render_HEAD Default handling of HEAD method.
Class Variable isLeaf Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource.
Class Variable server Undocumented
Instance Variable children Undocumented
def __init__(self): (source)
def addHost(self, name, resrc): (source)

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)
def getChild(self, path, request): (source)
Implementation of resource.Resource's getChild method.
def getStaticEntity(self, name): (source)
def listStaticEntities(self): (source)
def removeHost(self, name): (source)
Remove a host.
def render(self, request): (source)
Implementation of resource.Resource's render method.
default = (source)

Undocumented

hosts: dict = (source)

Undocumented

def _getResourceForRequest(self, request): (source)
(Internal) Get the appropriate resource for the given host.