class documentation

class NameVirtualHost(resource.Resource): (source)

View In Hierarchy

I am a resource which represents named virtual hosts.
Method __init__ Initialize.
Method add​Host Add a host to this virtual host.
Method get​Child Implementation of resource.Resource's getChild method.
Method get​Static​Entity Undocumented
Method list​Static​Entities Undocumented
Method remove​Host Remove a host.
Method render Implementation of resource.Resource's render method.
Class Variable default Undocumented
Instance Variable hosts Undocumented
Method _get​Resource​For​Request (Internal) Get the appropriate resource for the given host.

Inherited from Resource:

Method del​Entity Undocumented
Method get​Child​For​Request Undocumented
Method get​Child​With​Default Retrieve a static or dynamically generated child resource from me.
Method get​Dynamic​Entity Undocumented
Method list​Dynamic​Entities Undocumented
Method list​Dynamic​Names Undocumented
Method list​Entities Undocumented
Method list​Names Undocumented
Method list​Static​Names Undocumented
Method put​Child Register a static child.
Method really​Put​Entity Undocumented
Method render_​HEAD Default handling of HEAD method.
Class Variable is​Leaf 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.