public class DefaultArtifactClassLoaderResolver extends Object implements ArtifactClassLoaderResolver
| Modifier and Type | Field and Description |
|---|---|
static String |
PLUGIN_CLASSLOADER_IDENTIFIER |
| Constructor and Description |
|---|
DefaultArtifactClassLoaderResolver(ArtifactClassLoader containerClassLoader,
ModuleRepository moduleRepository,
NativeLibraryFinderFactory nativeLibraryFinderFactory) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclassLoaderResolver, defaultClassLoaderResolverpublic static final String PLUGIN_CLASSLOADER_IDENTIFIER
public DefaultArtifactClassLoaderResolver(ArtifactClassLoader containerClassLoader, ModuleRepository moduleRepository, NativeLibraryFinderFactory nativeLibraryFinderFactory)
public MuleDeployableArtifactClassLoader createDomainClassLoader(DomainDescriptor descriptor)
ArtifactClassLoaderResolvercreateDomainClassLoader in interface ArtifactClassLoaderResolverdescriptor - the descriptor of the domain to generate a class loader for.public MuleDeployableArtifactClassLoader createDomainClassLoader(DomainDescriptor descriptor, PluginClassLoaderResolver pluginClassLoaderResolver)
ArtifactClassLoaderResolvercreateDomainClassLoader in interface ArtifactClassLoaderResolverdescriptor - the descriptor of the domain to generate a class loader for.pluginClassLoaderResolver - allows the user to provide a class loader for the given plugin, otherwise it will be
created.public static String getDomainId(String domainName)
domainName - name of the domain. Non empty.public MuleDeployableArtifactClassLoader createApplicationClassLoader(ApplicationDescriptor descriptor)
ArtifactClassLoaderResolvercreateApplicationClassLoader in interface ArtifactClassLoaderResolverdescriptor - the descriptor of the application to generate a class loader for.public MuleDeployableArtifactClassLoader createApplicationClassLoader(ApplicationDescriptor descriptor, PluginClassLoaderResolver pluginClassLoaderResolver)
ArtifactClassLoaderResolvercreateApplicationClassLoader in interface ArtifactClassLoaderResolverdescriptor - the descriptor of the application to generate a class loader for.pluginClassLoaderResolver - allows the user to provide a class loader for the given plugin, otherwise it will be
created.public MuleDeployableArtifactClassLoader createApplicationClassLoader(ApplicationDescriptor descriptor, PluginClassLoaderResolver pluginClassLoaderResolver, List<URL> additionalClassloaderUrls)
ArtifactClassLoaderResolvercreateApplicationClassLoader in interface ArtifactClassLoaderResolverdescriptor - the descriptor of the application to generate a class loader for.pluginClassLoaderResolver - allows the user to provide a class loader for the given plugin, otherwise it will be
created.additionalClassloaderUrls - a list of URL pointing to additional resources and classespublic MuleDeployableArtifactClassLoader createApplicationClassLoader(ApplicationDescriptor descriptor, Supplier<ArtifactClassLoader> domainClassLoader)
ArtifactClassLoaderResolvercreateApplicationClassLoader in interface ArtifactClassLoaderResolverdescriptor - the descriptor of the application to generate a class loader for.domainClassLoader - the class loader of the domain the application belongs to.public MuleDeployableArtifactClassLoader createApplicationClassLoader(ApplicationDescriptor descriptor, Supplier<ArtifactClassLoader> domainClassLoader, PluginClassLoaderResolver pluginClassLoaderResolver)
ArtifactClassLoaderResolvercreateApplicationClassLoader in interface ArtifactClassLoaderResolverdescriptor - the descriptor of the application to generate a class loader for.domainClassLoader - the class loader of the domain the application belongs to.pluginClassLoaderResolver - allows the user to provide a class loader for the given plugin, otherwise it will be
created.public MuleDeployableArtifactClassLoader createApplicationClassLoader(ApplicationDescriptor descriptor, Supplier<ArtifactClassLoader> domainClassLoader, PluginClassLoaderResolver pluginClassLoaderResolver, List<URL> additionalClassloaderUrls)
ArtifactClassLoaderResolvercreateApplicationClassLoader in interface ArtifactClassLoaderResolverdescriptor - the descriptor of the application to generate a class loader for.domainClassLoader - the class loader of the domain the application belongs to.pluginClassLoaderResolver - allows the user to provide a class loader for the given plugin, otherwise it will be
created.additionalClassloaderUrls - a list of URL pointing to additional resources and classespublic static String getApplicationId(String domainId, String applicationId)
domainId - name of the domain where the application is deployed. Non empty.applicationId - id of the application. Non empty.public MuleArtifactClassLoader createMulePluginClassLoader(MuleDeployableArtifactClassLoader ownerArtifactClassLoader, ArtifactPluginDescriptor descriptor, PluginDescriptorResolver pluginDescriptorResolver)
ArtifactClassLoaderResolverThe class loader for a plugin is based on the class loader of its owner artifact for some scenarios regarding exported packages/resources. For that reason, a class loader for a plugin in one application may be different from the same plugin in another application.
createMulePluginClassLoader in interface ArtifactClassLoaderResolverownerArtifactClassLoader - the class loader for the artifact that has the plugin dependency for the target class loader.descriptor - the descriptor of the plugin to generate a class loader for.pluginDescriptorResolver - a wrapper function around the logic to extract an ArtifactPluginDescriptor from the
jar described by the BundleDescriptor. The function must return
Optional.empty() if the plugin represented by the BundleDescriptor is not a
dependency of the artifact for ownerArtifactClassLoader.public MuleArtifactClassLoader createMulePluginClassLoader(MuleDeployableArtifactClassLoader ownerArtifactClassLoader, ArtifactPluginDescriptor descriptor, PluginDescriptorResolver pluginDescriptorResolver, PluginClassLoaderResolver pluginClassLoaderResolver)
ArtifactClassLoaderResolverThe class loader for a plugin is based on the class loader of its owner artifact for some scenarios regarding exported packages/resources. For that reason, a class loader for a plugin in one application may be different from the same plugin in another application.
createMulePluginClassLoader in interface ArtifactClassLoaderResolverownerArtifactClassLoader - the class loader for the artifact that has the plugin dependency for the target class
loader.descriptor - the descriptor of the plugin to generate a class loader for.pluginDescriptorResolver - a wrapper function around the logic to extract an ArtifactPluginDescriptor from the
jar described by the BundleDescriptor. The function must return
Optional.empty() if the plugin represented by the BundleDescriptor is not a
dependency of the artifact for ownerArtifactClassLoader.pluginClassLoaderResolver - allows the user to provide a class loader for the given dependency plugin, otherwise it will
be obtained from the owner artifact class loaders.protected ClassLoaderLookupPolicy createPluginLookupPolicy(ArtifactPluginDescriptor descriptor, MuleDeployableArtifactClassLoader ownerArtifactClassLoader, PluginDescriptorResolver pluginDescriptorResolver, PluginClassLoaderResolver pluginClassLoaderResolver)
Copyright © 2003–2023 MuleSoft, Inc.. All rights reserved.