|
||||||||||
| 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
org.ow2.jasmine.jadort.service.implementation.StepManager
org.ow2.jasmine.jadort.service.implementation.JadortServiceStatefulBean
public class JadortServiceStatefulBean
Stateful session bean that provides the JaDOrT service.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.ow2.jasmine.jadort.api.IJadortService |
|---|
IJadortService.OperationType |
| Field Summary |
|---|
| Fields inherited from class org.ow2.jasmine.jadort.service.implementation.OperationPersistenceManager |
|---|
em, operation |
| Fields inherited from interface org.ow2.jasmine.jadort.api.IJadortService |
|---|
EJB_JNDI_NAME |
| Constructor Summary | |
|---|---|
JadortServiceStatefulBean()
|
|
| Method Summary | |
|---|---|
void |
abortServer(ServerBean server)
Aborts the task a ServerBean is currently doing. |
void |
abortWorker(WorkerBean worker)
Aborts the task a WorkerBean is currently doing. |
boolean |
checkServer(ServerBean server)
Checks if the problem on a given ServerBean has been resolved. |
boolean |
checkWorker(WorkerBean worker)
Checks if the problem on a given WorkerBean has been resolved. |
static ApplicationBean |
createApplicationBeanFromFile(java.io.File file)
Application bean constructor. |
void |
createNewOperation(java.lang.String newOperationName)
Create a new operation |
void |
deleteOperation(OperationStateBean selectedOperation)
Delete an Operation from the operation list |
OperationStateBean |
getCurrentOperation()
Returns the current operation. |
OperationStateBean.Step |
getCurrentStep()
Returns the current Step of the current operation IMPORTANT: Avoid calling this method from inside other methods of the JadortServiceStatefulBean class (it will be costly) |
java.util.List<OperationStateBean> |
getOperationsList()
Returns the list of operations |
void |
ignoreServer(ServerBean server)
Ignores the error on a given ServerBean. |
void |
ignoreWorker(WorkerBean worker)
Ignores the error on a given WorkerBean. |
protected void |
initialize()
|
void |
loadTopology(java.lang.String topology)
Loads the topology using an XML stream passed as a string. |
void |
next()
goes to next step |
void |
previous()
Goes back to the previous step. |
void |
restartServer(ServerBean server)
Restarts a ServerBean that's in an error. |
void |
restartWorker(WorkerBean worker)
Restarts a WorkerBean that's in an error. |
void |
selectApplication(java.net.URL url)
Create a new application |
void |
selectGroup(GroupBean selectedGroup)
Select the group that JaDOrT will be maintaining or migrating |
void |
selectOperation(OperationStateBean selectedOperation)
Select an Operation from the operation list |
void |
selectOperationType(IJadortService.OperationType operationType)
Select the operation type |
void |
selectServers(java.util.List<ServerBean> selectedServers)
Select the servers to process |
void |
selectVMImage(VMImageBean selectedVMImage)
Select a VM image from the VM images list. |
void |
selectVMImage(VMImageBean selectedVMImage,
ServerBean server)
Select a VM image from the VM images list for a given server. |
protected void |
terminate()
|
| Methods inherited from class org.ow2.jasmine.jadort.service.implementation.StepManager |
|---|
canGoToNextStep, canGoToPreviousStep, checkStep, executeNextStep, executePreviousStep |
| Methods inherited from class org.ow2.jasmine.jadort.service.implementation.ActionManager |
|---|
checkApplication, fetchGroups, fillApplications, fillVMImages, fillWorkerProgressListBasedOnServerProgressList, getServerProgress, getWorkerProgress, isSameApplication, reachAimedServerProgressState, reachAimedWorkerProgressState, 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 JadortServiceStatefulBean()
| Method Detail |
|---|
@PostConstruct protected void initialize()
@PreDestroy protected void terminate()
public OperationStateBean.Step getCurrentStep()
getCurrentStep in interface IJadortService
public java.util.List<OperationStateBean> getOperationsList()
throws JadortServiceException
getOperationsList in interface IJadortServiceJadortServiceException - if the getOperationsList() method can not
be called in the current step. (this method can be called only in
the OperationStateBean.Step.SELECT_OPERATION step)
public void deleteOperation(OperationStateBean selectedOperation)
throws JadortServiceException
deleteOperation in interface IJadortServiceselectedOperation - the operation to be deleted
JadortServiceException - OperationStateBean.Step.SELECT_OPERATION step)
public void selectOperation(OperationStateBean selectedOperation)
throws JadortServiceException
selectOperation in interface IJadortServiceselectedOperation - the operation to be selected
JadortServiceException - if the selectOperation can not be called
in the current step. (this method can be called only in the
OperationStateBean.Step.SELECT_OPERATION step)
public void createNewOperation(java.lang.String newOperationName)
throws JadortServiceException
createNewOperation in interface IJadortServicenewOperationName - the name of the new operation that will be
created
JadortServiceException - OperationStateBean.Step.SELECT_OPERATION step)
public OperationStateBean getCurrentOperation()
throws JadortServiceException
getCurrentOperation in interface IJadortServiceJadortServiceException - If fetching fails.
public void next()
throws JadortServiceException
next in interface IJadortServiceJadortServiceException - if going to the next step is not allowed.IJadortService#canGoToNextStep()
public void previous()
throws JadortServiceException
previous in interface IJadortServiceJadortServiceException - if going to the previous step is not
allowed.IJadortService#canGoToPreviousStep()
public void loadTopology(java.lang.String topology)
throws JadortServiceException
loadTopology in interface IJadortServicetopology - Topology XML stream passed as a string.
JadortServiceException - OperationStateBean.Step.INITIALIZE_TOPOLOGY step)
public void selectGroup(GroupBean selectedGroup)
throws JadortServiceException
selectGroup in interface IJadortServiceselectedGroup - the group that JaDOrT will be maintaining or
migrating
JadortServiceException - if the selectedGroup method can not be
called in the current step. (this method can be called only in
the OperationStateBean.Step.SELECT_GROUP step)
public void selectOperationType(IJadortService.OperationType operationType)
throws JadortServiceException
selectOperationType in interface IJadortServiceoperationType - the operation type
JadortServiceException - if the selectedGroup method can not be
called in the current step. (this method can be called only in
the OperationStateBean.Step.SELECT_OPERATION_TYPE step)
public void selectApplication(java.net.URL url)
throws JadortServiceException
selectApplication in interface IJadortServiceurl - URL where to fetch the application. Can be local, remote
(HTTP, FTP, ...)
JadortServiceException - OperationStateBean.Step.SELECT_APPLICATION step)
public void selectVMImage(VMImageBean selectedVMImage)
throws JadortServiceException
selectVMImage in interface IJadortServiceselectedVMImage - the VM image to be selected
JadortServiceException
- OperationStateBean.Step.SELECT_VM_IMAGE_FOR_SERVER step)
JadortServiceException
public void selectVMImage(VMImageBean selectedVMImage,
ServerBean server)
throws JadortServiceException
selectVMImage in interface IJadortServiceselectedVMImage - the VM image to be selectedserver - the server on which this image shall be deployed
JadortServiceException
- OperationStateBean.Step.SELECT_VM_IMAGE step)
JadortServiceException
public void selectServers(java.util.List<ServerBean> selectedServers)
throws JadortServiceException
selectServers in interface IJadortServiceselectedServers - the servers to process
JadortServiceException - if the selectServers method can not be
called in the current step (this method can be called only in the
OperationStateBean.Step.SELECT_SERVERS step)
public void abortServer(ServerBean server)
throws JadortServiceException
abortServer in interface IJadortServiceserver - the server that will be aborted
JadortServiceException - If the abortServer can not be called in
the current step. (this method can be called only in the
OperationStateBean.Step.EXECUTING_MIGRATION,
OperationStateBean.Step.UNDEPLOY_ERASE_OLD_VERSION,
OperationStateBean.Step.EXECUTING_MIGRATION_OSGI,
OperationStateBean.Step.ERASE_OLD_VERSIONS,
OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER and
OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps)
public void restartServer(ServerBean server)
throws JadortServiceException
restartServer in interface IJadortServiceserver - the server on which the task will be restarted
JadortServiceException - OperationStateBean.Step.EXECUTING_MIGRATION,
OperationStateBean.Step.UNDEPLOY_ERASE_OLD_VERSION,
OperationStateBean.Step.EXECUTING_MIGRATION_OSGI,
OperationStateBean.Step.ERASE_OLD_VERSIONS,
OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER and
OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps)
public boolean checkServer(ServerBean server)
throws JadortServiceException
checkServer in interface IJadortServiceserver - the server that will be checked
JadortServiceException - if the checkServer can not be called in
the current step. (this method can be called only in the
OperationStateBean.Step.EXECUTING_MIGRATION,
OperationStateBean.Step.UNDEPLOY_ERASE_OLD_VERSION,
OperationStateBean.Step.EXECUTING_MIGRATION_OSGI,
OperationStateBean.Step.ERASE_OLD_VERSIONS,
OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER and
OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps)
public void ignoreServer(ServerBean server)
throws JadortServiceException
ignoreServer in interface IJadortServiceserver - the server that will be ignored
JadortServiceException - OperationStateBean.Step.EXECUTING_MIGRATION,
OperationStateBean.Step.UNDEPLOY_ERASE_OLD_VERSION,
OperationStateBean.Step.EXECUTING_MIGRATION_OSGI,
OperationStateBean.Step.ERASE_OLD_VERSIONS,
OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER and
OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps)
public void abortWorker(WorkerBean worker)
throws JadortServiceException
abortWorker in interface IJadortServiceworker - the worker that will be aborted
JadortServiceException - If the abortWorker can not be called in
the current step. (this method can be called only in the
OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER and
OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps)
public void restartWorker(WorkerBean worker)
throws JadortServiceException
restartWorker in interface IJadortServiceworker - the worker on which the task will be restarted
JadortServiceException - OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER and
OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps)
public boolean checkWorker(WorkerBean worker)
throws JadortServiceException
checkWorker in interface IJadortServiceworker - the worker that will be checked
JadortServiceException - if the checkWorker can not be called in
the current step. (this method can be called only in the
OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER and
OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps)
public void ignoreWorker(WorkerBean worker)
throws JadortServiceException
ignoreWorker in interface IJadortServiceworker - the worker that will be ignored
JadortServiceException - OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER and
OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps)
public static ApplicationBean createApplicationBeanFromFile(java.io.File file)
throws java.io.FileNotFoundException,
org.ow2.util.ee.deploy.impl.helper.DeployableHelperException,
org.ow2.util.archive.api.ArchiveException
file - The archive file.
java.io.FileNotFoundException - Throw if the archive file is not found.
org.ow2.util.ee.deploy.impl.helper.DeployableHelperException - Throw if the archive hasn't any
deployable.
org.ow2.util.archive.api.ArchiveException - Throw if the file given isn't a archive.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||