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)
  _mkuid(self)
(internal) Generate an opaque, unique ID for a user's session.
  _openLogFile(self, path)
Override in subclasses, e.g.

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.

_mkuid(self)

(internal) Generate an opaque, unique ID for a user's session.

_openLogFile(self, path)

Override in subclasses, e.g. to use twisted.python.logfile.
Overrides:
twisted.protocols.http.HTTPFactory._openLogFile (inherited documentation)

Class Variable Details

counter

Type:
int
Value:
0                                                                      

isLeaf

Type:
int
Value:
0                                                                      

Generated by Epydoc 1.1 on Fri Jun 27 03:49:03 2003 http://epydoc.sf.net