org.globus.cog.gridface.interfaces
Interface GridCommandManager

All Superinterfaces:
AccessDesktop
All Known Implementing Classes:
GridCommandManagerImpl

public interface GridCommandManager
extends AccessDesktop

GridCommandManager is the backend component of gridface guis to access cog-abstraction module.


Method Summary
 void addStatusListener(StatusListener listener)
          add listener
 boolean cancel(Identity id)
          Cancel the command that has the given id
 boolean cancel(String id)
          Cancel the command that has the given id
 Identity execute(GridCommand command, boolean inBackground)
          Execute the grid command.
 Identity execute(GridCommand command, boolean inBackground, Enumeration idList)
          Execute the grid command.
 Enumeration getActiveCommands()
          Get a list of all commands with current status as ACTIVE
 Enumeration getAllCommands()
          Get a list of all commands submitted to GCM
 Enumeration getCanceledCommands()
          Get a list of all commands with current status as CANCELED
 Enumeration getCompletedCommands()
          Get a list of all commands with current status as COMPLETED
 Enumeration getFailedCommands()
          Get a list of all commands with current status as FAILED
 Scheduler getScheduler()
          Get the scheduler currently used
 Status getStatus(Identity id)
          Get the status of the given command
 Status getStatus(String id)
          Get the status of the given command
 Enumeration getSubmittedCommands()
          Get a list of all commands with current status as SUBMITTED
 Enumeration getSuspendedCommands()
          Get a list of all commands with current status as SUSPENDED
 Enumeration getUnsubmittedCommands()
          Get a list of all commands with current status as UNSUBMITTED
 void removeStatusListener(StatusListener listener)
          remove listener
 boolean resume(Identity id)
          Resume the command that has the given id,
 void setPriorities(long id, int priority)
          Set priority for executing the command with given id
 void setScheduler(Scheduler scheduler)
          Set a scheduler for scheduling events submitted to GCM
 boolean suspend(Identity id)
          Syspend the command that has the given id,
 void toXML(String fileName)
          Save the state of GCM into an XML file
 
Methods inherited from interface org.globus.cog.gridface.impl.desktop.interfaces.AccessDesktop
getDesktop, setDesktop
 

Method Detail

execute

public Identity execute(GridCommand command,
                        boolean inBackground)
                 throws Exception
Execute the grid command. If inBackground is true, then command is executed by a separate thread

Throws:
Exception

execute

public Identity execute(GridCommand command,
                        boolean inBackground,
                        Enumeration idList)
                 throws Exception
Execute the grid command. If there are dependencies, add dependencies.

Throws:
Exception

getStatus

public Status getStatus(String id)
Get the status of the given command


getStatus

public Status getStatus(Identity id)
Get the status of the given command


cancel

public boolean cancel(String id)
               throws Exception
Cancel the command that has the given id

Throws:
Exception

cancel

public boolean cancel(Identity id)
               throws Exception
Cancel the command that has the given id

Throws:
Exception

suspend

public boolean suspend(Identity id)
                throws Exception
Syspend the command that has the given id,

Throws:
Exception

resume

public boolean resume(Identity id)
               throws Exception
Resume the command that has the given id,

Throws:
Exception

getAllCommands

public Enumeration getAllCommands()
Get a list of all commands submitted to GCM


getUnsubmittedCommands

public Enumeration getUnsubmittedCommands()
Get a list of all commands with current status as UNSUBMITTED


getSubmittedCommands

public Enumeration getSubmittedCommands()
Get a list of all commands with current status as SUBMITTED


getActiveCommands

public Enumeration getActiveCommands()
Get a list of all commands with current status as ACTIVE


getFailedCommands

public Enumeration getFailedCommands()
Get a list of all commands with current status as FAILED


getCompletedCommands

public Enumeration getCompletedCommands()
Get a list of all commands with current status as COMPLETED


getSuspendedCommands

public Enumeration getSuspendedCommands()
Get a list of all commands with current status as SUSPENDED


getCanceledCommands

public Enumeration getCanceledCommands()
Get a list of all commands with current status as CANCELED


setPriorities

public void setPriorities(long id,
                          int priority)
                   throws Exception
Set priority for executing the command with given id

Throws:
Exception

setScheduler

public void setScheduler(Scheduler scheduler)
                  throws Exception
Set a scheduler for scheduling events submitted to GCM

Throws:
Exception

getScheduler

public Scheduler getScheduler()
                       throws Exception
Get the scheduler currently used

Throws:
Exception

toXML

public void toXML(String fileName)
           throws Exception
Save the state of GCM into an XML file

Throws:
Exception

addStatusListener

public void addStatusListener(StatusListener listener)
add listener


removeStatusListener

public void removeStatusListener(StatusListener listener)
remove listener