org.gcube.vremanagement.resourcemanager.impl.resources
Class ScopedRunningInstance
java.lang.Object
org.gcube.vremanagement.resourcemanager.impl.resources.ScopedResource
org.gcube.vremanagement.resourcemanager.impl.resources.ScopedRunningInstance
public final class ScopedRunningInstance
- extends ScopedResource
A scoped GCUBERunningInstance
- Author:
- Manuele Simi (ISTI-CNR)
| Fields inherited from class org.gcube.vremanagement.resourcemanager.impl.resources.ScopedResource |
action, errorMessage, hostedOn, id, jointTime, lastModificationTime, logger, scope, status, success, type |
| Methods inherited from class org.gcube.vremanagement.resourcemanager.impl.resources.ScopedResource |
doAction, equals, findResource, getAction, getErrorMessage, getId, getJointTime, getLastModificationTime, getLogger, getScope, getStatus, getType, hashCode, isSuccess, noHopeForMe, setErrorMessage, setHostedON, setJointTime, setScope, setStatus, toString |
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
ScopedRunningInstance
protected ScopedRunningInstance(String id,
org.gcube.common.core.scope.GCUBEScope scope,
String... hostedOn)
find
protected void find()
throws Exception
- Description copied from class:
ScopedResource
- Custom
- Specified by:
find in class ScopedResource
- Throws:
ScopedResource.ResourceNotFound - if it is impossible to locate the resource
Exception
addToScope
protected void addToScope()
throws ScopedResource.ResourceNotFound,
Exception
- Adds the RI to the scope
- Specified by:
addToScope in class ScopedResource
- Throws:
Exception - if it is not possible to add the resource
ScopedResource.ResourceNotFound - if the resource does not exist in the infrastructure
removeFromScope
protected void removeFromScope()
throws ScopedResource.ResourceNotFound,
ServiceNotFoundException,
Exception
- Removes the RI from the scope
- Specified by:
removeFromScope in class ScopedResource
- Throws:
Exception - if it is not possible to remove the resource
ScopedResource.ResourceNotFound - if the resource does not exist in the infrastructure
ServiceNotFoundException
getSourceServiceClass
protected String getSourceServiceClass()
getSourceServiceName
protected String getSourceServiceName()
isUndeployNeeded
public boolean isUndeployNeeded()
throws ScopedResource.ResourceNotFound
- Throws:
ScopedResource.ResourceNotFound
getHostedOn
public String getHostedOn()
- Overrides:
getHostedOn in class ScopedResource
- Returns:
- the name of the gHN hosting the instance
reportFailureOnSourceService
public void reportFailureOnSourceService(String message,
Exception e)
wasSuccessful
public void wasSuccessful()
getMaxFindAttempts
protected int getMaxFindAttempts()
- Number of times the resource is searched in the IS before to declare it lost
- Overrides:
getMaxFindAttempts in class ScopedResource
- Returns:
- the number of attempts to do
getSourcePackage
public GCUBEPackage getSourcePackage()
throws ServiceNotFoundException
- Gets the package that generated this instance
- Returns:
- the service
- Throws:
ServiceNotFoundException - if the service is not found
Copyright © 2012. All Rights Reserved.