|  | ## Cheshire3 Object Model: Class Server

Module baseObjects :: Class Server

## Class Server
source code

Object Tree:

               object --+
                        |
    configParser.C3Object --+
                            |
                           Server

Known Subclasses:
  server.SimpleServer

A Server object is a collection point for other objects, and an initial entry into the system for requests from a ProtocolHandler. A server might know about several Databases, RecordStores and so forth, but its main function is to check whether the request should be accepted or not and create an environment in which the request can be processed. It will likely have access to a UserStore database which maintains authentication and authorisation information. The exact nature of this information is not defined, allowing many possible backend implementations. Servers are the top level of configuration for the system and hence their constructor requires the path to a local XML configuration file, however from then on configuration information may be retrieved from other locations such as a remote datastore to enable distributed environments to maintain synchronicity.
Instance Methods

__init__(self, session, configFile="serverConfig.xml") The constructer takes a Session object and a file path to the configuration file to be parsed and processed.
authenticate(self, session, req) Handle authentication of session/request and establish user profile.
connect(self, session, connection) Accept a connection to the server and perform any per session initialisation
disconnect(self, session, req) Called when a connection is dropped to perform any end of session tidying.
Inherited from `configParser.C3Object`: `auth_function`, `get_config`, `get_default`, `get_object`, `get_path`, `get_setting`, `log_function`, `unauth_function`, `unlog_function` Inherited from `configParser.C3Object` (private): `_getDomFromFile`, `_handleConfigNode`, `_parseIncludes`, `_recurseSubConfigs`, `_verifyDefault`, `_verifyOption`, `_verifySetting` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables

authStore |
databases |
queryStore |
resultSetStore |
Inherited from `configParser.C3Object`: `configStore`, `defaults`, `functionLogger`, `id`, `name`, `objectType`, `objects`, `parent`, `paths`, `permissionHandlers`, `settings`, `subConfigs`, `unresolvedObjects` Inherited from `configParser.C3Object` (private): `_includeConfigStores`, `_objectRefs` Inherited from `object`: `__class__`

Method Details

### __init__(self, session, configFile="serverConfig.xml") (Constructor) | source code
The constructer takes a Session object and a file path to the configuration file to be parsed and processed. Overrides: configParser.C3Object.__init__

### authenticate(self, session, req) | source code
Handle authentication of session/request and establish user profile.

### connect(self, session, connection) | source code
Accept a connection to the server and perform any per session initialisation

### disconnect(self, session, req) | source code
Called when a connection is dropped to perform any end of session tidying.

Class Variable Details

    ### authStore Value:
        None

    ### databases Value:
        {}

    ### queryStore Value:
        None

    ### resultSetStore Value:
        None