Package com.volantis.mcs.integration

Examples of com.volantis.mcs.integration.IntegrationPlugin


        //   Test Expectations
        // =====================================================================

        // Get the plugin.
        IntegrationPluginContainer container = createContainer();
        IntegrationPlugin firstPlugin = container.getPlugin(factory);
        assertSame("Unexpected value retrieved from container.",
                   plugin, firstPlugin);

        // Get the plugin again.
        IntegrationPlugin secondPlugin = container.getPlugin(factory);
        assertSame("Expected same object as the first time",
                   firstPlugin, secondPlugin);
    }
View Full Code Here


        this.pluginInterfaceClass = null;
    }

    // Javadoc inherited.
    public final IntegrationPlugin createPluginInstance() {
        IntegrationPlugin result = null;
        if (errorPlugin == null) {
            result = createInstance();
        } else {
            result = errorPlugin;
        }
View Full Code Here

     * Create an instance of {@link IntegrationPlugin} of the class determined
     * on construction based upon the configuration information provided.
     * @return an instance of {@link IntegrationPlugin}
     */
    protected IntegrationPlugin createInstance() {
        IntegrationPlugin result;

        try {
            result = (IntegrationPlugin) pluginImplementationClass.newInstance();
            try {
                result.initialize(immutablePluginArguments);
            } catch (Exception e) {
                // Return an error plugin but don't save it as this may not
                // happen every time.
                result = createErrorPlugin(
                        messageLocalizer.format(
View Full Code Here

    // Javadoc inherited.
    public IntegrationPlugin getPlugin(IntegrationPluginFactory factory) {

        String pluginName = factory.getName();
        IntegrationPlugin plugin;

        synchronized (this) {
            plugin = (IntegrationPlugin) plugins.get(pluginName);
            if (plugin == null) {
                plugin = factory.createPluginInstance();
View Full Code Here

        MarkupPluginConfiguration cfg = (MarkupPluginConfiguration) config;
        String pluginName = cfg.getName();
        IntegrationPluginFactory factory;
        MarkupPluginScope scope = MarkupPluginScope.literal(cfg.getScope());
        if (scope == null) {
            IntegrationPlugin errorPlugin = createErrorPlugin(
                    MarkupPlugin.class,
                    pluginName,
                    messageLocalizer.format("plugin-scope-invalid",
                                            new Object[]{pluginName,
                                                         scope}),
View Full Code Here

        MarkupPluginFactoryImpl factory
                = new MarkupPluginFactoryImpl(config, application);

        assertEquals("Unexpected name.", pluginName, factory.getName());

        IntegrationPlugin plugin = factory.createPluginInstance();

        assertEquals("Unexpected object class",
                     FactoryTestMarkupPlugin.class, plugin.getClass());
    }
View Full Code Here

        MarinerApplication application = null;
        MarkupPluginFactoryImpl factory
                = new MarkupPluginFactoryImpl(config, application);

        IntegrationPlugin plugin = factory.createPluginInstance();

        assertTrue("Plugin should be an instance of ErrorMarkupPlugin but"
                   + " is: " + plugin,
                   plugin instanceof MarkupPluginFactoryImpl.ErrorMarkupPlugin);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.integration.IntegrationPlugin

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.