|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.plugins.platform.PlatformDiscoveryComponent
public abstract class PlatformDiscoveryComponent
Discovers the platform resource. This will discover one and only one resource. This is an abstract superclass to all the natively supported platform discovery components and the fallback Java-only discovery component.
| Constructor Summary | |
|---|---|
PlatformDiscoveryComponent()
|
|
| Method Summary | |
|---|---|
protected String |
determineResourceKey(ResourceDiscoveryContext context)
This will determine what the new platform's resource key should be. |
protected String |
determineResourceName(ResourceDiscoveryContext context)
This will determine what the new platform's resource name should be. |
protected void |
discoverConfiguration(org.rhq.core.domain.configuration.Configuration configuration)
Override this method to add additional configurations to discovered platforms |
Set<DiscoveredResourceDetails> |
discoverResources(ResourceDiscoveryContext context)
This will build the platform's resource details, where its name and key are by default the plugin container's name. |
protected String |
getHostname(SystemInfo systemInformation)
Tries to determine this platform's hostname, using the (possibly native) system info API. |
protected abstract boolean |
isPlatformSupported(ResourceDiscoveryContext context)
Subclasses will implement this method to tell this class whether or not it can discover the platform of the resource type found in the given context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlatformDiscoveryComponent()
| Method Detail |
|---|
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context)
discoverResources in interface ResourceDiscoveryComponentResourceDiscoveryComponent.discoverResources(ResourceDiscoveryContext)protected void discoverConfiguration(org.rhq.core.domain.configuration.Configuration configuration)
configuration - protected String determineResourceKey(ResourceDiscoveryContext context)
null, the platform's hostname is used. This is less than optimal
but the plugin container's name will never be null under virtually
all use-cases (except perhaps in test scenarios).
context - the discovery context used to get the plugin container name or host name if its needed
protected String determineResourceName(ResourceDiscoveryContext context)
null, the platform's hostname is used.
context - the discovery context used to get the plugin container name or host name if its needed
protected String getHostname(SystemInfo systemInformation)
systemInformation -
null)protected abstract boolean isPlatformSupported(ResourceDiscoveryContext context)
false, this subclass discovery component
instance does not recognize the platform.
It is very important that all subclasses must return false except one for any given
platform. That is to say, if running on "RHEL 5", only the subclass that supports RHEL 5 must return
true, all others must return false. If running on "Windows XP", only the suclass that
supports Windows XP must return true. The only exception to this rule is the
fallback Java platform discovery component, which will always return
true because the fallback Java platform is always supported.
context -
true if this instance can support the platform this plugin is running on; false
otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||