use of org.mule.runtime.module.deployment.api.DeploymentListener in project mule by mulesoft.
the class DeploymentListenerAdapterTestCase method adapt.
@Test
public void adapt() throws Exception {
DeploymentListener applicationDeploymentListener = new DeploymentListenerAdapter(listener, APP);
DeploymentListener domainDeploymentListener = new DeploymentListenerAdapter(listener, DOMAIN);
assertDeploymentListenerInvocations(applicationDeploymentListener, APP);
assertDeploymentListenerInvocations(domainDeploymentListener, DOMAIN);
}
use of org.mule.runtime.module.deployment.api.DeploymentListener in project mule by mulesoft.
the class DomainDeploymentTestCase method doSynchronizedDomainDeploymentActionTest.
private void doSynchronizedDomainDeploymentActionTest(final Action deploymentAction, final Action assertAction) throws Exception {
addPackedDomainFromBuilder(emptyDomainFileBuilder);
final DeploymentListener domainDeploymentListener = this.domainDeploymentListener;
final String artifactId = emptyDomainFileBuilder.getId();
doSynchronizedArtifactDeploymentActionTest(deploymentAction, assertAction, domainDeploymentListener, artifactId);
}
use of org.mule.runtime.module.deployment.api.DeploymentListener 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