class documentation

class NameVirtualHost(resource.Resource): (source)

View In Hierarchy

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.
default = (source)

Undocumented

def __init__(self): (source)
hosts = (source)

Undocumented

(type: dict)
def listStaticEntities(self): (source)
def getStaticEntity(self, name): (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 removeHost(self, name): (source)

Remove a host.

def _getResourceForRequest(self, request): (source)

(Internal) Get the appropriate resource for the given host.

def render(self, request): (source)

Implementation of resource.Resource's render method.

def getChild(self, path, request): (source)

Implementation of resource.Resource's getChild method.

API Documentation for Twisted, generated by pydoctor 21.2.0 at 2021-02-28 21:00:42.