Package twisted :: Package web :: Module server :: Class Site
[show private | hide private]
[frames | no frames]

Class Site

  Factory --+        
            |        
ServerFactory --+    
                |    
      HTTPFactory --+
                    |
                   Site


Method Summary
  __init__(self, resource, logPath)
Initialize.
  __getstate__(self)
  buildProtocol(self, addr)
Generate a channel attached to this site.
  doStart(self)
Make sure startFactory is called. (inherited from Factory)
  doStop(self)
Make sure stopFactory is called. (inherited from Factory)
  getChildWithDefault(self, pathEl, request)
Emulate a resource's getChild method.
  getResourceFor(self, request)
Get a resource for a request.
  getSession(self, uid)
Get a previously generated session, by its unique ID.
  log(self, request)
Log a request's result to the logfile, by default in combined log format. (inherited from HTTPFactory)
  makeSession(self)
Generate a new Session instance, and store it for future reference.
  render(self, request)
Redirect because a Site is always a directory.
  startFactory(self)
This will be called before I begin listening on a Port or Connector. (inherited from HTTPFactory)
  stopFactory(self)
This will be called before I stop listening on all Ports/Connectors. (inherited from HTTPFactory)

Class Variable Summary
int counter
int isLeaf

Method Details

__init__(self, resource, logPath=None)
(Constructor)

Initialize.

buildProtocol(self, addr)

Generate a channel attached to this site.

getChildWithDefault(self, pathEl, request)

Emulate a resource's getChild method.

getResourceFor(self, request)

Get a resource for a request.

This iterates through the resource heirarchy, calling getChildWithDefault on each resource it finds for a path element, stopping when it hits an element where isLeaf is true.

getSession(self, uid)

Get a previously generated session, by its unique ID. This raises a KeyError if the session is not found.

makeSession(self)

Generate a new Session instance, and store it for future reference.

render(self, request)

Redirect because a Site is always a directory.

Class Variable Details

counter

Type:
int
Value:
0                                                                      

isLeaf

Type:
int
Value:
0                                                                      

Generated by Epydoc 1.1 on Sat Feb 15 21:18:16 2003 http://epydoc.sf.net