@Contract
public interface LifecyclePolicy
Modules that wish to invoke special logic when it is loaded, started
or stopped should implement this interface.
To define an implementation of this in a module, write a class
that implements this interface and puts Service on it.
Maven will take care of the rest.
- Author:
- dochez
- See Also:
-
Method Summary
-
Method Details
-
start
Callback when the module enters theREADYstate. This is a good time to do any type of one time initialization or set up access to resources- Parameters:
module- the module instance
-
stop
Callback before the module starts being unloaded. The runtime will free all the module resources and returned to aNEWstate.- Parameters:
module- the module instance
-