public interface IExternalModule
Main classes of external modules must implement this interface.
Main classes are also required to have a no-arg constructor.
See https://sites.google.com/site/scelight/external-modules for general info about external modules.
void init(IExtModManifestBean manifest, IServices services, IModEnv modEnv) throws java.lang.Exception
If this method throws an
destroy() method will be called and the module will be discarded.
If initialization fails (the module cannot initialize itself), an
Exception must be thrown to indicate the failure.
This method must not perform lengthy operations! If initialization task takes long, they must to be performed in separate threads / jobs. For
example if a module accesses network resources (e.g. connects to an external web server), since the connection time and the availability / reliability of
an independent server cannot be assured, it must be performed in a new thread.
The "Scelight way" to create and use threads is via using
Instances of these advanced threads can be acquired by the
manifest- external module manifest loaded from the
"Scelight-mod-x-manifest.xml"file from the version folder of the external module root folder; should be stored by the module if the module intends to use it later
services- module-independent services provided for the module; should be stored by the module if the module intends to use it later
modEnv- external module environment, can be used to acquire external module specific info
java.lang.Exception- must be thrown if initialization fails
The module should release all allocated resources and stop all background jobs and threads created by it.
The module cannot perform any tasks after returning from this method because the application may be terminated at any time.
This method will be called if the module is instantiated successfully, even if the
init(IExtModManifestBean, IServices, IModEnv) method throws
Exception will be silently discarded.
This API documentation is public and is intended for / allowed to be used by anyone.
Scelight home page: https://sites.google.com/site/scelight/
Scelight is a trademark of András Belicza. Copyright © András Belicza, 2013-2015. All rights reserved.