|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jasmine.jadort.service.implementation.OperationPersistenceManager
org.ow2.jasmine.jadort.service.implementation.ActionManager
public class ActionManager
Manages the link between server and worker states and the messages to send.
| Field Summary |
|---|
| Fields inherited from class org.ow2.jasmine.jadort.service.implementation.OperationPersistenceManager |
|---|
em, operation |
| Constructor Summary | |
|---|---|
ActionManager()
|
|
| Method Summary | |
|---|---|
protected boolean |
checkApplication(org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean serverProgress,
org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean application,
java.lang.String state,
java.lang.String policy)
Checks if an application is already deployed on the server, or if has a bad policy, or if has a bad state |
protected java.util.List<org.ow2.jasmine.jadort.api.entities.topology.GroupBean> |
fetchGroups(boolean fillApplications)
Returns the list of groups obtained from the loaded topology in the current operation. |
protected void |
fillApplications(org.ow2.jasmine.jadort.api.entities.topology.GroupBean groupBean)
Fills the applications of a GroupBean and all ServerBeans
it contains. |
protected void |
fillVMImages(org.ow2.jasmine.jadort.api.entities.topology.GroupBean groupBean)
Fills the vmImages fields of a GroupBean. |
protected void |
fillWorkerProgressListBasedOnServerProgressList()
Fills the workerProgress list of the current operation based on the serverProgress list. |
protected org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean |
getServerProgress(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
Returns the serverProgress object of a server |
protected org.ow2.jasmine.jadort.api.entities.deployment.WorkerProgressBean |
getWorkerProgress(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
Returns the workerProgress object of a worker |
protected boolean |
isSameApplication(org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean a1,
org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean a2)
Compares two application, tests if a two applications are equal). |
protected void |
reachAimedServerProgressState(org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean serverProgress)
this function allows the serverProgress to executes the proper task to attend the Aimed ServerProgressState this function executes the correspondent task to go from the current serverProgress state to the Aimed ServerProgressList State. |
protected void |
reachAimedWorkerProgressState(org.ow2.jasmine.jadort.api.entities.deployment.WorkerProgressBean workerProgress)
this function allows the workerProgress to executes the proper task to attend the Aimed WorkerProgress this function executes the correspondent task to go from the current serverProgress state to the Aimed WorkerProgress State. |
protected void |
refreshActiveSessions()
|
| Methods inherited from class org.ow2.jasmine.jadort.service.implementation.OperationPersistenceManager |
|---|
mergeOperation, refreshOperation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActionManager()
| Method Detail |
|---|
protected void reachAimedServerProgressState(org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean serverProgress)
serverProgress - the serverProgress that will execute the task.protected void reachAimedWorkerProgressState(org.ow2.jasmine.jadort.api.entities.deployment.WorkerProgressBean workerProgress)
workerProgress - the workerProgress that will execute the task.
protected void fillApplications(org.ow2.jasmine.jadort.api.entities.topology.GroupBean groupBean)
throws org.ow2.jasmine.jadort.api.JadortServiceException
GroupBean and all ServerBeans
it contains.
groupBean - Group to fill.
org.ow2.jasmine.jadort.api.JadortServiceException - If getting the list of applications fails.
protected void fillVMImages(org.ow2.jasmine.jadort.api.entities.topology.GroupBean groupBean)
throws org.ow2.jasmine.jadort.api.JadortServiceException
GroupBean.
groupBean - Group to fill.
org.ow2.jasmine.jadort.api.JadortServiceException - If getting the list of applications fails.
protected java.util.List<org.ow2.jasmine.jadort.api.entities.topology.GroupBean> fetchGroups(boolean fillApplications)
throws org.ow2.jasmine.jadort.api.JadortServiceException
fillApplications - Whether to fill the applications list.
org.ow2.jasmine.jadort.api.JadortServiceException - If getting the list of applications fails.
protected boolean isSameApplication(org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean a1,
org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean a2)
a1 - the first application to be compared.a2 - the second application to be compared.
protected boolean checkApplication(org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean serverProgress,
org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean application,
java.lang.String state,
java.lang.String policy)
serverProgress - serverProgress of the server on which the
application will be checked.application - the application to be checkedstate - the state that the application should has.policy - the policy that the application should has.
protected void refreshActiveSessions()
throws org.ow2.jasmine.jadort.api.JadortServiceException
org.ow2.jasmine.jadort.api.JadortServiceExceptionNote that this doesn't merge with the current operation in DB.
protected org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean getServerProgress(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
throws org.ow2.jasmine.jadort.api.JadortServiceException
server - the server that the method will return his serverProgress
org.ow2.jasmine.jadort.api.JadortServiceException - If server not found
protected org.ow2.jasmine.jadort.api.entities.deployment.WorkerProgressBean getWorkerProgress(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
throws org.ow2.jasmine.jadort.api.JadortServiceException
worker - the server that the method will return his workerProgress
org.ow2.jasmine.jadort.api.JadortServiceException - If server not foundprotected void fillWorkerProgressListBasedOnServerProgressList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||