All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.buschmais.xo.impl.plugin.PluginRepository Maven / Gradle / Ivy

The newest version!
package com.buschmais.xo.impl.plugin;

/**
 * Interface for plugin repositories providing methods for registration,
 * unregistration and lookup.
 */
public interface PluginRepository {

    /**
     * Return the type of plugins managed by this repository.
     *
     * @return The type of plugins.
     */
    Class getPluginType();

    /**
     * Register a plugin.
     *
     * @param plugin
     *     The plugin instance.
     * @return The key used to identify the plugin.
     */
    Key register(Plugin plugin);

    /**
     * Register a plugin by its type.
     *
     * @param pluginType
     *     The plugin type.
     * @return The key used to identify the plugin.
     */
    Key register(Class pluginType);

    /**
     * Unregister a plugin.
     *
     * @param key
     *     The key.
     */
    void unregister(Key key);

    /**
     * Lookup a plugin.
     *
     * @param key
     *     The key.
     * @return The plugin.
     */
    Plugin get(Key key);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy