The plugin manager and lookup

A plugin manager allows plugins to be added (i.e. plugged in) using its add() method. Those plugins which have been added can then use the manager to look up other plugins and talk to them.

When a plugin is added it may be given a string name. It is also given an initialisation parameter and told whether to initialise immediately or to wait until needed.

A lookup is achieved by matching a plugin name or its type (i.e. class type or interface). The plugin manager ensures each matching plugin is initialised successfully before it can be returned from a lookup() method call. So if it isn't already initialised it happens then, and if the initialisation fails then that plugin is removed from the plugin manager and not returned.

Nik Silver 2002-03-09