org.ow2.jasmine.jadort.api
Interface IJadortService


public interface IJadortService

IJadortService interface defines all methods used for the serverProgress orchestration

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

Nested Class Summary
static class IJadortService.OperationType
          Operation types.
 
Method Summary
 void abortServer(ServerBean server)
          this function forces the server to be aborted and continues this task
 void abortWorker(WorkerBean worker)
          this function forces the worker to be aborted and continues this task
 boolean canGoToNextStep()
          Tests if it is allowed to go to the next step
 boolean canGoToPreviousStep()
          Tests if it is allowed to go the previous step
 boolean checkServer(ServerBean server)
          this function checks if no problem on the server and all problems are resolved on the server.
 boolean checkWorker(WorkerBean worker)
          this function checks if no problem on the worker and all problems are resolved on the worker.
 void createApplication(java.net.URL url)
          Create a new application
 void createNewOperation(java.lang.String newOperationName)
          Create a new operation
 void deleteOperation(OperationStateBean operation)
          Delete an Operation from the operation list
 int getActiveSessions()
           
 ApplicationBean getApplication()
          Get the current application
 OperationStateBean getCurrentOperation()
          Returns the current operation
 OperationStateBean.Step getCurrentStep()
          Returns the current Step of the current operation
 java.util.List<GroupBean> getGroups()
          Returns the list of groups obtained from the loaded topology in the current operation
 java.util.List<OperationStateBean> getOperationsList()
          Returns the list of operations
 GroupBean getSelectedGroup()
          Returns the selected Group in the current operation
 java.util.List<ServerBean> getSelectedServers()
          This function allows to get the list of selected servers when maintain servers
 java.util.List<ServerProgressBean> getServerProgressList()
          Returns the list of server ServerProgressBean in the current operation.
 java.util.List<ServerBean> getServers()
          This function allows to get the list of servers.
 java.util.List<WorkerProgressBean> getWorkerProgressList()
          Returns the list of server WorkerProgressBean in the current operation
 void ignoreServer(ServerBean server)
          this function forces the server to be ignored and continues this task
 void ignoreWorker(WorkerBean worker)
          this function forces the worker to be ignored and continues this task
 void loadTopology(java.io.File xmlTopoFile)
          Loads the topology from a .xml file.
 void next()
          goes to next step
 void previous()
          Goes back to the previous step.
 void restartServer(ServerBean server)
          This function allows to restart a task on a server (the server will restart the last task)
 void restartWorker(WorkerBean worker)
          This function allows to restart a task on a worker (the worker will restart the last task)
 void selectGroup(GroupBean selectedGroup, IJadortService.OperationType operationType)
          Select a group from the group list
 void selectOperation(OperationStateBean operation)
          Select an Operation from the operation list
 void selectServers(java.util.List<ServerBean> selectedServers)
          Select the servers to maintain
 

Method Detail

getCurrentStep

OperationStateBean.Step getCurrentStep()
                                       throws JadortServiceException
Returns the current Step of the current operation

Returns:
The current step.
Throws:
JadortServiceException

getOperationsList

java.util.List<OperationStateBean> getOperationsList()
                                                     throws JadortServiceException
Returns the list of operations

Returns:
List of Operations.
Throws:
JadortServiceException

deleteOperation

void deleteOperation(OperationStateBean operation)
                     throws JadortServiceException
Delete an Operation from the operation list

Parameters:
operation - the operation to be deleted
Throws:
JadortServiceException

selectOperation

void selectOperation(OperationStateBean operation)
                     throws JadortServiceException
Select an Operation from the operation list

Parameters:
operation - the operation to be selected
Throws:
JadortServiceException

createNewOperation

void createNewOperation(java.lang.String newOperationName)
                        throws JadortServiceException
Create a new operation

Parameters:
newOperationName - the name of the new operation that will be created
Throws:
JadortServiceException

getCurrentOperation

OperationStateBean getCurrentOperation()
                                       throws JadortServiceException
Returns the current operation

Returns:
The current operation.
Throws:
JadortServiceException

canGoToNextStep

boolean canGoToNextStep()
                        throws JadortServiceException
Tests if it is allowed to go to the next step

Returns:
true id calling next() is allowed, false otherwise.
Throws:
JadortServiceException

next

void next()
          throws JadortServiceException
goes to next step

Throws:
JadortServiceException
See Also:
canGoToNextStep()

canGoToPreviousStep

boolean canGoToPreviousStep()
                            throws JadortServiceException
Tests if it is allowed to go the previous step

Returns:
true id calling previous() is allowed, false otherwise.
Throws:
JadortServiceException

previous

void previous()
              throws JadortServiceException
Goes back to the previous step.

Throws:
JadortServiceException
See Also:
canGoToPreviousStep()

