|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.resource.ResourceFactoryManagerBean
public class ResourceFactoryManagerBean
Bean to handle interaction with the resource factory subsystem of the plugin container. !! Warning, the factory interface is there to remove managed things from disk. Use caution when using this and don't confuse it with removing something from the system inventory. !!
| Constructor Summary | |
|---|---|
ResourceFactoryManagerBean()
|
|
| Method Summary | |
|---|---|
void |
checkForTimedOutRequests()
Will check to see if any in progress resource creation jobs are taking too long to finish and if so marks them as failed. |
void |
completeCreateResource(CreateResourceResponse response)
For documentation, see ResourceFactoryServerService.completeCreateResource(org.rhq.core.clientapi.agent.inventory.CreateResourceResponse)
. |
void |
completeDeleteResourceRequest(DeleteResourceResponse response)
For documentation, see ResourceFactoryServerService.completeDeleteResourceRequest(org.rhq.core.clientapi.agent.inventory.DeleteResourceResponse)
. |
org.rhq.core.domain.resource.CreateResourceHistory |
createPackageBackedResource(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersionNumber,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
byte[] packageBits)
|
org.rhq.core.domain.resource.CreateResourceHistory |
createPackageBackedResource(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersionNumber,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
byte[] packageBits,
Integer timeout)
Creates a new physical resource. |
org.rhq.core.domain.resource.CreateResourceHistory |
createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
int packageVersionId)
|
org.rhq.core.domain.resource.CreateResourceHistory |
createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
int packageVersionId,
Integer timeout)
Creates a new physical resource. |
org.rhq.core.domain.resource.CreateResourceHistory |
createResource(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int resourceTypeId,
String resourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
org.rhq.core.domain.configuration.Configuration resourceConfiguration)
|
org.rhq.core.domain.resource.CreateResourceHistory |
createResource(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int resourceTypeId,
String resourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
org.rhq.core.domain.configuration.Configuration resourceConfiguration,
Integer timeout)
Creates a new physical resource. |
org.rhq.core.domain.resource.CreateResourceHistory |
createResource(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersionNumber,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
InputStream packageBitStream)
Creates a new physical resource. |
org.rhq.core.domain.resource.CreateResourceHistory |
createResource(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersionNumber,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
InputStream packageBitStream,
Map<String,String> packageUploadDetails)
|
org.rhq.core.domain.resource.CreateResourceHistory |
createResource(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersionNumber,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
InputStream packageBitStream,
Map<String,String> packageUploadDetails,
Integer timeout)
|
org.rhq.core.domain.resource.DeleteResourceHistory |
deleteResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Deletes a physical resource from the agent machine. |
List<org.rhq.core.domain.resource.DeleteResourceHistory> |
deleteResources(org.rhq.core.domain.auth.Subject user,
int[] resourceIds)
Deletes physical resources from the agent machine. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.CreateResourceHistory> |
findCreateChildResourceHistory(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
Long beginDate,
Long endDate,
org.rhq.core.domain.util.PageControl pageControl)
Returns a pagination enabled list of requests for the creation of new child resources to the specified parent. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.DeleteResourceHistory> |
findDeleteChildResourceHistory(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
Long beginDate,
Long endDate,
org.rhq.core.domain.util.PageControl pageControl)
Returns a pagination enabled list of requests to delete a child resource on the specified parent. |
int |
getCreateChildResourceHistoryCount(int parentResourceId,
Long beginDate,
Long endDate)
Returns the number of requests to create a new child resource under the specified parent known to the system. |
org.rhq.core.domain.resource.CreateResourceHistory |
getCreateHistoryItem(int historyItemId)
Returns the history item corresponding to the specified ID. |
int |
getDeleteChildResourceHistoryCount(int parentResourceId,
Long beginDate,
Long endDate)
Returns the number of requests to delete a child resource from the specified parent resource. |
org.rhq.core.domain.resource.CreateResourceHistory |
persistCreateHistory(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int resourceTypeId,
String createResourceName,
org.rhq.core.domain.configuration.Configuration configuration)
Persists a record in the resource history to indicate a request has been made to create a configuration-backed resource. |
org.rhq.core.domain.resource.CreateResourceHistory |
persistCreateHistory(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int resourceTypeId,
String createResourceName,
org.rhq.core.domain.content.PackageVersion packageVersion,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration)
Persists a record in the resource history to indicate a request has been made to create an package-backed resource. |
org.rhq.core.domain.resource.DeleteResourceHistory |
persistDeleteHistory(org.rhq.core.domain.auth.Subject user,
int resourceId)
Persists a record in the resource history to indicate a request has been made to delete a resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceFactoryManagerBean()
| Method Detail |
|---|
public void completeCreateResource(CreateResourceResponse response)
ResourceFactoryManagerLocalResourceFactoryServerService.completeCreateResource(org.rhq.core.clientapi.agent.inventory.CreateResourceResponse)
.
completeCreateResource in interface ResourceFactoryManagerLocalpublic void completeDeleteResourceRequest(DeleteResourceResponse response)
ResourceFactoryManagerLocalResourceFactoryServerService.completeDeleteResourceRequest(org.rhq.core.clientapi.agent.inventory.DeleteResourceResponse)
.
completeDeleteResourceRequest in interface ResourceFactoryManagerLocalpublic void checkForTimedOutRequests()
ResourceFactoryManagerLocal
checkForTimedOutRequests in interface ResourceFactoryManagerLocal
public org.rhq.core.domain.resource.CreateResourceHistory persistCreateHistory(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int resourceTypeId,
String createResourceName,
org.rhq.core.domain.configuration.Configuration configuration)
ResourceFactoryManagerLocal
persistCreateHistory in interface ResourceFactoryManagerLocaluser - user performing the createparentResourceId - parent resource under which the resource should be createdresourceTypeId - type of resource being createdcreateResourceName - name of the resource being createdconfiguration - resource configuration of the new resource
public org.rhq.core.domain.resource.CreateResourceHistory persistCreateHistory(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int resourceTypeId,
String createResourceName,
org.rhq.core.domain.content.PackageVersion packageVersion,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration)
ResourceFactoryManagerLocal
persistCreateHistory in interface ResourceFactoryManagerLocaluser - user performing the createparentResourceId - parent resource under which the resource should be createdresourceTypeId - type of resource being createdcreateResourceName - name of the resource being createdpackageVersion - package version being installeddeploymentTimeConfiguration - configuration of the package used when installing
public org.rhq.core.domain.resource.DeleteResourceHistory persistDeleteHistory(org.rhq.core.domain.auth.Subject user,
int resourceId)
ResourceFactoryManagerLocal
persistDeleteHistory in interface ResourceFactoryManagerLocaluser - use performing the deleteresourceId - resource being deleted
public org.rhq.core.domain.resource.CreateResourceHistory getCreateHistoryItem(int historyItemId)
ResourceFactoryManagerLocal
getCreateHistoryItem in interface ResourceFactoryManagerLocalhistoryItemId - identifies the history item to return
null if the id does not have a corresponding item
public int getCreateChildResourceHistoryCount(int parentResourceId,
Long beginDate,
Long endDate)
ResourceFactoryManagerLocal
getCreateChildResourceHistoryCount in interface ResourceFactoryManagerLocalparentResourceId - resource to check for child resource creation requestsbeginDate - filter used to show only results occurring after this epoch millis parameter, nullableendDate - filter used to show only results occurring before this epoch millis parameter, nullable
public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.CreateResourceHistory> findCreateChildResourceHistory(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
Long beginDate,
Long endDate,
org.rhq.core.domain.util.PageControl pageControl)
ResourceFactoryManagerRemote
findCreateChildResourceHistory in interface ResourceFactoryManagerLocalfindCreateChildResourceHistory in interface ResourceFactoryManagerRemotesubject - the user making the requestparentResourceId - resource to check for child resource creationsbeginDate - filter used to show only results occurring after this epoch millis parameter, nullableendDate - filter used to show only results occurring before this epoch millis parameter, nullablepageControl - control for pagination
public int getDeleteChildResourceHistoryCount(int parentResourceId,
Long beginDate,
Long endDate)
ResourceFactoryManagerLocal
getDeleteChildResourceHistoryCount in interface ResourceFactoryManagerLocalparentResourceId - resource to check for child resource delete requestsbeginDate - filter used to show only results occurring after this epoch millis parameter, nullableendDate - filter used to show only results occurring before this epoch millis parameter, nullable
public org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.DeleteResourceHistory> findDeleteChildResourceHistory(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
Long beginDate,
Long endDate,
org.rhq.core.domain.util.PageControl pageControl)
ResourceFactoryManagerRemote
findDeleteChildResourceHistory in interface ResourceFactoryManagerLocalfindDeleteChildResourceHistory in interface ResourceFactoryManagerRemotesubject - the user making the requestparentResourceId - resource to check for deleted child resourcesbeginDate - filter used to show only results occurring after this epoch millis parameter, nullablepageControl - control for pagination
public org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersionNumber,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
InputStream packageBitStream)
ResourceFactoryManagerLocalCreateDeletePolicy.BOTH or
CreateDeletePolicy.CREATE_ONLY. If this call is made for a resource type that cannot be created based on
this policy, the plugin container will throw an exception. This call should only be made for resource types that
are defined with a creation data type of ResourceCreationDataType.CONTENT. If this call is made for a
resource type that cannot be created via an package, the plugin container will throw an exception.
createResource in interface ResourceFactoryManagerLocaluser - user requesting the creationparentResourceId - parent resource under which the new resource should be creatednewResourceTypeId - identifies the type of resource being creatednewResourceName - name of the resource being createdpluginConfiguration - optional plugin configuration that may be needed in order to create the new
resourcepackageName - name of the package that will be created as a result of this resource createpackageVersionNumber - machine formatted identifier of the specific version of the packagearchitectureId - ID of the architecture of the package, null indicates NoArch (any)deploymentTimeConfiguration - dictates how the package will be deployedpackageBitStream - content of the package to create
public org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersionNumber,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
InputStream packageBitStream,
Map<String,String> packageUploadDetails)
createResource in interface ResourceFactoryManagerLocal
public org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersionNumber,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
InputStream packageBitStream,
Map<String,String> packageUploadDetails,
Integer timeout)
public org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int resourceTypeId,
String resourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
org.rhq.core.domain.configuration.Configuration resourceConfiguration)
createResource in interface ResourceFactoryManagerLocalResourceFactoryManagerRemote#createResource(Subject,int,int,String,Configuration,Configuration)
public org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject user,
int parentResourceId,
int resourceTypeId,
String resourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
org.rhq.core.domain.configuration.Configuration resourceConfiguration,
Integer timeout)
ResourceFactoryManagerRemoteCreateDeletePolicy.BOTH or
CreateDeletePolicy.CREATE_ONLY. If this call is made for a resource type that cannot be created based on
this policy, the plugin container will throw an exception. This call should only be made for resource types that
are defined with a creation data type of ResourceCreationDataType.CONFIGURATION. If this call is made for
a resource type that cannot be created via a configuration, the plugin container will throw an exception.
createResource in interface ResourceFactoryManagerLocalcreateResource in interface ResourceFactoryManagerRemoteuser - user requesting the creationparentResourceId - parent resource under which the new resource should be createdresourceTypeId - type of resource to createresourceName - name of the resource being createdpluginConfiguration - optional plugin configuration that may be needed in order to create the new resourceresourceConfiguration - resource configuration for the new resourcetimeout - number of milliseconds before the agent suffers a timeout when creating the resource. If null uses default.ResourceFactoryManagerRemote#createResource(Subject,int,int,String,Configuration,Configuration,Integer)
public org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResource(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersionNumber,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
byte[] packageBits,
Integer timeout)
ResourceFactoryManagerRemoteCreateDeletePolicy.BOTH or
CreateDeletePolicy.CREATE_ONLY. If this call is made for a resource type that cannot be created based on
this policy, the plugin container will throw an exception. This call should only be made for resource types that
are defined with a creation data type of ResourceCreationDataType.CONTENT. If this call is made for a
resource type that cannot be created via an package, the plugin container will throw an exception.
createPackageBackedResource in interface ResourceFactoryManagerLocalcreatePackageBackedResource in interface ResourceFactoryManagerRemotesubject - user requesting the creationparentResourceId - parent resource under which the new resource should be creatednewResourceTypeId - identifies the type of resource being creatednewResourceName - Ignored, pass null. This is determined from the package.pluginConfiguration - optional plugin configuration that may be needed in order to create the new
resourcepackageName - name of the package that will be created as a result of this resource createpackageVersionNumber - The string version of the package. If null will be set to system timestamp (long)architectureId - Id of the target architecture of the package, null indicates NoArch (any).deploymentTimeConfiguration - dictates how the package will be deployedpackageBits - content of the package to createtimeout - number of milliseconds before the agent suffers a timeout when creating the resource. If null uses default.ResourceFactoryManagerRemote#createPackageBackedResource(Subject,int,int,String,Configuration,String,String,Integer,Configuration,byte[],Integer)
public org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResource(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersionNumber,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
byte[] packageBits)
createPackageBackedResource in interface ResourceFactoryManagerLocalResourceFactoryManagerRemote#createPackageBackedResource(Subject,int,int,String,Configuration,String,String,Integer,Configuration,byte[])
public org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
int packageVersionId)
createPackageBackedResourceViaPackageVersion in interface ResourceFactoryManagerLocalResourceFactoryManagerRemote#createPackageBackedResourceViaPackageVersion(Subject, int, int, String, Configuration, Configuration, int)
public org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
int packageVersionId,
Integer timeout)
ResourceFactoryManagerRemoteCreateDeletePolicy.BOTH or
CreateDeletePolicy.CREATE_ONLY. If this call is made for a resource type that cannot be created based on
this policy, the plugin container will throw an exception. This call should only be made for resource types that
are defined with a creation data type of ResourceCreationDataType.CONTENT. If this call is made for a
resource type that cannot be created via an package, the plugin container will throw an exception.
createPackageBackedResourceViaPackageVersion in interface ResourceFactoryManagerLocalcreatePackageBackedResourceViaPackageVersion in interface ResourceFactoryManagerRemotesubject - user requesting the creationparentResourceId - parent resource under which the new resource should be creatednewResourceTypeId - identifies the type of resource being creatednewResourceName - Ignored, pass null. This is determined from the package.pluginConfiguration - optional plugin configuration that may be needed in order to create the new
resourcedeploymentTimeConfiguration - dictates how the package will be deployedpackageVersionId - An existing package version to back this resourcetimeout - number of milliseconds before the agent suffers a timeout when creating the resource. If null uses default.ResourceFactoryManagerRemote#createPackageBackedResourceViaPackageVersion(Subject, int, int, String, Configuration, Configuration, int, Integer)
public List<org.rhq.core.domain.resource.DeleteResourceHistory> deleteResources(org.rhq.core.domain.auth.Subject user,
int[] resourceIds)
ResourceFactoryManagerRemote
deleteResources in interface ResourceFactoryManagerLocaldeleteResources in interface ResourceFactoryManagerRemoteuser - user requesting the deletion. must have resource delete perm on the resources.resourceIds - the resources being deletedResourceFactoryManagerRemote.deleteResources(Subject,int[])
public org.rhq.core.domain.resource.DeleteResourceHistory deleteResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
ResourceFactoryManagerRemote
deleteResource in interface ResourceFactoryManagerLocaldeleteResource in interface ResourceFactoryManagerRemotesubject - user requesting the deletion. must have resource delete perm on the resource.resourceId - resource being deletedResourceFactoryManagerRemote.deleteResource(Subject,int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||