The Application Registry is a more sophisticated version of the widely used singleton pattern. It allows the registration of services with a central component that manages the lifecycle of those services.
IApplicationRegistry
The interface IApplicationRegistry provides accessors for the following:
various services such as the queue registry and exchange registry
ApplicationRegistry
The abstract class ApplicationRegistry is a partial implementation of IApplicationRegistry that provides an implementation of the configured object cache as well as providing singleton access to the concrete application registry.
Subclasses should instantiate the appropriate services in order to provide access to them. Initialisation of these must be done in the initialise method so that those services can use the ApplicationRegistry themselves - attempting to initialise services in the constructor can result in NullPointerExceptions if they use the registry.