Package org.mule

Examples of org.mule.MuleCoreExtension


            {
                String extName = (String) entry.getKey();
                String extClass = (String) entry.getValue();
                try
                {
                    MuleCoreExtension extension = (MuleCoreExtension) ClassUtils.instanciateClass(extClass);
                    extension.initialise();
                    coreExtensions.put(extension.getClass(), extension);
                }
                catch (Exception ex)
                {
                    throw new DefaultMuleException("Error starting Mule core extension " + extName, ex);
                }
View Full Code Here


            {
                String extName = (String) entry.getKey();
                String extClass = (String) entry.getValue();
                try
                {
                    MuleCoreExtension extension = (MuleCoreExtension) ClassUtils.instanciateClass(extClass);
                    result.add(extension);
                }
                catch (Exception ex)
                {
                    throw new DefaultMuleException("Error starting Mule core extension " + extName, ex);
View Full Code Here

            return;
        }

        for (int i = orderedCoreExtensions.size() - 1; i >= 0; i--)
        {
            MuleCoreExtension extension = orderedCoreExtensions.get(i);

            try
            {
                extension.stop();
            }
            catch (MuleException e)
            {
                logger.warn("Error stopping core extension: " + extension.getName(), e);
            }
        }
    }
View Full Code Here

    private void injectDependencies(MuleCoreExtension muleCoreExtension, List<MuleCoreExtension> resolvedExtensions, List<LinkedMuleCoreExtensionDependency> dependencies)
    {
        for (LinkedMuleCoreExtensionDependency linkedMuleCoreExtensionDependency : dependencies)
        {
            final MuleCoreExtension dependencyInstance = findDependencyInstance(resolvedExtensions, linkedMuleCoreExtensionDependency.getDependencyClass());

            try
            {
                linkedMuleCoreExtensionDependency.getDependantMethod().invoke(muleCoreExtension, new Object[] {dependencyInstance});
            }
View Full Code Here

    @Test
    public void startsCoreExtensionsInOrder() throws Exception
    {
        List<MuleCoreExtension> extensions = new LinkedList<MuleCoreExtension>();
        MuleCoreExtension extension1 = mock(MuleCoreExtension.class);
        MuleCoreExtension extension2 = mock(MuleCoreExtension.class);
        extensions.add(extension1);
        extensions.add(extension2);
        when(coreExtensionDiscoverer.discover()).thenReturn(extensions);

        List<MuleCoreExtension> orderedExtensions = new LinkedList<MuleCoreExtension>();
View Full Code Here

    @Test
    public void stopsCoreExtensionsInOrder() throws Exception
    {
        List<MuleCoreExtension> extensions = new LinkedList<MuleCoreExtension>();
        MuleCoreExtension extension1 = mock(MuleCoreExtension.class);
        MuleCoreExtension extension2 = mock(MuleCoreExtension.class);
        extensions.add(extension1);
        extensions.add(extension2);
        when(coreExtensionDiscoverer.discover()).thenReturn(extensions);

        List<MuleCoreExtension> orderedExtensions = new LinkedList<MuleCoreExtension>();
View Full Code Here

    @Test
    public void disposesCoreExtensions() throws Exception
    {
        List<MuleCoreExtension> extensions = new LinkedList<MuleCoreExtension>();
        TestDeploymentServiceAwareExtension extension1 = mock(TestDeploymentServiceAwareExtension.class);
        MuleCoreExtension extension2 = mock(MuleCoreExtension.class);
        extensions.add(extension1);
        extensions.add(extension2);
        when(coreExtensionDiscoverer.discover()).thenReturn(extensions);

        List<MuleCoreExtension> orderedExtensions = new LinkedList<MuleCoreExtension>();
View Full Code Here

    @Test
    public void resolvesCoreExtensionDependencies() throws Exception
    {

        List<MuleCoreExtension> extensions = new LinkedList<MuleCoreExtension>();
        MuleCoreExtension extension = mock(MuleCoreExtension.class);
        extensions.add(extension);
        when(coreExtensionDiscoverer.discover()).thenReturn(extensions);

        coreExtensionManager.initialise();
View Full Code Here

TOP

Related Classes of org.mule.MuleCoreExtension

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.