Search in sources :

Example 1 with PluginContext

use of org.apache.ignite.plugin.PluginContext in project ignite by apache.

the class IgnitePluginProcessor method createComponent.

/**
     * @param cls Component class.
     * @param <T> Component type.
     * @return Component class instance or {@code null} if no one plugin override this component.
     */
public <T> T createComponent(Class<T> cls) {
    for (PluginProvider plugin : plugins.values()) {
        PluginContext ctx = pluginContextForProvider(plugin);
        T comp = (T) plugin.createComponent(ctx, cls);
        if (comp != null)
            return comp;
    }
    return null;
}
Also used : GridPluginContext(org.apache.ignite.internal.GridPluginContext) PluginContext(org.apache.ignite.plugin.PluginContext) PluginProvider(org.apache.ignite.plugin.PluginProvider)

Aggregations

GridPluginContext (org.apache.ignite.internal.GridPluginContext)1 PluginContext (org.apache.ignite.plugin.PluginContext)1 PluginProvider (org.apache.ignite.plugin.PluginProvider)1