|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.core.pc.plugin.PluginComponentFactory
public class PluginComponentFactory
This class builds and lifecycles the various plugin components for use by the other services.
| Constructor Summary | |
|---|---|
PluginComponentFactory()
|
|
| Method Summary | |
|---|---|
ResourceComponent |
buildResourceComponent(org.rhq.core.domain.resource.Resource resource)
This will create a new ResourceComponent instance that will represent the given Resource. |
ResourceDiscoveryComponent |
getDiscoveryComponent(org.rhq.core.domain.resource.ResourceType resourceType,
ResourceContainer parentResourceContainer)
This will create a new ResourceDiscoveryComponent instance that can be used to discover and create
Resources of the given resourceType. |
ClassLoader |
getDiscoveryComponentClassLoader(ResourceContainer parentResourceContainer,
String pluginName)
|
ClassLoader |
getResourceClassloader(org.rhq.core.domain.resource.Resource resource)
Given a resource, this will return the appropriate classloader for that resource. |
void |
initialize()
Creates our (initially empty) cache of discovery components. |
void |
setConfiguration(PluginContainerConfiguration configuration)
Informs the container service how it should be configured by providing the full plugin container configuration. |
void |
shutdown()
Clears our cache of discovery components. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PluginComponentFactory()
| Method Detail |
|---|
public ResourceDiscoveryComponent getDiscoveryComponent(org.rhq.core.domain.resource.ResourceType resourceType,
ResourceContainer parentResourceContainer)
throws PluginContainerException
ResourceDiscoveryComponent instance that can be used to discover and create
Resources of the given resourceType. The new discovery component will be loaded in the
plugin classloader that belongs to the plugin responsible for handling that specific resource type.
resourceType - the type of resource that is to be discoveredparentResourceContainer - represents the parent resource for any newly discovered resources that may be found
by the discovery component that is created by this method. This can be null,
but ONLY in the case when the resourceType is that of a root platform type.
PluginContainerException - if failed to create the discovery component instance
public ClassLoader getDiscoveryComponentClassLoader(ResourceContainer parentResourceContainer,
String pluginName)
throws PluginContainerException
PluginContainerException
public ResourceComponent buildResourceComponent(org.rhq.core.domain.resource.Resource resource)
throws PluginContainerException
ResourceComponent instance that will represent the given Resource.
The new component will be loaded in the proper plugin classloader based on its specific resource type.
resource - the resource that the component will wrap
PluginContainerException - if failed to create the component instance
public ClassLoader getResourceClassloader(org.rhq.core.domain.resource.Resource resource)
throws PluginContainerException
resource - the resource whose classloader is to be returned (and possibly created if needed)
PluginContainerException - if the resource's classloader could not be createdpublic void initialize()
initialize in interface ContainerServiceContainerService.initialize()public void shutdown()
shutdown in interface ContainerServiceContainerService.shutdown()public void setConfiguration(PluginContainerConfiguration configuration)
ContainerServicenull configuration object so implementations of
this interface should never have to worry about a null configuration parameter value.
setConfiguration in interface ContainerService
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||