org.ow2.jasmine.jadort.client.console
Class JadortCommand

java.lang.Object
  extended by org.ow2.jasmine.jadort.client.console.JadortCommand

public class JadortCommand
extends java.lang.Object

Interface to call method on JaDOrT service

Author:
Malek Chahine, Remy Bresson, S. Ali Tokmen

Constructor Summary
JadortCommand(org.ow2.jasmine.jadort.api.IJadortService jadortService)
          Constructor
 
Method Summary
 boolean canGoToNextStep()
          ask the service if it is ready to go to the next step
 boolean canGoToPreviousStep()
          ask the service if it is ready to go to the previous step
 boolean checkServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
          Check if the server is ready to go to the next step.
 boolean checkWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
          Check if the worker is ready to go to the next step.
 org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean createNewOperation(java.lang.String newOperationName)
          Create a new operation and return it
 void deleteOperation(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean operation)
          Delete an operation
 java.lang.Integer getActiveSessions()
           
 org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean.Step getCurrentStep()
          Return the current operation step
 java.util.List<org.ow2.jasmine.jadort.api.entities.topology.GroupBean> getGroups()
          Get the groups
 java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean> getOperationsList()
          Return the operation list
 org.ow2.jasmine.jadort.api.entities.topology.GroupBean getSelectedGroup()
          Return the selected group
 java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean> getServerProgressList()
          Return the list of the serverProgressList
 java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.VMImageBean> getVMImages()
          get VM Image List
 java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.WorkerProgressBean> getWorkerProgressList()
          Return the list of the workerProgress
 void ignoreServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
          Ignore the error state of a server.
 void ignoreWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
          Ignore the error state of a worker.
 void loadTopology(java.io.File xmlTopoFile)
          Load a topology file
 void next()
          Go to the next step
 void previous()
          Go to the previous step
 void restartServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
          Restart the last tried deployment operation on a server.
 void restartWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
          Restart the last tried worker task on a worker.
 org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean selectApplication(java.net.URL url)
          Create a application from an archive
 void selectGroup(org.ow2.jasmine.jadort.api.entities.topology.GroupBean selectedGroup)
          Select a group
 void selectOperation(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean operation)
          Select an operation on the JaDOrT service
 void selectOperationType(org.ow2.jasmine.jadort.api.IJadortService.OperationType operationType)
          Select an operation type on the JaDOrT service
 void selectServers(java.util.List<org.ow2.jasmine.jadort.api.entities.topology.ServerBean> selectedServers)
          Select servers
 void selectVMImage(org.ow2.jasmine.jadort.api.entities.deployment.VMImageBean vmImage)
          Select a VM Image
 void selectVMImage(org.ow2.jasmine.jadort.api.entities.deployment.VMImageBean vmImage, org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
          Select a VM Image from the VM Images list for a given server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JadortCommand

public JadortCommand(org.ow2.jasmine.jadort.api.IJadortService jadortService)
Constructor

Parameters:
JaDOrT - The instance of interface of JaDOrT service
Method Detail

createNewOperation

public org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean createNewOperation(java.lang.String newOperationName)
                                                                                     throws java.lang.Exception
Create a new operation and return it

Parameters:
newOperationName - Name of the operation to create
Returns:
The created operation
Throws:
java.lang.Exception

getOperationsList

public java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean> getOperationsList()
                                                                                                    throws java.lang.Exception
Return the operation list

Returns:
The operation list
Throws:
java.lang.Exception

selectOperation

public void selectOperation(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean operation)
                     throws java.lang.Exception
Select an operation on the JaDOrT service

Parameters:
operation - The operation to select
Throws:
java.lang.Exception

deleteOperation

public void deleteOperation(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean operation)
                     throws java.lang.Exception
Delete an operation

Parameters:
operation - the operation to delete
Throws:
java.lang.Exception

loadTopology

public void loadTopology(java.io.File xmlTopoFile)
                  throws java.lang.Exception
Load a topology file

Parameters:
xmlTopoFile - xml topology file to load
Throws:
java.lang.Exception

getGroups

public java.util.List<org.ow2.jasmine.jadort.api.entities.topology.GroupBean> getGroups()
                                                                                 throws java.lang.Exception
Get the groups

Returns:
the groups list
Throws:
java.lang.Exception

selectGroup

public void selectGroup(org.ow2.jasmine.jadort.api.entities.topology.GroupBean selectedGroup)
                 throws java.lang.Exception
Select a group

Parameters:
selectedGroup - the group to select
Throws:
java.lang.Exception

selectOperationType

public void selectOperationType(org.ow2.jasmine.jadort.api.IJadortService.OperationType operationType)
                         throws java.lang.Exception
Select an operation type on the JaDOrT service

Parameters:
operationType - The operation type
Throws:
java.lang.Exception

selectVMImage

public void selectVMImage(org.ow2.jasmine.jadort.api.entities.deployment.VMImageBean vmImage)
                   throws java.lang.Exception
Select a VM Image

Parameters:
vmImage - the VM Image to select
Throws:
java.lang.Exception

selectVMImage

public void selectVMImage(org.ow2.jasmine.jadort.api.entities.deployment.VMImageBean vmImage,
                          org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
                   throws java.lang.Exception
Select a VM Image from the VM Images list for a given server.

Parameters:
selectedVMImage - the VM Image to be selected
server - the server on which this image shall be deployed
Throws:
java.lang.Exception

getVMImages

public java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.VMImageBean> getVMImages()
                                                                                       throws java.lang.Exception
get VM Image List

Throws:
java.lang.Exception

selectServers

public void selectServers(java.util.List<org.ow2.jasmine.jadort.api.entities.topology.ServerBean> selectedServers)
                   throws java.lang.Exception
Select servers

Parameters:
selectServers - the servers list to select
Throws:
java.lang.Exception

getSelectedGroup

public org.ow2.jasmine.jadort.api.entities.topology.GroupBean getSelectedGroup()
                                                                        throws java.lang.Exception
Return the selected group

Returns:
the selected group
Throws:
java.lang.Exception

getActiveSessions

public java.lang.Integer getActiveSessions()
                                    throws java.lang.Exception
Returns:
The number of active sessions on all servers:
  • If migrating, it corresponds to the number of active sessions on the old version. If no old version, this is set to 0.
  • If maintaining, it corresponds to the number of active sessions on all applications on the server.
This value is re-set every time the object is refreshed on the stateful bean, and not persisted.
Throws:
java.lang.Exception

selectApplication

public org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean selectApplication(java.net.URL url)
                                                                                 throws java.lang.Exception
Create a application from an archive

Parameters:
url - url of the archive
Returns:
the created application
Throws:
java.lang.Exception

getCurrentStep

public org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean.Step getCurrentStep()
                                                                                      throws java.lang.Exception
Return the current operation step

Returns:
the current operation step
Throws:
java.lang.Exception

canGoToNextStep

public boolean canGoToNextStep()
                        throws java.lang.Exception
ask the service if it is ready to go to the next step

Returns:
true or false
Throws:
java.lang.Exception

next

public void next()
          throws java.lang.Exception
Go to the next step

Throws:
java.lang.Exception

canGoToPreviousStep

public boolean canGoToPreviousStep()
                            throws java.lang.Exception
ask the service if it is ready to go to the previous step

Returns:
true or false
Throws:
java.lang.Exception

previous

public void previous()
              throws java.lang.Exception
Go to the previous step

Throws:
java.lang.Exception

getServerProgressList

public java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean> getServerProgressList()
                                                                                                        throws java.lang.Exception
Return the list of the serverProgressList

Returns:
the list of the serverProgressList
Throws:
java.lang.Exception

getWorkerProgressList

public java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.WorkerProgressBean> getWorkerProgressList()
                                                                                                        throws java.lang.Exception
Return the list of the workerProgress

Returns:
the list of the workerProgress
Throws:
java.lang.Exception

restartServer

public void restartServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
                   throws java.lang.Exception
Restart the last tried deployment operation on a server. To use when the last operation failed.

Parameters:
server - the server to use
Throws:
java.lang.Exception

ignoreServer

public void ignoreServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
                  throws java.lang.Exception
Ignore the error state of a server. To use when server on error and after user correct himself the error.

Parameters:
server - the server to use
Throws:
java.lang.Exception

checkServer

public boolean checkServer(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
                    throws java.lang.Exception
Check if the server is ready to go to the next step.

Parameters:
server - the server to use
Returns:
true or false
Throws:
java.lang.Exception

restartWorker

public void restartWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
                   throws java.lang.Exception
Restart the last tried worker task on a worker. To use when the last operation failed.

Parameters:
worker - the worker to use
Throws:
java.lang.Exception

ignoreWorker

public void ignoreWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
                  throws java.lang.Exception
Ignore the error state of a worker. To use when worker on error and after user correct himself the error.

Parameters:
worker - the worker to use
Throws:
java.lang.Exception

checkWorker

public boolean checkWorker(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
                    throws java.lang.Exception
Check if the worker is ready to go to the next step.

Parameters:
worker - the worker to use
Returns:
true or false
Throws:
java.lang.Exception


Copyright © 2009 OW2 Consortium. All Rights Reserved.