The DSB provides a way to call specific services/operations once the kernel is started. It can be used for example to start polling things, bind services, ... This type of call is possible by annotating methods you want to call in Fractal component implementations with the specific DSB annotations defined in module dsb-annotations (org/petalslink/dsb/annotations/LifeCycleListener.java).
In the previous code snippet, the #startPolling() method will be called just after all the Fractal components have been started. Its priority is set to 0 which is a low level priority. The LifeCycle Manager component will scan all the Fractal components, and then call the methods in the right order according to their priority ie the greatest first. If some methods are annotated with the same level, they will be called in a total random order (well in fact based on the Java ordering of Method objects put in the same Set).
![]() | For now only public methods which no parameters can be annotated and called like that. |