public class ResourceFactoryManagerBean extends Object implements ResourceFactoryManagerLocal, ResourceFactoryManagerRemote
| Constructor and Description |
|---|
ResourceFactoryManagerBean() |
| Modifier and Type | Method and Description |
|---|---|
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)
|
void |
completeDeleteResourceRequest(DeleteResourceResponse response)
|
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 |
createPackageBackedResourceViaContentHandle(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersion,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
String temporaryContentHandle,
Integer timeout)
Like
ResourceFactoryManagerRemote.createPackageBackedResource(org.rhq.core.domain.auth.Subject, int, int, String, org.rhq.core.domain.configuration.Configuration, String, String, Integer, org.rhq.core.domain.configuration.Configuration, byte[], Integer)
except that this method takes a temporaryContentHandle as parameter instead of a byte array. |
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.
|
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()
ResourceFactoryManagerLocalcheckForTimedOutRequests in interface ResourceFactoryManagerLocalpublic 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)
ResourceFactoryManagerLocalpersistCreateHistory 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 resourcepublic 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)
ResourceFactoryManagerLocalpersistCreateHistory 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 installingpublic org.rhq.core.domain.resource.DeleteResourceHistory persistDeleteHistory(org.rhq.core.domain.auth.Subject user,
int resourceId)
ResourceFactoryManagerLocalpersistDeleteHistory in interface ResourceFactoryManagerLocaluser - use performing the deleteresourceId - resource being deletedpublic org.rhq.core.domain.resource.CreateResourceHistory getCreateHistoryItem(int historyItemId)
ResourceFactoryManagerLocalgetCreateHistoryItem in interface ResourceFactoryManagerLocalhistoryItemId - identifies the history item to returnnull if the id does not have a corresponding itempublic int getCreateChildResourceHistoryCount(int parentResourceId,
Long beginDate,
Long endDate)
ResourceFactoryManagerLocalgetCreateChildResourceHistoryCount 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, nullablepublic 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)
ResourceFactoryManagerRemotefindCreateChildResourceHistory 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 paginationpublic int getDeleteChildResourceHistoryCount(int parentResourceId,
Long beginDate,
Long endDate)
ResourceFactoryManagerLocalgetDeleteChildResourceHistoryCount 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, nullablepublic 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)
ResourceFactoryManagerRemotefindDeleteChildResourceHistory 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, nullableendDate - filter used to show only results occurring before this epoch millis parameter, nullablepageControl - control for paginationpublic 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 createpublic 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 ResourceFactoryManagerLocalpublic 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(org.rhq.core.domain.auth.Subject, int, int, String, org.rhq.core.domain.configuration.Configuration, org.rhq.core.domain.configuration.Configuration, Integer)}.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 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.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 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.public org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResourceViaContentHandle(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int newResourceTypeId,
String newResourceName,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
String packageName,
String packageVersion,
Integer architectureId,
org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
String temporaryContentHandle,
Integer timeout)
ResourceFactoryManagerRemoteResourceFactoryManagerRemote.createPackageBackedResource(org.rhq.core.domain.auth.Subject, int, int, String, org.rhq.core.domain.configuration.Configuration, String, String, Integer, org.rhq.core.domain.configuration.Configuration, byte[], Integer)
except that this method takes a temporaryContentHandle as parameter instead of a byte array.createPackageBackedResourceViaContentHandle 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 createpackageVersion - 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 deployedtemporaryContentHandle - content handle of the package to createtimeout - number of milliseconds before the agent suffers a timeout when creating the resource. If null uses default.ContentManagerRemote.createTemporaryContentHandle(),
ContentManagerRemote.uploadContentFragment(String, byte[], int, int),
ResourceFactoryManagerRemote.createPackageBackedResource(org.rhq.core.domain.auth.Subject, int, int, String, org.rhq.core.domain.configuration.Configuration, String, String, Integer, org.rhq.core.domain.configuration.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(org.rhq.core.domain.auth.Subject, int, int, String, org.rhq.core.domain.configuration.Configuration, String, String, Integer, org.rhq.core.domain.configuration.Configuration, byte[], Integer)}.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(org.rhq.core.domain.auth.Subject, int, int, String, org.rhq.core.domain.configuration.Configuration, org.rhq.core.domain.configuration.Configuration, int, Integer)}.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 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.public List<org.rhq.core.domain.resource.DeleteResourceHistory> deleteResources(org.rhq.core.domain.auth.Subject user, int[] resourceIds)
ResourceFactoryManagerRemotedeleteResources in interface ResourceFactoryManagerRemoteuser - user requesting the deletion. must have resource delete perm on the resources.resourceIds - the resources being deletedpublic org.rhq.core.domain.resource.DeleteResourceHistory deleteResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
ResourceFactoryManagerRemotedeleteResource in interface ResourceFactoryManagerRemotesubject - user requesting the deletion. must have resource delete perm on the resource.resourceId - resource being deletedCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.