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):
def listStaticEntities(self):
def getStaticEntity(self, name):
def addHost(self, name, resrc):

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):

Remove a host.

def _getResourceForRequest(self, request):

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

def render(self, request):

Implementation of resource.Resource's render method.

def getChild(self, path, request):

Implementation of resource.Resource's getChild method.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.