Search results for ContainerManager

Creating plugins  Learn how to create plugins for your components   ContainerManager ContainerListener plugin listener registration extension

The entry point of the API is the ContainerManager. It allows you to define what is the Shared classloader and to create children: how to resolve dependencies for plugins from the plugin file/location how to configure the classloaders (what is the parent classloader, how to handle the parent first/last delegation, and so on). It is recommended to keep the manager running if you can reuse plugins in order to avoid recreating classloaders and to mutualize them. What the shared classloader is Which classes are loaded from the shared loader first (intended to be used for API which should not be loaded from the plugin loader) Which classes are loaded from the parent classloader. This can be useful to prevent loading a "common" library from the parent classloader. For instance, it can be neat for guava, commons-lang3, an so on). Once you have defined a manager, you can create plugins: To create the plugin container, the Resolver resolves the dependencies needed for the plugin, then the manager creates the plugin classloader and registers the plugin Container. Some actions are needed when a plugin is registered or unregistered. For that purpose, you can use ContainerListener: Plugins are directly registered on the manager: