public class DefaultExtensionModelLoaderRepository extends Object implements ExtensionModelLoaderRepository, org.mule.runtime.api.lifecycle.Startable, org.mule.runtime.api.lifecycle.Stoppable
ExtensionModelLoaderRepository that uses SPI to look for the ExtensionModelLoader available
from the container.| Constructor and Description |
|---|
DefaultExtensionModelLoaderRepository(ClassLoader containerClassLoader)
Creates an instance of the manager.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<org.mule.runtime.extension.api.loader.ExtensionModelLoader> |
getExtensionModelLoader(LoaderDescriber loaderDescriber)
Retrieves the
ExtensionModelLoader for the given LoaderDescriber. |
void |
setExtensionModelLoadersLookup(Supplier<Collection<org.mule.runtime.extension.api.loader.ExtensionModelLoader>> extModelLoadersLookup) |
void |
start()
Will look through SPI every class that implements the
providerClass and if there are repeated IDs, it will collect
them all to throw an exception with the detailed message. |
void |
stop() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetExtensionModelLoaderManager, getExtensionModelLoaderManager, getExtensionModelLoaderManagerpublic DefaultExtensionModelLoaderRepository(ClassLoader containerClassLoader)
containerClassLoader - ClassLoader from the container.public void setExtensionModelLoadersLookup(Supplier<Collection<org.mule.runtime.extension.api.loader.ExtensionModelLoader>> extModelLoadersLookup)
public void start()
throws org.mule.runtime.api.exception.MuleException
providerClass and if there are repeated IDs, it will collect
them all to throw an exception with the detailed message.
The exception, if thrown, will have the following message:
There are several loaders that return the same ID when looking up providers for 'org.mule.runtime.module.artifact.ExtensionModelLoader'. Full error list: ID [some-id] is being returned by the following classes [org.foo.FooLoader, org.bar.BarLoader] ID [another-id] is being returned by the following classes [org.foo2.FooLoader2, org.bar2.BarLoader2]
start in interface org.mule.runtime.api.lifecycle.StartableIllegalStateException - if there are loaders with repeated IDs.org.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionpublic Optional<org.mule.runtime.extension.api.loader.ExtensionModelLoader> getExtensionModelLoader(LoaderDescriber loaderDescriber)
ExtensionModelLoaderRepositoryExtensionModelLoader for the given LoaderDescriber.getExtensionModelLoader in interface ExtensionModelLoaderRepositoryloaderDescriber - LoaderDescriber describes the loader needed.ExtensionModelLoader for the given LoaderDescriber or Optional.empty().Copyright © 2003–2023 MuleSoft, Inc.. All rights reserved.