{
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)