use of org.ow2.proactive.resourcemanager.nodesource.NodeSourcePlugin in project scheduling by ow2-proactive.
the class NodeSourceParameterHelper method getPluginConfigurableFields.
public Collection<ConfigurableField> getPluginConfigurableFields(String pluginClassName) throws PluginNotFoundException {
Class<NodeSourcePlugin> pluginClass = this.getPluginClassOrFail(pluginClassName);
PluginDescriptor policyPluginDescriptor = new PluginDescriptor(pluginClass, AddonClassUtils.instantiateAddon(pluginClass), new HashMap<>());
return policyPluginDescriptor.getConfigurableFields();
}
use of org.ow2.proactive.resourcemanager.nodesource.NodeSourcePlugin in project scheduling by ow2-proactive.
the class NodeSourceParameterHelper method getPluginClassOrFail.
private Class<NodeSourcePlugin> getPluginClassOrFail(String pluginClassName) throws PluginNotFoundException {
Class<NodeSourcePlugin> pluginClass;
try {
ClassLoader currentClassLoader = this.getClass().getClassLoader();
pluginClass = (Class<NodeSourcePlugin>) AddonClassUtils.loadClass(pluginClassName, currentClassLoader);
} catch (ClassNotFoundException e) {
throw new PluginNotFoundException(pluginClassName, e);
}
return pluginClass;
}
Aggregations