org.rhq.plugins.pattern.PatternDiscovery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pattern-plugin Show documentation
Show all versions of pattern-plugin Show documentation
Generate metrics that follow given patterns
package org.rhq.plugins.pattern;
import java.util.HashSet;
import java.util.Set;
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
/**
* Discovery class
*/
@SuppressWarnings("unused")
public class PatternDiscovery implements ResourceDiscoveryComponent
{
/**
* Run the auto-discovery
*/
public Set discoverResources(ResourceDiscoveryContext discoveryContext) throws Exception {
Set discoveredResources = new HashSet(1);
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
discoveryContext.getResourceType(), // ResourceType
"pattern",
"pattern",
"1.2",
"Generate metrics that follow a pattern",
discoveryContext.getDefaultPluginConfiguration(),
null
);
// Add to return values
discoveredResources.add(detail);
return discoveredResources;
}
}