|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.abstraction.impl.file.TaskHandlerImpl
The base class for task handlers in all file providers
| Field Summary |
| Fields inherited from interface org.globus.cog.abstraction.interfaces.TaskHandler |
EXECUTION, FILE_OPERATION, FILE_TRANSFER, GENERIC |
| Constructor Summary | |
TaskHandlerImpl()
|
|
| Method Summary | |
void |
addValidCommands()
Add a list of valid commands to a vector |
void |
cancel(Task task)
cancel a task |
protected Object |
execute(FileResource fileResource,
FileOperationSpecification spec)
execute the command on the file resource. |
Collection |
getActiveTasks()
return a collection of active tasks |
Collection |
getAllTasks()
return a collection of all tasks submitted to the handler |
Collection |
getCanceledTasks()
return a collection of canceled tasks |
Collection |
getCompletedTasks()
return a collection of completed tasks |
Collection |
getFailedTasks()
return a collection of failed tasks |
protected FileResource |
getResource()
|
Collection |
getResumedTasks()
return a collection of resumed tasks |
Collection |
getSuspendedTasks()
return a collection of suspended tasks |
int |
getType()
return type of task handler |
boolean |
isValidSpecification(FileOperationSpecification spec)
is the specification valid |
void |
remove(Task task)
remove a task completely |
void |
resume(Task task)
resume a task |
void |
setType(int type)
set type of task handler |
void |
statusChanged(StatusEvent event)
listen to the status changes of the task |
void |
submit(Task task)
submit the task for execution. |
void |
submit(Task task,
FileResource fileResource)
submit task to the appropriate file resource to carry out the operation. |
void |
suspend(Task task)
Suspend a task |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TaskHandlerImpl()
| Method Detail |
public void setType(int type)
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()
getType in interface TaskHandler
public void submit(Task task)
throws IllegalSpecException,
InvalidSecurityContextException,
InvalidServiceContactException,
TaskSubmissionException
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 submit(Task task,
FileResource fileResource)
throws TaskSubmissionException,
IllegalSpecException,
InvalidProviderException,
ProviderMethodException,
IllegalHostException,
InvalidSecurityContextException,
DirectoryNotFoundException,
FileNotFoundException,
GeneralException
TaskSubmissionException
IllegalSpecException
InvalidProviderException
ProviderMethodException
InvalidSecurityContextException
IllegalHostException
GeneralException
FileNotFoundException
DirectoryNotFoundException
protected Object execute(FileResource fileResource,
FileOperationSpecification spec)
throws DirectoryNotFoundException,
FileNotFoundException,
GeneralException
GeneralException
DirectoryNotFoundException
GeneralException
FileNotFoundExceptionpublic boolean isValidSpecification(FileOperationSpecification spec)
public void suspend(Task task)
throws InvalidSecurityContextException,
TaskSubmissionException
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
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
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
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()
getAllTasks in interface TaskHandlerTaskobjectspublic Collection getActiveTasks()
getActiveTasks in interface TaskHandlerTaskobjectspublic Collection getFailedTasks()
getFailedTasks in interface TaskHandlerTaskobjectspublic Collection getCompletedTasks()
getCompletedTasks in interface TaskHandlerTaskobjectspublic Collection getSuspendedTasks()
getSuspendedTasks in interface TaskHandlerTaskobjectspublic Collection getResumedTasks()
getResumedTasks in interface TaskHandlerTaskobjectspublic Collection getCanceledTasks()
getCanceledTasks in interface TaskHandlerTaskobjectspublic void statusChanged(StatusEvent event)
statusChanged in interface StatusListenerpublic void addValidCommands()
protected FileResource getResource()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||