loadTopology

void loadTopology(java.io.File xmlTopoFile)
                  throws JadortServiceException
Loads the topology from a .xml file.

Parameters:
xmlTopoFile - the file path of the .xml file uploaded by the user, this file contains the topology description
Throws:
JadortServiceException

getGroups

java.util.List<GroupBean> getGroups()
                                    throws JadortServiceException
Returns the list of groups obtained from the loaded topology in the current operation

Returns:
The list of groups
Throws:
JadortServiceException

selectGroup

void selectGroup(GroupBean selectedGroup,
                 IJadortService.OperationType operationType)
                 throws JadortServiceException
Select a group from the group list

Parameters:
selectedGroup - the group to be selected
Throws:
JadortServiceException

getServerProgressList

java.util.List<ServerProgressBean> getServerProgressList()
                                                         throws JadortServiceException
Returns the list of server ServerProgressBean in the current operation. The servers of these ServerProgressBean objects will have their number of active sessions up to date.

Returns:
The list of ServerProgressBean
Throws:
JadortServiceException

getWorkerProgressList

java.util.List<WorkerProgressBean> getWorkerProgressList()
                                                         throws JadortServiceException
Returns the list of server WorkerProgressBean in the current operation

Returns:
The list of WorkerProgressBean
Throws:
JadortServiceException

getSelectedGroup

GroupBean getSelectedGroup()
                           throws JadortServiceException
Returns the selected Group in the current operation

Returns:
the selected group
Throws:
JadortServiceException

getActiveSessions

int getActiveSessions()
                      throws JadortServiceException
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:
JadortServiceException

restartServer

void restartServer(ServerBean server)
                   throws JadortServiceException
This function allows to restart a task on a server (the server will restart the last task)

Parameters:
server - the server on which the task will be restarted
Throws:
JadortServiceException

checkServer

boolean checkServer(ServerBean server)
                    throws JadortServiceException
this function checks if no problem on the server and all problems are resolved on the server.

Parameters:
server - the server that will be checked
Returns:
true-> OK the problem server is resolved and it can be ignored , false -> KO the problem still
Throws:
JadortServiceException
See Also:
IJadortService#ignoreServer()

ignoreServer

void ignoreServer(ServerBean server)
                  throws JadortServiceException
this function forces the server to be ignored and continues this task

Parameters:
server - the server that will be ignored
Throws:
JadortServiceException

abortServer

void abortServer(ServerBean server)
                 throws JadortServiceException
this function forces the server to be aborted and continues this task

Parameters:
server - the server that will be aborted
Throws:
JadortServiceException

createApplication

void createApplication(java.net.URL url)
                       throws JadortServiceException
Create a new application

Parameters:
url - URL where to fetch the application. Can be local, remote (HTTP, FTP, ...)
Throws:
JadortServiceException

getApplication

ApplicationBean getApplication()
                               throws JadortServiceException
Get the current application

Returns:
the ApplicationBean that will be installed.
Throws:
JadortServiceException

selectServers

void selectServers(java.util.List<ServerBean> selectedServers)
                   throws JadortServiceException
Select the servers to maintain

Parameters:
selectedServers - the servers to maintain
Throws:
JadortServiceException

getServers

java.util.List<ServerBean> getServers()
                                      throws JadortServiceException
This function allows to get the list of servers. These servers will have their number of active sessions up to date.

Throws:
JadortServiceException

getSelectedServers

java.util.List<ServerBean> getSelectedServers()
                                              throws JadortServiceException
This function allows to get the list of selected servers when maintain servers

Throws:
JadortServiceException

restartWorker

void restartWorker(WorkerBean worker)
                   throws JadortServiceException
This function allows to restart a task on a worker (the worker will restart the last task)

Parameters:
worker - the worker on which the task will be restarted
Throws:
JadortServiceException

checkWorker

boolean checkWorker(WorkerBean worker)
                    throws JadortServiceException
this function checks if no problem on the worker and all problems are resolved on the worker.

Parameters:
worker - the worker that will be checked
Returns:
true-> OK the problem server is resolved and it can be ignored , false -> KO the problem still
Throws:
JadortServiceException
See Also:
IJadortService#ignoreWorker()

ignoreWorker

void ignoreWorker(WorkerBean worker)
                  throws JadortServiceException
this function forces the worker to be ignored and continues this task

Parameters:
worker - the worker that will be ignored
Throws:
JadortServiceException

abortWorker

void abortWorker(WorkerBean worker)
                 throws JadortServiceException
this function forces the worker to be aborted and continues this task

Parameters:
worker - the worker that will be aborted
Throws:
JadortServiceException


Copyright © 2009 OW2 Consortium. All Rights Reserved.