|
||||||||||
| 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 |
|---|
| 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
|
| Fields inherited from interface org.ow2.jasmine.jadort.api.IJadortService |
|---|
EJB_JNDI_NAME |
| 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)
|
|
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)
|
|
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)
|
|
org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean |
getCurrentOperation()
|
|
org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean.Step |
getCurrentStep()
IMPORTANT: Avoid calling this method from inside other methods of the JadortServiceImpl class (it will be costly) |
|
java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean> |
getOperationsList()
|
|
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 |
selectApplication(java.net.URL url)
|
|
void |
selectGroup(org.ow2.jasmine.jadort.api.entities.topology.GroupBean selectedGroup)
|
|
void |
selectOperation(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean selectedOperation)
|
|
void |
selectOperationType(org.ow2.jasmine.jadort.api.IJadortService.OperationType operationType)
|
|
void |
selectServers(java.util.List<org.ow2.jasmine.jadort.api.entities.topology.ServerBean> selectedServers)
|
|
void |
selectVMImage(org.ow2.jasmine.jadort.api.entities.deployment.VMImageBean selectedVMImage)
|
|
void |
selectVMImage(org.ow2.jasmine.jadort.api.entities.deployment.VMImageBean selectedVMImage,
org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
|
|
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 void selectGroup(org.ow2.jasmine.jadort.api.entities.topology.GroupBean selectedGroup)
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 void selectOperationType(org.ow2.jasmine.jadort.api.IJadortService.OperationType operationType)
throws org.ow2.jasmine.jadort.api.JadortServiceException
selectOperationType 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_OPERATION_TYPE step)
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 - If the abortServer can not be called in
the current step. (this method can be called only in
Step.EXECUTING_MIGRATION_PART1, Step.EXECUTING_MIGRATION_PART2,
EXECUTING_MAINTENANCE_CLUSTER,
Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps)
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 selectApplication(java.net.URL url)
throws org.ow2.jasmine.jadort.api.JadortServiceException
selectApplication in interface org.ow2.jasmine.jadort.api.IJadortServiceorg.ow2.jasmine.jadort.api.JadortServiceException - public 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 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 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 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 - If the abortWorker can not be called in
the current step. (this method can be called only in
EXECUTING_MAINTENANCE_CLUSTER and
EXECUTING_MAINTENANCE_NO_CLUSTER step)
public void selectVMImage(org.ow2.jasmine.jadort.api.entities.deployment.VMImageBean selectedVMImage)
throws org.ow2.jasmine.jadort.api.JadortServiceException
selectVMImage in interface org.ow2.jasmine.jadort.api.IJadortServiceJadortServiceException
- org.ow2.jasmine.jadort.api.JadortServiceException
public void selectVMImage(org.ow2.jasmine.jadort.api.entities.deployment.VMImageBean selectedVMImage,
org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
throws org.ow2.jasmine.jadort.api.JadortServiceException
selectVMImage in interface org.ow2.jasmine.jadort.api.IJadortServiceJadortServiceException
- org.ow2.jasmine.jadort.api.JadortServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||