|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.plugins.jmx.MBeanResourceDiscoveryComponent<T>
public class MBeanResourceDiscoveryComponent<T extends JMXComponent<?>>
This is meant to be a generic discovery component for MBeans. In order to use it you configure your resource
descriptor to use this class for discovery and then provide a plugin configuration default value for the "objectName"
property that has a default value of the form defined by ObjectNameQueryUtility. Also, setting default
configurations values for nameTemplate and descriptionTemplate according to the message format also defined by
ObjectNameQueryUtility also lets you customize the detected resources name and description according to a
variable replacement strategy. Additionally, any mapped variables found will be set as configuration properties in
their own right.
| Field Summary | |
|---|---|
static String |
PROPERTY_DESCRIPTION_TEMPLATE
Not required when using this discovery component. |
static String |
PROPERTY_NAME_TEMPLATE
Not required when using this discovery component. |
static String |
PROPERTY_OBJECT_NAME
Required when using this discovery component. |
| Constructor Summary | |
|---|---|
MBeanResourceDiscoveryComponent()
|
|
| Method Summary | |
|---|---|
Set<DiscoveredResourceDetails> |
discoverResources(ResourceDiscoveryContext<T> context)
|
Set<DiscoveredResourceDetails> |
discoverResources(ResourceDiscoveryContext<T> context,
boolean skipUnknownProps)
Same as #discoverResources(ResourceDiscoveryContext with additional param. |
protected org.mc4j.ems.connection.bean.EmsBean |
loadBean(T context,
String objectName)
Loads the bean with the given object name. |
Set<DiscoveredResourceDetails> |
performDiscovery(org.rhq.core.domain.configuration.Configuration pluginConfiguration,
JMXComponent parentResourceComponent,
org.rhq.core.domain.resource.ResourceType resourceType)
Performs the actual discovery through MBeans. |
Set<DiscoveredResourceDetails> |
performDiscovery(org.rhq.core.domain.configuration.Configuration pluginConfiguration,
JMXComponent parentResourceComponent,
org.rhq.core.domain.resource.ResourceType resourceType,
boolean skipUnknownProps)
Performs the actual discovery through MBeans. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_OBJECT_NAME
public static final String PROPERTY_NAME_TEMPLATE
public static final String PROPERTY_DESCRIPTION_TEMPLATE
PROPERTY_NAME_TEMPLATE, unique descriptions
can be generated per resource using this template.
| Constructor Detail |
|---|
public MBeanResourceDiscoveryComponent()
| Method Detail |
|---|
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<T> context)
discoverResources in interface ResourceDiscoveryComponent<T extends JMXComponent<?>>
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<T> context,
boolean skipUnknownProps)
#discoverResources(ResourceDiscoveryContext) with additional param.
skipUnknownProps - if true, skip over MBeans that have unknown properties in their ObjectName
public Set<DiscoveredResourceDetails> performDiscovery(org.rhq.core.domain.configuration.Configuration pluginConfiguration,
JMXComponent parentResourceComponent,
org.rhq.core.domain.resource.ResourceType resourceType)
pluginConfiguration - plugin configuration for the resource type being discovered; used to grab values
that govern the MBean query and resource details generationparentResourceComponent - parent resource of the resource being discoveredresourceType - type of resource being discovered
public Set<DiscoveredResourceDetails> performDiscovery(org.rhq.core.domain.configuration.Configuration pluginConfiguration,
JMXComponent parentResourceComponent,
org.rhq.core.domain.resource.ResourceType resourceType,
boolean skipUnknownProps)
pluginConfiguration - plugin configuration for the resource type being discovered; used to grab values
that govern the MBean query and resource details generationparentResourceComponent - parent resource of the resource being discoveredresourceType - type of resource being discoveredskipUnknownProps - Should we skip over MBeans that have unknown properties in their ObjectName
protected org.mc4j.ems.connection.bean.EmsBean loadBean(T context,
String objectName)
objectName - the name of the bean to load
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||