use of org.mule.runtime.core.api.extension.RuntimeExtensionModelProvider in project mule by mulesoft.
the class ExtensionModelDiscoverer method discoverRuntimeExtensionModels.
/**
* Discover the extension models provided by the runtime.
*
* @return {@link Set} of the runtime provided {@link ExtensionModel}s.
*/
public Set<ExtensionModel> discoverRuntimeExtensionModels() {
final Set<ExtensionModel> extensionModels = new HashSet<>();
Collection<RuntimeExtensionModelProvider> runtimeExtensionModelProviders = new SpiServiceRegistry().lookupProviders(RuntimeExtensionModelProvider.class, Thread.currentThread().getContextClassLoader());
for (RuntimeExtensionModelProvider runtimeExtensionModelProvider : runtimeExtensionModelProviders) {
extensionModels.add(runtimeExtensionModelProvider.createExtensionModel());
}
return extensionModels;
}
Aggregations