}
}
PluginGen pg = new PluginGen();
Props root = new Props();
root.setPluginName("Infinispan");
root.setPluginDescription("Supports management and monitoring of Infinispan");
root.setName("Infinispan Cache Manager");
root.setPkg("org.infinispan.jopr");
root.setDependsOnJmxPlugin(true);
root.setManualAddOfResourceType(true);
root.setDiscoveryClass("CacheManagerDiscovery");
root.setComponentClass("CacheManagerComponent");
root.setSingleton(true);
root.setCategory(ResourceCategory.SERVER);
populateMetricsAndOperations(globalClasses, root, false);
SimpleProperty connect = new SimpleProperty("connectorAddress");
connect.setDescription("JMX Remoting address of the remote Infinispan Instance");
connect.setReadOnly(false);
root.getSimpleProps().add(connect);
SimpleProperty objectName = new SimpleProperty("objectName");
objectName.setDescription("ObjectName of the Manager");
objectName.setType("string");
objectName.setReadOnly(true);
root.getSimpleProps().add(objectName);
Template defaultTemplate = new Template("defaultManualDiscovery");
defaultTemplate.setDescription("The default setup for Infinispan");
SimpleProperty connect2 = new SimpleProperty("connectorAddress");
connect2.setDisplayName("URL of the remote server");
connect2.setDefaultValue("service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:6996/jmxrmi");
defaultTemplate.getSimpleProps().add(connect2);
root.getTemplates().add(defaultTemplate);
Props cache = new Props();
cache.setName("Infinispan Cache");
cache.setPkg("org.infinispan.jopr");
cache.setDependsOnJmxPlugin(true);
cache.setDiscoveryClass("CacheDiscovery");
cache.setComponentClass("CacheComponent");
cache.setSingleton(false);
cache.setCategory(ResourceCategory.SERVICE);
populateMetricsAndOperations(namedCacheClasses, cache, true);
root.getChildren().add(cache);
pg.createFile(root, "descriptor", "rhq-plugin.xml", "../../../src/main/resources/META-INF");