Simplify component accessibility.
JRebirth provide 4+1 Facades used to manage its dedicated pattern wB-CS-Mvc.
One Facade to rule them all
JRebirth uses a global facade automatically created by JRebirth AbstractApplication class.
The global facade create automatically the JRebirth notification engine. You should read the Notifier page to have more informations.
The global facade also allow to communicate with the Application class and therefore with its stage and scene.
It allows to manage the three main facades:
The GlobaleFacadeBase allow to get each of these facades by calling appropriate getters:
This link is bidirectionnal because global facade is accessible from the 3 main facades by calling : getGlobalFacade() (each facade extends the AbstractGlobalReady abstract class which implement GlobalReady interface.
There are 4 LocalFacade, each one is responsible of its layer components.
Each Facade can manage its components (also called readyObject) throught some public methods.
Each Component (CSM) are registered into the facade using a UniqueKey, there are 2 options:
The simplest key is the ClassKey, it's only composed by the class object of the component, thus the can only be stored once into the facade (=singleton).
The MultitonKey uses also the class of the component but add a variable part to be able to store several instances of a same Component.
JRebirth API have a lot of method that take the Component Class with additional objects as key parts.
But the API also has a convenient class that provides method tused to build key.