use of org.apache.qpid.server.plugin.Pluggable in project qpid-broker-j by apache.
the class PluginClassProviderAction method perform.
@Override
public Object perform(Map<String, Object> request, Broker broker) {
try {
String className = (String) request.get("plugin");
QpidServiceLoader serviceLoader = new QpidServiceLoader();
final Class<Pluggable> clazz = (Class<Pluggable>) Class.forName("org.apache.qpid.server.plugin." + className);
List<String> values = new ArrayList<String>();
for (Pluggable instance : serviceLoader.instancesOf(clazz)) {
values.add(instance.getType());
}
return values;
} catch (ClassNotFoundException e) {
return Collections.emptyList();
}
}
Aggregations