Purpose

There are some Java classes which are used in several of the event handlers. implementation and use of these classes point out some useful design patterns.

The shared classes are implemented so that they will operate correctly in the multi-threaded event handler environment. The only instance data those classes use is initialized when a class instance is created, and remains constant after that. The class methods called by the event handlers will only change local — not instance — variables.

Each model which uses the shared classes uses a modified ant build file. Before the event handlers for a model are compiled, the shared classes are rebuilt if they are out of date. The shared class build file then brings each model's copy of the shared Jar file up to date if necessary. This keeps the shared source code in one place, so that modifications are easily shared by all model event handlers.

See the Javadocs for the details of how these classes are implemented.