|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jasmine.jadort.service.implementation.JadortServiceImpl
public class JadortServiceImpl
This class provides default implementations for the IJadortService interface.
| Nested Class Summary | |
|---|---|
static class |
JadortServiceImpl.ActionType
Action type |
| Nested classes/interfaces inherited from interface org.ow2.jasmine.jadort.api.IJadortService |
|---|
org.ow2.jasmine.jadort.api.IJadortService.OperationType |
| Field Summary | |
|---|---|
protected javax.persistence.EntityManager |
em
|
protected javax.jms.QueueConnection |
qc
|
protected javax.jms.Queue |
queue
|
protected javax.jms.QueueSession |
session
|
| Constructor Summary | |
|---|---|
JadortServiceImpl()
|
|
| Method Summary | ||
|---|---|---|
void |
abortServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
|
|
void |
abortWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
|
|
boolean |
canGoToNextStep()
|
|
boolean |
canGoToPreviousStep()
|
|
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 |
|
boolean |
checkServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
|
|
boolean |
checkWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
|
|
void |
createApplication(java.net.URL url)
|
|
protected org.ow2.jasmine.jadort.api.entities.topology.ConnectorBean |
createJMXConnectorBean(URLConnector urlConnector)
|
|
void |
createNewOperation(java.lang.String newOperationName)
|
|
void |
deleteOperation(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean selectedOperation)
|
|
int |
getActiveSessions()
|
|
org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean |
getApplication()
|
|
org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean |
getCurrentOperation()
|
|
org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean.Step |
getCurrentStep()
|
|
java.util.List<org.ow2.jasmine.jadort.api.entities.topology.GroupBean> |
getGroups()
|
|
java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean> |
getOperationsList()
|
|
org.ow2.jasmine.jadort.api.IJadortService.OperationType |
getOperationType()
|
|
org.ow2.jasmine.jadort.api.entities.topology.GroupBean |
getSelectedGroup()
|
|
java.util.List<org.ow2.jasmine.jadort.api.entities.topology.ServerBean> |
getSelectedServers()
|
|
java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean> |
getServerProgressList()
|
|
java.util.List<org.ow2.jasmine.jadort.api.entities.topology.ServerBean> |
getServers()
|
|
java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.WorkerProgressBean> |
getWorkerProgressList()
|
|
void |
ignoreServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
|
|
void |
ignoreWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
|
|
protected void |
initialize()
|
|
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 |
loadDeployMETopology(java.io.File xmlTopoFile)
|
|
protected void |
loadJadortSpecificTopology(java.io.File xmlTopoFile)
|
|
protected
|
loadSchemaAndFile(java.lang.String xsdPath,
java.lang.Class<T> rootClass,
java.io.File xmlFile)
Verifies an XML file against an XSD and instantiates it using a given class. |
|
void |
loadTopology(java.io.File xmlTopoFile)
|
|
void |
next()
|
|
void |
previous()
|
|
void |
restartServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
|
|
void |
restartWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
|
|
void |
selectGroup(org.ow2.jasmine.jadort.api.entities.topology.GroupBean selectedGroup,
org.ow2.jasmine.jadort.api.IJadortService.OperationType operationType)
|
|
void |
selectOperation(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean selectedOperation)
|
|
void |
selectServers(java.util.List<org.ow2.jasmine.jadort.api.entities.topology.ServerBean> selectedServers)
|
|
protected void |
terminate()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.persistence.EntityManager em
protected javax.jms.QueueConnection qc
protected javax.jms.QueueSession session
protected javax.jms.Queue queue
| Constructor Detail |
|---|
public JadortServiceImpl()
| Method Detail |
|---|
protected void initialize()
protected void terminate()
public java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean> getOperationsList()
throws org.ow2.jasmine.jadort.api.JadortServiceException
getOperationsList in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if the getOperationsList() method can not
be called in the current step. (this method can be called only in
SELECT_OPERATION step)
public org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean getCurrentOperation()
throws org.ow2.jasmine.jadort.api.JadortServiceException
getCurrentOperation in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - If fetching fails.
public void loadTopology(java.io.File xmlTopoFile)
throws org.ow2.jasmine.jadort.api.JadortServiceException
loadTopology in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException -
protected void loadJadortSpecificTopology(java.io.File xmlTopoFile)
throws javax.xml.bind.UnmarshalException,
org.ow2.jasmine.jadort.api.JadortServiceException
xmlTopoFile - JaDOrT-specific topology XML file to load.
javax.xml.bind.UnmarshalException
org.ow2.jasmine.jadort.api.JadortServiceExceptionloadSchemaAndFile(String, Class, File)
protected void loadDeployMETopology(java.io.File xmlTopoFile)
throws javax.xml.bind.UnmarshalException,
org.ow2.jasmine.jadort.api.JadortServiceException
xmlTopoFile - JASMINe Deploy ME topology XML file to load.
javax.xml.bind.UnmarshalException
org.ow2.jasmine.jadort.api.JadortServiceExceptionloadSchemaAndFile(String, Class, File)
protected <T> T loadSchemaAndFile(java.lang.String xsdPath,
java.lang.Class<T> rootClass,
java.io.File xmlFile)
throws org.ow2.jasmine.jadort.api.JadortServiceException,
javax.xml.bind.UnmarshalException
xsdPath - XSD file path.rootClass - Root class used for instantiating JAXB.xmlFile - XML to load.
org.ow2.jasmine.jadort.api.JadortServiceException - If loading fails.
javax.xml.bind.UnmarshalException - If parsing fails (file doesn't correspond to
XSD).protected org.ow2.jasmine.jadort.api.entities.topology.ConnectorBean createJMXConnectorBean(URLConnector urlConnector)
urlConnector - URLConnector for which to create a JMXConnector bean.
public java.util.List<org.ow2.jasmine.jadort.api.entities.topology.GroupBean> getGroups()
throws org.ow2.jasmine.jadort.api.JadortServiceException
getGroups in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if the getGroups() method can not be
called in the current step. (this method can be called only in
SELECT_GROUP step)
public void selectGroup(org.ow2.jasmine.jadort.api.entities.topology.GroupBean selectedGroup,
org.ow2.jasmine.jadort.api.IJadortService.OperationType operationType)
throws org.ow2.jasmine.jadort.api.JadortServiceException
selectGroup in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if the selectedGroup method can not be
called in the current step. (this method can be called only in
SELECT_GROUP step)
public int getActiveSessions()
throws org.ow2.jasmine.jadort.api.JadortServiceException
getActiveSessions in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if the getActiveSessions() method can not
be called in the current step (this method can be called only in
EXECUTING_MIGRATION_PART1, EXECUTING_MIGRATION_PART2,
EXECUTING_MAINTENANCE_CLUSTER and
EXECUTING_MAINTENANCE_NO_CLUSTER) or contacting a server has
failed.
public java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean> getServerProgressList()
throws org.ow2.jasmine.jadort.api.JadortServiceException
getServerProgressList in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if the getServerProgressList() method can
not be called in the current step. (this method can be called
only in SELECT_SERVERS, EXECUTING_MIGRATION_PART1,
EXECUTING_MIGRATION_PART2, EXECUTING_MAINTENANCE_CLUSTER,
EXECUTING_MAINTENANCE_NO_CLUSTER and FINISHED steps)
public java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.WorkerProgressBean> getWorkerProgressList()
throws org.ow2.jasmine.jadort.api.JadortServiceException
getWorkerProgressList in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if the getWorkerProgressList() method can
not be called in the current step. (this method can be called
only in SELECT_SERVERS, EXECUTING_MIGRATION_PART1,
EXECUTING_MIGRATION_PART2, EXECUTING_MAINTENANCE_CLUSTER,
EXECUTING_MAINTENANCE_NO_CLUSTER and FINISHED steps)
public org.ow2.jasmine.jadort.api.entities.topology.GroupBean getSelectedGroup()
throws org.ow2.jasmine.jadort.api.JadortServiceException
getSelectedGroup in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if the getSelectedGroup() method can not
be called in the current step. (this method can be called only in
SELECT_APPLICATION and SELECT_SERVERS steps)
public void restartServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
throws org.ow2.jasmine.jadort.api.JadortServiceException
restartServer in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException -
public void ignoreServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
throws org.ow2.jasmine.jadort.api.JadortServiceException
ignoreServer in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException -
public void abortServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
throws org.ow2.jasmine.jadort.api.JadortServiceException
abortServer in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException -
public boolean checkServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
throws org.ow2.jasmine.jadort.api.JadortServiceException
checkServer in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if the checkServer can not be called in
the current step. (this method can be called only in
EXECUTING_MIGRATION_PART1, EXECUTING_MIGRATION_PART2,
EXECUTING_MAINTENANCE_CLUSTER and
EXECUTING_MAINTENANCE_NO_CLUSTER steps)
public boolean checkWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
throws org.ow2.jasmine.jadort.api.JadortServiceException
checkWorker in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if the checkWorker can not be called in
the current step. (this method can be called only in
EXECUTING_MAINTENANCE_CLUSTER and
EXECUTING_MAINTENANCE_NO_CLUSTER steps)
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.
public void createApplication(java.net.URL url)
throws org.ow2.jasmine.jadort.api.JadortServiceException
createApplication in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException -
public org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean getApplication()
throws org.ow2.jasmine.jadort.api.JadortServiceException
getApplication in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceExceptionpublic org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean.Step getCurrentStep()
getCurrentStep in interface org.ow2.jasmine.jadort.api.IJadortService
public void next()
throws org.ow2.jasmine.jadort.api.JadortServiceException
next in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if it is not allowed to go to the next
step.
public void previous()
throws org.ow2.jasmine.jadort.api.JadortServiceException
previous in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if it is not allowed to go to the previous
step.public boolean canGoToNextStep()
canGoToNextStep in interface org.ow2.jasmine.jadort.api.IJadortServicepublic boolean canGoToPreviousStep()
canGoToPreviousStep in interface org.ow2.jasmine.jadort.api.IJadortService
public void selectOperation(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean selectedOperation)
throws org.ow2.jasmine.jadort.api.JadortServiceException
selectOperation in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if the selectOperation can not be called
in the current step. (this method can be called only in
SELECT_OPERATION step)
public void createNewOperation(java.lang.String newOperationName)
throws org.ow2.jasmine.jadort.api.JadortServiceException
createNewOperation in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException -
public void deleteOperation(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean selectedOperation)
throws org.ow2.jasmine.jadort.api.JadortServiceException
deleteOperation in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - public org.ow2.jasmine.jadort.api.IJadortService.OperationType getOperationType()
public void selectServers(java.util.List<org.ow2.jasmine.jadort.api.entities.topology.ServerBean> selectedServers)
throws org.ow2.jasmine.jadort.api.JadortServiceException
selectServers in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - if the selectServers method can not be
called in the current step (this method can be called only in
SELECT_SERVERS step)
public java.util.List<org.ow2.jasmine.jadort.api.entities.topology.ServerBean> getServers()
throws org.ow2.jasmine.jadort.api.JadortServiceException
getServers in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - If fetching fails or if the getServers()
method can not be called in the current step (this method can be
called only in the SELECT_SERVERS step).
public void restartWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
throws org.ow2.jasmine.jadort.api.JadortServiceException
restartWorker in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException -
public void ignoreWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
throws org.ow2.jasmine.jadort.api.JadortServiceException
ignoreWorker in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException -
public void abortWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
throws org.ow2.jasmine.jadort.api.JadortServiceException
abortWorker in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException -
public java.util.List<org.ow2.jasmine.jadort.api.entities.topology.ServerBean> getSelectedServers()
throws org.ow2.jasmine.jadort.api.JadortServiceException
getSelectedServers in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - If fetching fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||