1.9 The Reaction Packages

Before introducing the various components of the Reaction framework in detail, it is worth reviewing the package structure of the framework distribution. The root package name is com.zynaptic.reaction and this is subdivided into the following packages:

com.zynaptic.reaction

This is the API package which provides the complete external API for the Reaction framework. Application code only needs to include the API package in order to make full use of an active reactor. When running as an OSGi service, the API package is the only package exported by the Reaction service.

com.zynaptic.reaction.core

The core package provides the main functionality of the Reaction framework. In addition, it provides the API which is used for managing the lifecycle of the reactor component. When using the Reaction framework in a POJO application, the application is able to use this API to initialise and run the application. When used as an OSGi service this process is automated by the OSGi bundle activator.

com.zynaptic.reaction.util

The utility package contains common support classes for the Reaction framework. It is provided because certain aspects of the framework setup, such as logging and the monotonic clock source will vary between deployments. The relevant components have been collected in the utility package in order to provide a range of alternate implementations.

com.zynaptic.reaction.osgi

The OSGi package includes the additional infrastructure code which is required to wrap the Reaction framework as an OSGi service.

com.zynaptic.reaction.examples.reactor
com.zynaptic.reaction.examples.timer
com.zynaptic.reaction.examples.signal
com.zynaptic.reaction.examples.deferred
com.zynaptic.reaction.examples.thread
com.zynaptic.reaction.examples.osgi
com.zynaptic.reaction.examples.swing
com.zynaptic.reaction.examples.javafx

The example packages contain source code for the various programming examples described in this text. Where an example is given in the text, the corresponding file in the examples package will be indicated.