com.googlecode.lightest.core
Interface ITaskDispatcher

All Known Implementing Classes:
TaskDispatcher

public interface ITaskDispatcher

Responsible for actually performing tasks. Each dispatcher has a 1-1 relationship with an ITestEnvironment.


Method Summary
 ITaskResult dispatch(TaskNode taskNode, ITaskResult parentResult, ITestResult testResult)
          Dispatches the task and all nested tasks represented by the Node tree, as available in the API of the current testcase, and using the current dispatch strategy.
 LightestContext getContext()
          Returns the context object associated with this dispatcher.
 LightestTestCase getTestCase()
          Returns the testcase this dispatcher is currently assigned to, or null if it is not assigned to a testcase.
 void setEnvironment(ITestEnvironment env)
           
 void setListener(ILightestTestListener listener)
           
 void setPreferences(IPreferences prefs)
           
 void setStrategy(ITaskDispatchStrategy strategy)
           
 void setTestCase(LightestTestCase testcase)
          Assigns a testcase to this dispatcher.
 

Method Detail

setPreferences

void setPreferences(IPreferences prefs)

setEnvironment

void setEnvironment(ITestEnvironment env)

setStrategy

void setStrategy(ITaskDispatchStrategy strategy)
Parameters:
strategy -

setListener

void setListener(ILightestTestListener listener)

setTestCase

void setTestCase(LightestTestCase testcase)
Assigns a testcase to this dispatcher.

Parameters:
testcase -

getTestCase

LightestTestCase getTestCase()
Returns the testcase this dispatcher is currently assigned to, or null if it is not assigned to a testcase.


getContext

LightestContext getContext()
Returns the context object associated with this dispatcher. Environment and preference information are available via this object.


dispatch

ITaskResult dispatch(TaskNode taskNode,
                     ITaskResult parentResult,
                     ITestResult testResult)
Dispatches the task and all nested tasks represented by the Node tree, as available in the API of the current testcase, and using the current dispatch strategy. The currently attached listener will be notified of the task result. "parentResult" will be null for root tasks. Returns the result of dispatching the task.

Parameters:
taskNode -
parentResult -
testResult -


Copyright © 2009. All Rights Reserved.