Search in sources :

Example 1 with DeploymentListener

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);
}
Also used : ArtifactDeploymentListener(org.mule.runtime.module.deployment.api.ArtifactDeploymentListener) DeploymentListener(org.mule.runtime.module.deployment.api.DeploymentListener) Test(org.junit.Test) SmallTest(org.mule.tck.size.SmallTest)

Example 2 with DeploymentListener

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);
}
Also used : DeploymentListener(org.mule.runtime.module.deployment.api.DeploymentListener)

Example 3 with DeploymentListener

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());
    }
}
Also used : DeploymentServiceAware(org.mule.runtime.module.deployment.api.DeploymentServiceAware) ArtifactDeploymentListener(org.mule.runtime.module.deployment.api.ArtifactDeploymentListener) ArtifactClassLoaderManagerAware(org.mule.runtime.container.api.ArtifactClassLoaderManagerAware) Injector(org.mule.runtime.core.api.Injector) RepositoryServiceAware(org.mule.runtime.module.repository.api.RepositoryServiceAware) MuleCoreExtension(org.mule.runtime.container.api.MuleCoreExtension) ToolingServiceAware(org.mule.runtime.module.tooling.api.ToolingServiceAware) DeploymentListener(org.mule.runtime.module.deployment.api.DeploymentListener) ArtifactDeploymentListener(org.mule.runtime.module.deployment.api.ArtifactDeploymentListener) CoreExtensionsAware(org.mule.runtime.container.api.CoreExtensionsAware)

Aggregations

DeploymentListener (org.mule.runtime.module.deployment.api.DeploymentListener)3 ArtifactDeploymentListener (org.mule.runtime.module.deployment.api.ArtifactDeploymentListener)2 Test (org.junit.Test)1 ArtifactClassLoaderManagerAware (org.mule.runtime.container.api.ArtifactClassLoaderManagerAware)1 CoreExtensionsAware (org.mule.runtime.container.api.CoreExtensionsAware)1 MuleCoreExtension (org.mule.runtime.container.api.MuleCoreExtension)1 Injector (org.mule.runtime.core.api.Injector)1 DeploymentServiceAware (org.mule.runtime.module.deployment.api.DeploymentServiceAware)1 RepositoryServiceAware (org.mule.runtime.module.repository.api.RepositoryServiceAware)1 ToolingServiceAware (org.mule.runtime.module.tooling.api.ToolingServiceAware)1 SmallTest (org.mule.tck.size.SmallTest)1