Package com.abiquo.ssm.plugin.annotations

Examples of com.abiquo.ssm.plugin.annotations.Plugin


        if (!this.getClass().isAnnotationPresent(Plugin.class))
        {
            throw new PluginException("Missing @Plugin annotation in " + this.getClass().getName());
        }

        Plugin pluginInfo = this.getClass().getAnnotation(Plugin.class);

        if (pluginInfo.type() == null)
        {
            throw new PluginException("Plugin type can not be null in " + this.getClass().getName());
        }

        StoragePluginMetadata metadata = new StoragePluginMetadata();
        metadata.setDefaultIscsiPort(pluginInfo.defaultIscsiPort());
        metadata.setDefaultManagementPort(pluginInfo.defaultManagementPort());
        metadata.setRequiresAuthentication(pluginInfo.requiresAuthentication());
        metadata.setType(pluginInfo.type());

        try
        {
            Method[] methods = StoragePlugin.class.getMethods();
            for (Method methodDefinition : methods)
View Full Code Here


        {
            throw new InvalidPluginException("Missing @Plugin annotation in "
                + this.getClass().getName());
        }

        Plugin pluginInfo = this.getClass().getAnnotation(Plugin.class);

        if (pluginInfo.type() == null)
        {
            throw new InvalidPluginException("Plugin type can not be null in "
                + this.getClass().getName());
        }

        StoragePluginMetadata metadata = new StoragePluginMetadata();
        metadata.setDefaultServicePort(pluginInfo.defaultServicePort());
        metadata.setDefaultManagementPort(pluginInfo.defaultManagementPort());
        metadata.setRequiresAuthentication(pluginInfo.requiresAuthentication());
        metadata.setType(pluginInfo.type());

        try
        {
            Method[] methods = StoragePlugin.class.getMethods();
            for (Method methodDefinition : methods)
View Full Code Here

TOP

Related Classes of com.abiquo.ssm.plugin.annotations.Plugin

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.