Package com.chillycheesy.modulo.modules
Class ModuleAdapter
java.lang.Object
com.chillycheesy.modulo.modules.ModuleEntityAdapter
com.chillycheesy.modulo.config.ConfigurableEntity
com.chillycheesy.modulo.modules.Module
com.chillycheesy.modulo.modules.ModuleAdapter
- All Implemented Interfaces:
ModuloEntity
-
Field Summary
Fields inherited from class com.chillycheesy.modulo.config.ConfigurableEntity
autoSave, configurationFactory, defaultConfiguration, loaderStrategy
-
Constructor Summary
ConstructorsConstructorDescriptionModuleAdapter(ModuleConfig config)
Init your module by passing theModuleConfig
objectModuleAdapter(String name, String version, List<String> authors, List<String> dependencies, List<String> softDependencies, String main)
-
Method Summary
Modifier and TypeMethodDescriptionprotected <E extends Throwable>
voidonLoad()
Method called when theModule.load()
method is calledprotected <E extends Throwable>
voidonStart()
Method called when theModule.start()
method is calledprotected <E extends Throwable>
voidonStop()
Method called when theModule.stop()
method is calledMethods inherited from class com.chillycheesy.modulo.modules.Module
debug, equals, error, getAuthors, getConfig, getDependencies, getJarFile, getMain, getName, getSoftDependencies, getVersion, info, load, setAuthors, setConfig, setDependencies, setJarFile, setMain, setName, setSoftDependencies, setVersion, start, stop
Methods inherited from class com.chillycheesy.modulo.config.ConfigurableEntity
enableAutoSave, getConfiguration, getConfigurationFactory, getLoaderStrategy, load, setConfiguration, setConfigurationFactory
-
Constructor Details
-
ModuleAdapter
public ModuleAdapter(String name, String version, List<String> authors, List<String> dependencies, List<String> softDependencies, String main)- Parameters:
name
- it's how your HTModule will be call by HomeTracker
note that two HTModules can't have the same name (you won't be able to add it to theModuleManager
version
- the actual version of your moduleauthors
- the list of persons that works on your moduledependencies
- the list of modules that your module need to work, the dependencies will be load before your module get load by theModuleLoader
(your module cannot load without them)softDependencies
- the list of modules that your module can use to work with but without being an obligation (your module can load without them)main
- the main file of your jar (example: com.dev.MyAwesomeModule)
-
ModuleAdapter
Init your module by passing theModuleConfig
object- Parameters:
config
- the configuration of your module
-
ModuleAdapter
public ModuleAdapter()
-
-
Method Details
-
onLoad
Method called when theModule.load()
method is called -
onStart
Method called when theModule.start()
method is called -
onStop
Method called when theModule.stop()
method is called
-