public class ImagingModule extends Object implements info.magnolia.module.ModuleLifecycle
Constructor and Description |
---|
ImagingModule() |
Modifier and Type | Method and Description |
---|---|
void |
addGenerator(String name,
ImageGenerator generator) |
Map<String,ImageGenerator> |
getGenerators() |
void |
setGenerators(Map<String,ImageGenerator> generators) |
void |
start(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
Scan for additional plugins when module starts.
|
void |
stop(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
De-registers all plugins which have the
current thread's context class loader
as its class loader when the module is stopped, to avoid class/resource leak. |
public void addGenerator(String name, ImageGenerator generator)
public void setGenerators(Map<String,ImageGenerator> generators)
public Map<String,ImageGenerator> getGenerators()
public void start(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
start
in interface info.magnolia.module.ModuleLifecycle
ImageIO.scanForPlugins()
public void stop(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
current thread's context class loader
as its class loader when the module is stopped, to avoid class/resource leak.
This is taken from com.twelvemonkeys.servlet.image.IIOProviderContextListener and the details are explained here:
https://github.com/haraldk/TwelveMonkeys#deploying-the-plugins-in-a-web-app .stop
in interface info.magnolia.module.ModuleLifecycle
Copyright © 2015 Magnolia International Ltd.. All rights reserved.