Wrap an IResource so that whenever it or a child of it completes rendering, the cred logout hook will be invoked.

An assumption is made here that exactly one IResource from among avatar and all of its children will be rendered. If more than one is rendered, logout will be invoked multiple times and probably earlier than desired.

Method getChildWithDefault Pass through the lookup to the wrapped resource, wrapping the result in ResourceWrapper to ensure logout is called when rendering of the child is complete.
Method render Hook into response generation so that when rendering has finished completely (with or without error), logout is called.
def getChildWithDefault(self, name, request): (source)

Pass through the lookup to the wrapped resource, wrapping the result in ResourceWrapper to ensure logout is called when rendering of the child is complete.

def render(self, request): (source)

Hook into response generation so that when rendering has finished completely (with or without error), logout is called.

API Documentation for Twisted, generated by pydoctor at 2020-03-20 23:54:06.