use of org.mule.runtime.container.api.ArtifactClassLoaderManagerAware in project mule by mulesoft.
the class DefaultMuleCoreExtensionManagerServer method initializeCoreExtensions.
private void initializeCoreExtensions() throws MuleException {
LOGGER.info("Initializing core extensions");
Injector simpleRegistry = createContainerInjector();
for (MuleCoreExtension extension : orderedCoreExtensions) {
if (extension instanceof DeploymentServiceAware) {
((DeploymentServiceAware) extension).setDeploymentService(deploymentService);
}
if (extension instanceof RepositoryServiceAware) {
((RepositoryServiceAware) extension).setRepositoryService(repositoryService);
}
if (extension instanceof ToolingServiceAware) {
((ToolingServiceAware) extension).setToolingService(toolingService);
}
if (extension instanceof ArtifactDeploymentListener) {
deploymentService.addDeploymentListener(createDeploymentListenerAdapter((ArtifactDeploymentListener) extension, APP));
deploymentService.addDomainDeploymentListener(createDeploymentListenerAdapter((ArtifactDeploymentListener) extension, DOMAIN));
}
if (extension instanceof DeploymentListener) {
deploymentService.addDeploymentListener((DeploymentListener) extension);
}
if (extension instanceof CoreExtensionsAware) {
((CoreExtensionsAware) extension).setCoreExtensions(orderedCoreExtensions);
}
if (extension instanceof ArtifactClassLoaderManagerAware) {
((ArtifactClassLoaderManagerAware) extension).setArtifactClassLoaderManager(artifactClassLoaderManager);
}
simpleRegistry.inject(extension);
extension.initialise();
initializedCoreExtensions.add(extension);
LOGGER.info("Core extension '{}' initialized", extension.toString());
}
}
Aggregations