com.googlecode.lightest.core
Interface ITask

All Superinterfaces:
ITaskProvider
All Known Subinterfaces:
IBreakpointTask
All Known Implementing Classes:
LightestTask

public interface ITask
extends ITaskProvider

Represents a domain-specific task to be performed in a test. ITask's are typically owned by IDomainSpecificApi's.


Method Summary
 void configure(TaskNode config, ITaskResult parentResult)
          Configures the task
 String getDescription()
          Returns a user supplied description of the task instance, its purpose, etc.
 String getName()
          Returns the name of the task.
 Map getParams()
          Returns a new Map of names to values of the paremeters to the task.
 String getShortName()
          Returns the abbreviated name of the task.
 Object getValue()
          Returns the value set as the node value in the configuration.
 ITaskResult perform()
          Performs the task in an environment, and returns the result.
 void setDispatcher(ITaskDispatcher dispatcher)
          Sets the dispatcher to be used to perform the task.
 
Methods inherited from interface com.googlecode.lightest.core.ITaskProvider
getBuilder
 

Method Detail

configure

void configure(TaskNode config,
               ITaskResult parentResult)
Configures the task

Parameters:
config - the configuration for this task. The Node tree may also contain configuration information for any parent and child tasks. If it does, this task object may inspect, but should not mutate, any Nodes it does not directly relate to.
parentResult - the result of performing the parent task. May be null if this task has no parent.

setDispatcher

void setDispatcher(ITaskDispatcher dispatcher)
Sets the dispatcher to be used to perform the task.

Parameters:
dispatcher -

getName

String getName()
Returns the name of the task.


getShortName

String getShortName()
Returns the abbreviated name of the task.


getDescription

String getDescription()
Returns a user supplied description of the task instance, its purpose, etc.


getParams

Map getParams()
Returns a new Map of names to values of the paremeters to the task. This identifies how the task can be reproduced. Names are String's, values are Object's.


getValue

Object getValue()
Returns the value set as the node value in the configuration. This, like getParams(), is information about how the task was configured.


perform

ITaskResult perform()
Performs the task in an environment, and returns the result. Tasks may choose to use or ignore the results of their parent tasks.



Copyright © 2009. All Rights Reserved.