Package com.abiquo.hypervisor.plugin.annotation

Examples of com.abiquo.hypervisor.plugin.annotation.HypervisorMetadata.type()


        {
            plugin.validateConfiguration();
        }
        catch (IllegalStateException e)
        {
            LOG.error("The plugin {} has invalid configuration: {}", new Object[] {metadata.type(),
            e.getMessage()});
            return Optional.absent();
        }

        // Validate at least one region is retrieved
View Full Code Here


        }

        // Validate at least one region is retrieved
        if (isCloudProvider(plugin))
        {
            for (String type : metadata.type())
            {
                List<Region> regionNames =
                    ((ICloudProvider< ? extends IConnection>) plugin).getRegions(type);
                if (regionNames == null || regionNames.isEmpty())
                {
View Full Code Here

                    ((ICloudProvider< ? extends IConnection>) plugin).getRegions(type);
                if (regionNames == null || regionNames.isEmpty())
                {
                    LOG.error(
                        "The plugin {} extends from ICloudProvider but does not return any region",
                        metadata.type());
                    return Optional.absent();
                }
            }
        }
View Full Code Here

        try
        {
            Class<IConnection> connectionClass = resolveIConnectionData(plugin.getClass());

            Builder<String, LoadedPlugin> builder = ImmutableMap.<String, LoadedPlugin> builder();
            for (String pluginType : metadata.type())
            {
                LoadedPlugin loadedPlugin = new LoadedPlugin(pluginType, connectionClass, plugin);
                builder.put(pluginType, loadedPlugin);
                LOG.debug("Loaded plugin for type {}", pluginType);
            }
View Full Code Here

            }
            return Optional.of(builder.build());
        }
        catch (Exception e)
        {
            LOG.error("Unable to load plugin for type {}", metadata.type(), e);
        }

        return Optional.absent();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.