All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.rhq.plugins.pattern.PatternDiscovery Maven / Gradle / Ivy

There is a newer version: 4.13.0
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy