net.officefloor.plugin.section.clazz
Class SectionClassWorkSource.SectionTaskFactory

java.lang.Object
  extended by net.officefloor.plugin.section.clazz.SectionClassWorkSource.SectionTaskFactory
All Implemented Interfaces:
TaskFactory<ClassWork,Indexed,Indexed>, Task<ClassWork,Indexed,Indexed>
Enclosing class:
SectionClassWorkSource

public static class SectionClassWorkSource.SectionTaskFactory
extends Object
implements TaskFactory<ClassWork,Indexed,Indexed>, Task<ClassWork,Indexed,Indexed>

TaskFactory for overriding ClassWorkSource behaviour.


Constructor Summary
SectionClassWorkSource.SectionTaskFactory(Method method, boolean isStatic, ParameterFactory[] parameters)
          Initiate.
 
Method Summary
 Task<ClassWork,Indexed,Indexed> createTask(ClassWork work)
          Creates the Task.
 Object doTask(TaskContext<ClassWork,Indexed,Indexed> context)
          Does the task.
 Method getMethod()
          Obtains the Method.
 ParameterFactory[] getParameterFactories()
          Obtains the ParameterFactory instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SectionClassWorkSource.SectionTaskFactory

public SectionClassWorkSource.SectionTaskFactory(Method method,
                                                 boolean isStatic,
                                                 ParameterFactory[] parameters)
Initiate.

Parameters:
method - Method for the Task.
isStatic - Indicates if the Method is static.
parameters - ParameterFactory instances for the parameters of the Method.
Method Detail

getMethod

public Method getMethod()
Obtains the Method.

Returns:
Method.

getParameterFactories

public ParameterFactory[] getParameterFactories()
Obtains the ParameterFactory instances.

Returns:
ParameterFactory instances.

createTask

public Task<ClassWork,Indexed,Indexed> createTask(ClassWork work)
Description copied from interface: TaskFactory
Creates the Task.

Specified by:
createTask in interface TaskFactory<ClassWork,Indexed,Indexed>
Parameters:
work - Work for the Task.
Returns:
Task to be done for the Work.

doTask

public Object doTask(TaskContext<ClassWork,Indexed,Indexed> context)
              throws Throwable
Description copied from interface: Task
Does the task.

Specified by:
doTask in interface Task<ClassWork,Indexed,Indexed>
Parameters:
context - TaskContext for the Task.
Returns:
Parameter for the next Task. This allows stringing Task instances together into a JobSequence.
Throws:
Throwable - Indicating failure of the Task.


Copyright © 2005-2013. All Rights Reserved.