be.ac.ua.broker.input.tasks
Class Task

java.lang.Object
  extended by be.ac.ua.broker.input.tasks.Task

public class Task
extends java.lang.Object

This class represents a task.

Author:
Vermeersch Kurt

Constructor Summary
Task(TaskSpecification spec, Workload wl)
          Constructor for Task
 
Method Summary
 TaskSpecification getTaskSpecification()
           
 Workload getWorkload()
           
 boolean hasRegionAssigned()
           
 void setRegion(java.lang.String region)
          Assign the task to a certain geographical region
 void setStartDate(java.util.Date startDate)
          Set the start time of the scheduling period for the task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Task

public Task(TaskSpecification spec,
            Workload wl)
Constructor for Task

Parameters:
spec - the specification of the task
wl - the workload the task consists of
Method Detail

getWorkload

public Workload getWorkload()
Returns:
the workload the task consists of

getTaskSpecification

public TaskSpecification getTaskSpecification()
Returns:
the specification of the task

hasRegionAssigned

public boolean hasRegionAssigned()
Returns:
whether a geographical region for the task to run on has been assigned by the user

setRegion

public void setRegion(java.lang.String region)
               throws InvalidInputException
Assign the task to a certain geographical region

Parameters:
region - the geographical regions to assign the task to
Throws:
InvalidInputException - exception thrown when the provided region is not supported by the broker according to the InputVerifier

setStartDate

public void setStartDate(java.util.Date startDate)
Set the start time of the scheduling period for the task

Parameters:
startDate - the start time of the scheduling period