use of org.apache.kafka.connect.runtime.rest.entities.ConnectorPluginInfo in project kafka by apache.
the class PluginDiscovery method connectorPlugins.
private static List<ConnectorPluginInfo> connectorPlugins(Reflections reflections) {
final Set<Class<? extends Connector>> connectorClasses = reflections.getSubTypesOf(Connector.class);
connectorClasses.removeAll(CONNECTOR_EXCLUDES);
final List<ConnectorPluginInfo> connectorPlugins = new ArrayList<>(connectorClasses.size());
for (Class<? extends Connector> connectorClass : connectorClasses) {
if (isConcrete(connectorClass)) {
connectorPlugins.add(new ConnectorPluginInfo(connectorClass.getCanonicalName()));
}
}
Collections.sort(connectorPlugins, new Comparator<ConnectorPluginInfo>() {
@Override
public int compare(ConnectorPluginInfo a, ConnectorPluginInfo b) {
return a.clazz().compareTo(b.clazz());
}
});
return connectorPlugins;
}
Aggregations