Package glass :: Module ServerContext :: Class ServerContext
[show private | hide private]
[frames | no frames]

Class ServerContext

ContainerClass --+
                 |
                ServerContext


This is a "configuration" class for server contexts.

It's job is just to hold data. If you subclass this class, it will provide defaults for everything.

The following attributes are used. Note, each has a class default.

doc_root
This is the document root. If there is an "htdocs" directory in the current directory, that is used. Otherwise, the default is os.curdir. You may use a zip file for your document root.
mounts
This is a list of tuples of the form [(url_path, path_translated)], for instance, [("/log", "/var/log")]. More than one tuple may use the same url_path or path_translated. Basically, I'll go down the list and whoever has the file I'm looking for first wins. You can even use "/" as your url_path. Conceptually, the first item in mounts is implicitly ("/", doc_root). You may use a zip file for path_translated. If url_path doesn't end in "/", I'll add one implicitly; otherwise things get too confusing. The default value for mounts is [].
server_name
This is the server name used for CGI's SERVER_NAME. The default is whatever is received by the server (None will be used for the time being).
request_queue_size
How big should the queue be for waiting requests? The default is 20.
aquarium_entry_point
This is the name of the entry point into Aquarium. By default, it's aquarium.util.Aquarium. This is the hook to use if you need to subclass that module.

Method Summary
    Inherited from ContainerClass
  __init__(self, **kargs)
Shove all of the keyword arguments into self.
  __repr__(self)
  update(self, dict)
Mimics a dicts update method.

Class Variable Summary
str aquarium_entry_point = 'aquarium.util.Aquarium'
str doc_root = '.'
list mounts = []
int request_queue_size = 20                                                                    
NoneType server_name = None                                                                  

Class Variable Details

aquarium_entry_point

Type:
str
Value:
'aquarium.util.Aquarium'                                               

doc_root

Type:
str
Value:
'.'                                                                    

mounts

Type:
list
Value:
[]                                                                     

request_queue_size

Type:
int
Value:
20                                                                    

server_name

Type:
NoneType
Value:
None                                                                  

Generated by Epydoc 2.1 on Mon Jan 1 16:36:34 2007 http://epydoc.sf.net