'@param resource: The root of the resource hierarchy.  All request
traversal for requests received by this factory will begin at this
resource.
@type resource: L{IResource} provider
@param requestFactory: Overwrite for default requestFactory.
@type requestFactory: C{callable} or C{class}.
@see: L{twisted.web.http.HTTPFactory.__init__}'

def __init__(self, resource, requestFactory=None, *args, **kwargs):

    http.HTTPFactory.__init__(self, *args, **kwargs)
    self.sessions = {}
    self.resource = resource
    if (requestFactory is not None):
        self.requestFactory = requestFactory
