
org.drools.rhq.plugin.ExposeKCIDValueFromParentDiscoveryComponent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of drools-rhq-plugin Show documentation
Show all versions of drools-rhq-plugin Show documentation
RHQ/JOPR plugin that monitors Drools defined MBeans
package org.drools.rhq.plugin;
import org.rhq.plugins.jmx.JMXComponent;
import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import java.util.Set;
public class ExposeKCIDValueFromParentDiscoveryComponent extends MBeanResourceDiscoveryComponent {
public Set performDiscovery(Configuration pluginConfiguration,
JMXComponent parentResourceComponent, ResourceType resourceType, boolean skipUnknownProps) {
Set services = super.performDiscovery(
pluginConfiguration, parentResourceComponent, resourceType, skipUnknownProps);
String kcId = this.discoveryContext.getParentResourceContext()
.getPluginConfiguration().getSimpleValue("kcontainerId");
for (DiscoveredResourceDetails service: services) {
service.getPluginConfiguration().setSimpleValue("kcId", kcId);
}
return services;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy