Module Installer Framework

Document #: 231ZR021
Authors: N. Asokan (ZRL)
Editor: N. Asokan (ZRL)
Reviewer: CRM
Status: Draft Version. 1, SEMPER internal
Date: April 25, 1997


Abstract

This document describes the semper.util.install package which provides a framework for intsalling and uninstalling third-party modules into SEMPER. This description is about a first-cut design and prototype.

Introduction

This document describes the semper.util.install package which provides a framework for intsalling and uninstalling third-party modules into SEMPER. This description is about a first-cut design and prototype. Eventually, this design/implementation should be merged with the overall SEMPER framework for downloading and installing applications and module updates (see SEMPER activity paper 321IN010). Check the source for the semper.util.install for more recent versions of this document. The basic services for installation/uninstallation are provided by the Installer class. It also provides a menu-launchable Installer application that makes use of these services.

The "distribution" of the module must be available in a separate directory. The directory should contain:

For interactive installation, the properties file must be named props.txt.

The installation process consists of the following steps:

The uninstallation process takes similar but opposite steps.

Installation Hooks

Installation hooks provide a means to include additional code to be executed by the Installer when a module is being installed/uninstalled. As noted above, there are two types of installation hooks available.

A block can implement the BlockInstallHook interface in a class and register the class with the Installer. The Installer will invoke the appropriate interface methods from an object of this class whenever a module is installed into the block. See payment block installation hook for an example.

The module itself can avail itself of an installation hook by having a class named Install which implements the ModuleInstallHook interface. The class must be available in the main package for that module (i.e. the package named semper.<BLOCK>.<MODULE-NAME> For example, the installation hook for the SET module of the payment block must be named semper.payment.SET.Install).

Example

Consider the following example: suppose you work for Digicash (DIC) and you happen to have a module named ecash. It belongs to the payment block. It comes with a shared library with the base name ecash. It also has two java packages: semper.payment.ecash and Digicash. Since it belongs to the payment blocks, it has a sub class of the Purse class called semper.payment.ecash.ecashPurse. Finally, the native ecash shared library uses the environment variable ECASH_TMPDIR to figure out the name of the directory for temporary files. To package the ecash module for distribution, you will do the following:

Miscellany

The module installer framework is in package semper.util.install. The documentation includes an index and a tree depicting the class structure.