weka.knowledgeflow

## Class StepInjectorFlowRunner

- java.lang.Object
- - weka.knowledgeflow.FlowRunner
  - - weka.knowledgeflow.StepInjectorFlowRunner

- All Implemented Interfaces:
    FlowExecutor

      public class StepInjectorFlowRunner
      extends FlowRunner

  A flow runner that runs a flow by injecting data into a target step
  Version:
    $Revision: $
  Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class weka.knowledgeflow.FlowRunner

      `FlowRunner.SimpleLogger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StepInjectorFlowRunner()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Step` | `findStep(java.lang.String stepName, java.lang.Class stepClass)` Find a step in the flow
    `void` | `injectStreaming(Data toInject, Step target, boolean lastData)` Inject streaming data into the target step in the flow
    `void` | `injectWithExecutionFinishedCallback(Data toInject, ExecutionFinishedCallback callback, Step target)` Inject data into the flow
    `void` | `reset()` Rest the runner

    - ### Methods inherited from class weka.knowledgeflow.FlowRunner

      `addExecutionFinishedCallback, flowBusy, getExecutionEnvironment, getFlow, getLaunchStartPointsSequentially, getLogger, getLoggingLevel, getSettings, main, removeExecutionFinishedCallback, run, runParallel, runSequentially, setExecutionEnvironment, setFlow, setLaunchStartPointsSequentially, setLogger, setLoggingLevel, setSettings, stopProcessing, waitUntilFinished, wasStopped`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StepInjectorFlowRunner

          public StepInjectorFlowRunner()

  - ### Method Detail

    - #### reset

          public void reset()

      Rest the runner

    - #### injectWithExecutionFinishedCallback

          public void injectWithExecutionFinishedCallback(Data toInject,
                                                          ExecutionFinishedCallback callback,
                                                          Step target)
                                                   throws WekaException

      Inject data into the flow
      Parameters:
        `toInject` - the data to inject
        `callback` - a `ExecutionFinishedCallback` to notify when execution completes
        `target` - the target `Step` to inject to
      Throws:
        `WekaException` - if a problem occurs

    - #### findStep

          public Step findStep(java.lang.String stepName,
                               java.lang.Class stepClass)
                        throws WekaException

      Find a step in the flow
      Parameters:
        `stepName` - the name of the Step to find
        `stepClass` - the class of the step to find
      Returns:
        the named step
      Throws:
        `WekaException` - if the named step is not in the flow or the found step is not of the supplied class

    - #### injectStreaming

          public void injectStreaming(Data toInject,
                                      Step target,
                                      boolean lastData)
                               throws WekaException

      Inject streaming data into the target step in the flow
      Parameters:
        `toInject` - a streaming `Data` object to inject
        `target` - the target step to inject to
        `lastData` - true if this is the last piece of data in the stream
      Throws:
        `WekaException` - if a problem occurs