|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rhq.core.pluginapi.inventory.ResourceDiscoveryContext<T>
T
- the parent resource component type for those resources discovered by the discovery component that is
assigned this context. In other words, for all the resources created by the discovery component,
T
is the resource component type of the parent of those new resources.public class ResourceDiscoveryContext<T extends ResourceComponent>
The context object that ResourceDiscoveryComponent
objects will have access to when needing to perform its
work. This context will have all the information that the discovery components will need to build new resources that
it discovers.
A plugin writer will use this context to build details
of resources that were
either auto-discovered
or are to be
manually discovered
.
This context class is currently designed to be an immutable object. Instances of this context object are to be created by the plugin container only.
Constructor Summary | |
---|---|
ResourceDiscoveryContext(ResourceType resourceType,
T parentComponent,
ResourceContext parentResourceContext,
SystemInfo systemInfo,
List<ProcessScanResult> processScanResults,
List<Configuration> pluginConfigurations,
String pluginContainerName)
Creates a new ResourceDiscoveryContext object. |
Method Summary | |
---|---|
List<ProcessScanResult> |
getAutoDiscoveredProcesses()
After having scanned all running processes, if the plugin container auto-discovered some resources for the discovery component, those processes will be returned. |
Configuration |
getDefaultPluginConfiguration()
Returns the default plugin configuration as defined in the resource type 's default
template. |
T |
getParentResourceComponent()
The resource components for all newly discovered resources will become children of this parent resource component. |
ResourceContext |
getParentResourceContext()
Provides access to the parent's resource context. |
List<Configuration> |
getPluginConfigurations()
Returns plugin configurations for other known resources. |
String |
getPluginContainerName()
The name of the plugin container in which the discovery component is running. |
ResourceType |
getResourceType()
The ResourceDiscoveryComponent that is assigned this context will have the responsibility to discover
resources of the resource type returned by this method. |
SystemInfo |
getSystemInformation()
Returns a SystemInfo object that contains information about the platform/operating system that the plugin
is running on. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceDiscoveryContext(ResourceType resourceType, T parentComponent, ResourceContext parentResourceContext, SystemInfo systemInfo, List<ProcessScanResult> processScanResults, List<Configuration> pluginConfigurations, String pluginContainerName)
ResourceDiscoveryContext
object. The plugin container is responsible for instantiating
these objects; plugin writers should never have to actually create context objects.
This creates a context object that contains information on both auto-discovered resources (i.e. those found via process scans) and manually discovered resources (i.e. resources whose plugin configurations were directly supplied by a user).
resourceType
- the resource type of resources to be discovered which includes the default plugin
configurationparentComponent
- the parent component of the component that will be assigned this contextparentResourceContext
- systemInfo
- information about the system on which the plugin and its plugin container are runningprocessScanResults
- processes that were auto-discovered by the plugin container on behalf of the plugin
via process scans (may be null
or empty if nothing was auto-discovered)pluginConfigurations
- for resources that are already known to exist (more specifically, resources that a
user told us exists), this contains plugin configurations that provide connection
information to those existing managed resources. (may be null
or empty
if there are no other known resources)pluginContainerName
- the name of the plugin container in which the discovery component is running. Components
can be assured this name is unique across all plugin containers/agents runningMethod Detail |
---|
public ResourceType getResourceType()
ResourceDiscoveryComponent
that is assigned this context will have the responsibility to discover
resources of the resource type returned by this method.
public T getParentResourceComponent()
ResourceContext.getParentResourceComponent()
public ResourceContext getParentResourceContext()
public SystemInfo getSystemInformation()
SystemInfo
object that contains information about the platform/operating system that the plugin
is running on. With this object, you can natively obtain things such as the process table (containing
process information
) about all running processes), the operating system name, and other
things. Please refer to the javadoc on SystemInfo
for more details on the types of information you can
access.
@NotNull public List<ProcessScanResult> getAutoDiscoveredProcesses()
set of discovered resources
unless
for some reason the discovery component does not wish to include them.
@NotNull public List<Configuration> getPluginConfigurations()
process
associated with it).
This may be empty if there are no resources that were "manually discovered".
public Configuration getDefaultPluginConfiguration()
resource type
's default
template. This returns a new copy of the default configuration; it will not return the same configuration
instance to any future call to this method.
public String getPluginContainerName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |