|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.abstraction.impl.common.sandbox.SandboxingTaskHandler
| Field Summary |
| Fields inherited from interface org.globus.cog.abstraction.interfaces.TaskHandler |
EXECUTION, FILE_OPERATION, FILE_TRANSFER, GENERIC |
| Constructor Summary | |
SandboxingTaskHandler(Sandbox sandbox,
TaskHandler handler)
|
|
| Method Summary | |
void |
cancel(Task task)
Cancels the execution of a task that was previously submitted by the TaskHandler.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 TaskHandler.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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SandboxingTaskHandler(Sandbox sandbox,
TaskHandler handler)
| Method Detail |
public void setType(int type)
TaskHandlerTaskHandler
setType in interface TaskHandlertype - an integer representing the type of TaskHandler.
Valid options are TaskHandler.GENERIC,
TaskHandler.EXECUTION,
TaskHandler.FILE_OPERATION, and
TaskHandler.FILE_TRANSFERpublic int getType()
TaskHandlerTaskHandler
getType in interface TaskHandler
public void submit(Task task)
throws IllegalSpecException,
InvalidSecurityContextException,
InvalidServiceContactException,
TaskSubmissionException
TaskHandlerTaskfor 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.
submit in interface TaskHandlertask - the Task to be submitted
InvalidServiceContactException - when the ServiceContactassociated with the task is
invalid
TaskSubmissionException - when generic errors occur during task submission
InvalidSecurityContextException - when the SecurityContextassociated with the task is
invalid
IllegalSpecException - when the Specificationassociated with the task is
illegal
public void suspend(Task task)
throws InvalidSecurityContextException,
TaskSubmissionException
TaskHandlerTaskHandler.resume(Task)method
suspend in interface TaskHandlertask - the Task to be suspended
TaskSubmissionException - when generic errors occur
InvalidSecurityContextException - when the SecurityContextassociated with the task is
invalid
public void resume(Task task)
throws InvalidSecurityContextException,
TaskSubmissionException
TaskHandlerTaskHandler.suspend(Task)method.
resume in interface TaskHandlertask - the Task to be resumed
TaskSubmissionException - when generic errors occur
InvalidSecurityContextException - when the SecurityContextassociated with the task is
invalid
public void cancel(Task task)
throws InvalidSecurityContextException,
TaskSubmissionException
TaskHandlerTaskHandler.submit(Task)method. Tasks once canceled cannot be
resumed for execution later.
cancel in interface TaskHandlertask - the Task to be canceled
TaskSubmissionException - when generic errors occur
InvalidSecurityContextException - when the SecurityContextassociated with the task is
invalid
public void remove(Task task)
throws ActiveTaskException
TaskHandlerTask from the TaskHandler
cache. After invoking this method, the TaskHandler will
lose all references to the given Task
remove in interface TaskHandlertask - the Task object to be removed from the cache
ActiveTaskException - when the task to be removed in an Status.ACTIVE
state.public Collection getAllTasks()
TaskHandlerTasks submitted to this
TaskHandler
getAllTasks in interface TaskHandlerTaskobjectspublic Collection getActiveTasks()
TaskHandlerTasks submitted to this
TaskHandler that are currently in the
Status.ACTIVEstate
getActiveTasks in interface TaskHandlerTaskobjectspublic Collection getCanceledTasks()
TaskHandlerTasks submitted to this
TaskHandler that are currently in the
Status.CANCELEDstate
getCanceledTasks in interface TaskHandlerTaskobjectspublic Collection getCompletedTasks()
TaskHandlerTasks submitted to this
TaskHandler that are currently in the
Status.COMPLETEDstate
getCompletedTasks in interface TaskHandlerTaskobjectspublic Collection getFailedTasks()
TaskHandlerTasks submitted to this
TaskHandler that are currently in the
Status.FAILEDstate
getFailedTasks in interface TaskHandlerTaskobjectspublic Collection getResumedTasks()
TaskHandlerTasks submitted to this
TaskHandler that are currently in the
Status.RESUMEDstate
getResumedTasks in interface TaskHandlerTaskobjectspublic Collection getSuspendedTasks()
TaskHandlerTasks submitted to this
TaskHandler that are currently in the
Status.SUSPENDEDstate
getSuspendedTasks in interface TaskHandlerTaskobjects
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||