org.globus.cog.abstraction.interfaces
Interface DelegatedTaskHandler

All Known Implementing Classes:
DelegatedFileTransferHandler

public interface DelegatedTaskHandler

Implements the semantics to execute the given Taskin a seperate thread, thereby not blocking the calls to the TaskHandler. The DelegatedTaskHandler can handle only one task at a time.


Method Summary
 void cancel()
          Cancels the execution of a task that was previously submitted by the submit(Task)method.
 void resume()
          Resumes the execution of a task that was previously suspended by the suspend()method.
 void submit(Task task)
          This method is responsible for submitting the given Task to the remote Service in compliance with the appropriate provider.
 void suspend()
          Suspends the currently active task.
 

Method Detail

submit

public void submit(Task task)
            throws IllegalSpecException,
                   InvalidSecurityContextException,
                   InvalidServiceContactException,
                   TaskSubmissionException
This method is responsible for submitting the given Task to the remote Service in compliance with the appropriate provider. It executes in a seperate thread so that it doesnt block the submission of other tasks.

Parameters:
task - the task to be executed
Throws:
IllegalSpecException - when the Specificationdoes not confirm to the type of the task and the given provider.
InvalidSecurityContextException - when the SecurityContextassociated with the task in invalid.
InvalidServiceContactException - when the ServiceContactof the remote service in invalid.
TaskSubmissionException - when a generic exception occurs prohibiting the submission of the task.

suspend

public void suspend()
             throws InvalidSecurityContextException,
                    TaskSubmissionException
Suspends the currently active task. A suspended task can be resumed using the resume()method

Throws:
InvalidSecurityContextException - when the SecurityContextassociated with the task is invalid
TaskSubmissionException - when generic errors occur

resume

public void resume()
            throws InvalidSecurityContextException,
                   TaskSubmissionException
Resumes the execution of a task that was previously suspended by the suspend()method.

Throws:
InvalidSecurityContextException - when the SecurityContextassociated with the task is invalid
TaskSubmissionException - when generic errors occur

cancel

public void cancel()
            throws InvalidSecurityContextException,
                   TaskSubmissionException
Cancels the execution of a task that was previously submitted by the submit(Task)method. Tasks once canceled cannot be resumed for execution later.

Throws:
InvalidSecurityContextException - when the SecurityContextassociated with the task is invalid
TaskSubmissionException - when generic errors occur