A plugin is any class which implements the IPlugin
interface in org.jtrix.project.beatrix.plugins.
At this stage we don't need to worry about what's in this interface,
although it's quite simple.
Plugins are collected together into a plugin manager object.
Any object which implements IPluginManager (in the same package
as IPlugin) is considered a plugin manager.
Any class which thinks it might benefit from having a plugin-style
architecture can be a plugin manager, and any class which wants to
provide ``pluggable'' features can be a plugin. Here are some
examples:
- The class WorkerPool is a tool that organises groups
of worker netlets. But there are some application-specific things
it doesn't know: what kind of resources they need, if any extra action
is needed when a new one starts, etc. So WorkerPool is a
plugin manager. It relies on plugins to provide this extra intelligence.
- The class ServiceManager is a tool that handles
service requests from consumers, checking security, etc. But it doesn't
carry the functionality of the services themselves. Therefore it is
a plugin manager, relying on plugins themselves to provide the service
functionality.
- The class Manager represents a manager netlet. It knows it
should provide workers and services, but they could be of various
kinds. Therefore it is a plugin manager. It relies on worker pools
and service managers as plugins for those extra details. So we can
see that WorkerPool and ServiceManager
are plugins themselves as well as plugin managers.
Nik Silver
2002-03-09