t.w.v.NameVirtualHost(resource.Resource) : class documentation

Part of twisted.web.vhost View Source View In Hierarchy

I am a resource which represents named virtual hosts.
Method __init__ Initialize.
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:

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.
def __init__(self): (source)
Initialize.
def listStaticEntities(self): (source)
Undocumented
def getStaticEntity(self, name): (source)
Undocumented
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 at 2012-06-04 17:20:01.