|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails
public class DiscoveredResourceDetails
This contains all the details for a resource that was discovered by a ResourceDiscoveryComponent
.
Note that any newly discovered resource must have a unique resource key as compared to other sibling resources. That is to say, a parent resource's children must have unique resource keys (the children cannot share keys). A corollary to this is that if a discovery component "re-discovers" a resource, the discovery component must ensure that it assigns the same key to that re-discovered resource (i.e. resource keys must be consistent and stable across multiple discoveries of that same resource). As an example, if you discover a resource "foo" and assign it a resource key of "fooKey"; then the next time that "foo" resource is discovered again, the discovery component must ensure that it discovers it with the resource key "fooKey" again.
Constructor Summary | |
---|---|
DiscoveredResourceDetails(ResourceType resourceType,
String resourceKey,
String resourceName,
String resourceVersion,
String resourceDescription,
Configuration pluginConfiguration,
ProcessInfo processInfo)
This creates a new instance that provides details for a newly discovered resource. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
Configuration |
getPluginConfiguration()
Returns the discovered resource's plugin configuration. |
ProcessInfo |
getProcessInfo()
Returns the information on the operating system process in which the resource is running. |
String |
getResourceDescription()
Gets the simple description of the resource, which may or may not be an internationalized string |
String |
getResourceKey()
The discovered resource's key where the key must be unique among the resource's sibling resources; that is, a parent's direct child resources must all have unique resource keys, but those keys need not be unique across the entire inventory of all resources. |
String |
getResourceName()
The name of the discovered resource, which is used mainly for UI display purposes. |
ResourceType |
getResourceType()
The type of resource that was discovered. |
String |
getResourceVersion()
The discovered resource's version string (which may have any form or syntax that is appropriate for the resource and may be null ) |
int |
hashCode()
|
void |
setPluginConfiguration(Configuration pluginConfiguration)
Defines the discovered resource's plugin configuration. |
void |
setResourceDescription(String resourceDescription)
Sets a simple description of the resource, which may or may not be an internationalized string |
void |
setResourceKey(String resourceKey)
Sets the discovered resource's unique key. |
void |
setResourceName(String resourceName)
Sets the name of the discovered resource, which is used mainly for UI display purposes. |
void |
setResourceVersion(String resourceVersion)
Sets the discovered resource's version string (which may have any form or syntax that is appropriate for the resource and may be null which correlates to an empty version string). |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DiscoveredResourceDetails(ResourceType resourceType, String resourceKey, String resourceName, String resourceVersion, String resourceDescription, Configuration pluginConfiguration, ProcessInfo processInfo)
Both resource key and resource name must be non-null
; otherwise, an exception is thrown. If
resource version or resource description are null
, their values will be set to an empty string.
resourceType
- the type of resource that was discovered (must not be null
)resourceKey
- the discovered resource's key where the key must be unique among the resource's
sibling resources; that is, a parent's direct child resources must all have unique
resource keys, but those keys need not be unique across the entire inventory of all
resources (must not be null
)resourceName
- the name of the discovered resource, used mainly for UI display purposes (must not be
null
)resourceVersion
- the discovered resource's version string (which may have any form or syntax
appropriate for the resource and may be null
)resourceDescription
- a simple description of the discovered resource, which may or may not be an
internationalized string (may be null
)pluginConfiguration
- the discovered resource's plugin configuration that will be used by the plugin to
connect to it (may be null
, which means the new resource will just use
the default plugin configuration as defined by its resource type)processInfo
- information on the process in which the newly discovered resource is running (this
may be null
if unknown or not applicable)
IllegalArgumentException
- if the resource type, key or name is null
or one of the String
values are too longMethod Detail |
---|
public ResourceType getResourceType()
null
)public String getResourceKey()
null
)public void setResourceKey(String resourceKey)
resourceKey
- the discovered resource's key (must not be null
)
IllegalArgumentException
- if resourceKey
is null
or too longpublic String getResourceName()
null
)public void setResourceName(String resourceName)
null
); it has no uniqueness requirements (that is, even sibling resources can have the
same name).
resourceName
- the discovered resource's name (must not be null
)
IllegalArgumentException
- if resourceName
is null
public String getResourceVersion()
null
)
public void setResourceVersion(String resourceVersion)
null
which correlates to an empty version string).
resourceVersion
- the discovered resource's version string (may be null
, which correlates to
an empty string)
IllegalArgumentException
- if the version string is too longpublic String getResourceDescription()
null
)public void setResourceDescription(String resourceDescription)
resourceDescription
- the discovered resource's description (may be null
, which correlates to
an empty string)
IllegalArgumentException
- if the description string is too longpublic Configuration getPluginConfiguration()
set
before, a copy of the default plugin configuration, as defined
in the resource type
's default template, is returned.
public ProcessInfo getProcessInfo()
null
if not knownpublic void setPluginConfiguration(Configuration pluginConfiguration)
getPluginConfiguration()
first
to get a copy of the resource's default plugin configuration, and then modify that default configuration with
custom values.
If you never need to customize or change a discovered resource's plugin configuration, you will not have to
call this method. The plugin container will simply use the default plugin configuration from the resource's
type
.
pluginConfiguration
- the discovered resource's new plugin configurationsetPluginConfiguration(Configuration)
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |