next up previous contents
Next: Running the xbook manager Up: Writing xbooks Previous: Properties   Contents


Registry

As described in Section 2.2.5, each xbook is registered into a registry file which gets read into the xbook manager. The format of the registry file is as follows:

    <xbook path prefix>: <engine type> <engine args>

Specifically, for a jython xbook, the entry is as follows:

    <xbook path prefix>: JythonEngine <path to handler script> <handler name>

The xbook path prefix is relative to the xbook root directory. Thus if the xbook root directory is /home/ssmallen/xbooks and the xbook example is located in /home/ssmallen/xbooks/example. The entry would look as follows:

    example: JythonEngine script.py ExampleHandler

where script.py is the name of the handler script in the xbook directory and ExampleHandler is the class name of the handler defined inside the file.

The name of the registry file is determined through the configuration variables xbooks.cfg.dir and xbooks.registry.name. Both variables should be defined in the xbook manager's configuration file.



Shava Smallen 2002-12-31