eu.unicore.hila.grid
Interface Task

All Superinterfaces:
eu.unicore.hila.Resource
All Known Subinterfaces:
Job, SimpleTransfer, ThirdPartyTransfer

public interface Task
extends eu.unicore.hila.Resource

A generic Task interfact, not necessarily representing a Job.

Author:
bjoernh 09.07.2009 10:59:59

Method Summary
 void abort()
          Abort this task.
 TaskStatus block()
          Block on this Task until it reaches a final state ( TaskStatus.SUCCESSFUL, TaskStatus.ABORTED, TaskStatus.FAILED).
 TaskStatus block(long millis)
          Block for at most millis ms until this Task reaches a final state.
 eu.unicore.hila.exceptions.HiLAException getError()
          The reason for the failure of the task can be retrieved here.
 History getHistory()
           
 String getId()
          The ID of this Task.
 void registerStatusChangeListener(StatusChangeListener listener)
          Register a StatusChangeListener to be notified of any changes in this Task's TaskStatus.
 void removeStatusChangeListener(StatusChangeListener listener)
          Remove a registered StatusChangeListener from this Task.
 TaskStatus status()
          The current TaskStatus of this Task.
 
Methods inherited from interface eu.unicore.hila.Resource
getChild, getChildren, getLocation, getMetadata, getName, getParent, ok
 

Method Detail

abort

void abort()
           throws eu.unicore.hila.exceptions.HiLAException
Abort this task.

Throws:
eu.unicore.hila.exceptions.HiLAException

block

TaskStatus block()
                 throws eu.unicore.hila.exceptions.HiLAException
Block on this Task until it reaches a final state ( TaskStatus.SUCCESSFUL, TaskStatus.ABORTED, TaskStatus.FAILED).

Returns:
The final TaskStatus
Throws:
eu.unicore.hila.exceptions.HiLAException
See Also:
#block(long)}

block

TaskStatus block(long millis)
                 throws eu.unicore.hila.exceptions.HiLAException
Block for at most millis ms until this Task reaches a final state.

Parameters:
millis -
Returns:
Throws:
eu.unicore.hila.exceptions.HiLAException
See Also:
#block()}

getError

eu.unicore.hila.exceptions.HiLAException getError()
                                                  throws eu.unicore.hila.exceptions.HiLAException
The reason for the failure of the task can be retrieved here.

Returns:
Throws:
eu.unicore.hila.exceptions.HiLAException

getHistory

History getHistory()
                   throws eu.unicore.hila.exceptions.HiLAException
Returns:
Throws:
eu.unicore.hila.exceptions.HiLAException

getId

String getId()
             throws eu.unicore.hila.exceptions.HiLAException
The ID of this Task. Very often, this will be identical to the Task's name.

Returns:
Throws:
eu.unicore.hila.exceptions.HiLAException

registerStatusChangeListener

void registerStatusChangeListener(StatusChangeListener listener)
                                  throws eu.unicore.hila.exceptions.HiLAException
Register a StatusChangeListener to be notified of any changes in this Task's TaskStatus.

Parameters:
listener -
Throws:
eu.unicore.hila.exceptions.HiLAException

removeStatusChangeListener

void removeStatusChangeListener(StatusChangeListener listener)
                                throws eu.unicore.hila.exceptions.HiLAException
Remove a registered StatusChangeListener from this Task.

Parameters:
listener -
Throws:
eu.unicore.hila.exceptions.HiLAException

status

TaskStatus status()
                  throws eu.unicore.hila.exceptions.HiLAException
The current TaskStatus of this Task.

Returns:
Throws:
eu.unicore.hila.exceptions.HiLAException


Copyright © 2010-2013 UNICORE. All Rights Reserved.