|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The TaskHandler can be viewed as an adaptor that translates
the abstract definitions of a Taskinto implementation-specific
constructs understood by the backend Grid services.
For example, a GT4 TaskHandler will extract the appropriate attributes from
the Task and make the necessary calls to the remote Grid
service factory, retrieve the Grid service handle, and interact with the
newly created service instance. Symmetric translations would be done for
other Grid implementations. A handler is specific to the backed
implementation (GT2, GT3, GT4, Condor, or SSH) and is the only part of
abstractions framework that needs to be extended for supporting additional
Grid implementations.
| Field Summary | |
static int |
EXECUTION
Represents a task handler that can handle remote job submission tasks |
static int |
FILE_OPERATION
Represents a task handler that can handle file operation tasks |
static int |
FILE_TRANSFER
Represents a task handler that can handle file transfer tasks |
static int |
GENERIC
Represents a generic task handler |
| Method Summary | |
void |
cancel(Task task)
Cancels the execution of a task that was previously submitted by the submit(Task)method. |
Collection |
getActiveTasks()
Returns a collection of all the Tasks submitted to this
TaskHandler that are currently in the
Status.ACTIVEstate |
Collection |
getAllTasks()
Returns a collection of all the Tasks submitted to this
TaskHandler |
Collection |
getCanceledTasks()
Returns a collection of all the Tasks submitted to this
TaskHandler that are currently in the
Status.CANCELEDstate |
Collection |
getCompletedTasks()
Returns a collection of all the Tasks submitted to this
TaskHandler that are currently in the
Status.COMPLETEDstate |
Collection |
getFailedTasks()
Returns a collection of all the Tasks submitted to this
TaskHandler that are currently in the
Status.FAILEDstate |
Collection |
getResumedTasks()
Returns a collection of all the Tasks submitted to this
TaskHandler that are currently in the
Status.RESUMEDstate |
Collection |
getSuspendedTasks()
Returns a collection of all the Tasks submitted to this
TaskHandler that are currently in the
Status.SUSPENDEDstate |
int |
getType()
Returns the type of tasks handled by this TaskHandler |
void |
remove(Task task)
Removes the given Task from the TaskHandler
cache. |
void |
resume(Task task)
Resumes the execution of a task that was previously suspended by the suspend(Task)method. |
void |
setType(int type)
Sets the type of tasks handled by this TaskHandler |
void |
submit(Task task)
Submits the given Taskfor execuiton. |
void |
suspend(Task task)
Suspends the currently active task. |
| Field Detail |
public static final int GENERIC
public static final int EXECUTION
public static final int FILE_OPERATION
public static final int FILE_TRANSFER
| Method Detail |
public void setType(int type)
TaskHandler
type - an integer representing the type of TaskHandler.
Valid options are GENERIC,
EXECUTION,
FILE_OPERATION, and
FILE_TRANSFERpublic int getType()
TaskHandler
public void submit(Task task)
throws IllegalSpecException,
InvalidSecurityContextException,
InvalidServiceContactException,
TaskSubmissionException
Taskfor execuiton. The Task is
submitted to the TaskHandler in an asynchronous mode,
whereby the method returns immediately after submitting the task to the
remote machine. The status and output of the task can be monitored
asynchronously by the
ExecutableObject.addStatusListener(StatusListener)and
Task.addOutputListener(OutputListener)methods respectively.
task - the Task to be submitted
IllegalSpecException - when the Specificationassociated with the task is
illegal
InvalidSecurityContextException - when the SecurityContextassociated with the task is
invalid
InvalidServiceContactException - when the ServiceContactassociated with the task is
invalid
TaskSubmissionException - when generic errors occur during task submission
public void suspend(Task task)
throws InvalidSecurityContextException,
TaskSubmissionException
resume(Task)method
task - the Task to be suspended
InvalidSecurityContextException - when the SecurityContextassociated with the task is
invalid
TaskSubmissionException - when generic errors occur
public void resume(Task task)
throws InvalidSecurityContextException,
TaskSubmissionException
suspend(Task)method.
task - the Task to be resumed
InvalidSecurityContextException - when the SecurityContextassociated with the task is
invalid
TaskSubmissionException - when generic errors occur
public void cancel(Task task)
throws InvalidSecurityContextException,
TaskSubmissionException
submit(Task)method. Tasks once canceled cannot be
resumed for execution later.
task - the Task to be canceled
InvalidSecurityContextException - when the SecurityContextassociated with the task is
invalid
TaskSubmissionException - when generic errors occur
public void remove(Task task)
throws ActiveTaskException
Task from the TaskHandler
cache. After invoking this method, the TaskHandler will
lose all references to the given Task
task - the Task object to be removed from the cache
ActiveTaskException - when the task to be removed in an Status.ACTIVE
state.public Collection getAllTasks()
Tasks submitted to this
TaskHandler
Taskobjectspublic Collection getActiveTasks()
Tasks submitted to this
TaskHandler that are currently in the
Status.ACTIVEstate
Taskobjectspublic Collection getFailedTasks()
Tasks submitted to this
TaskHandler that are currently in the
Status.FAILEDstate
Taskobjectspublic Collection getCompletedTasks()
Tasks submitted to this
TaskHandler that are currently in the
Status.COMPLETEDstate
Taskobjectspublic Collection getSuspendedTasks()
Tasks submitted to this
TaskHandler that are currently in the
Status.SUSPENDEDstate
Taskobjectspublic Collection getResumedTasks()
Tasks submitted to this
TaskHandler that are currently in the
Status.RESUMEDstate
Taskobjectspublic Collection getCanceledTasks()
Tasks submitted to this
TaskHandler that are currently in the
Status.CANCELEDstate
Taskobjects
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||