[Index]

tee


Split output to multiple other outputs.

Property Summary

input An input stream that will be copied to the outputs.
outputs List of outputs to split to.

Example Summary

Example 1 Copy a buffer to stdout, the log, and to a file.
Example 2 Copy data to stdout as it is being read during a copy from one buffer to another.

Property Detail

input

Configured ByELEMENT
AccessWRITE_ONLY
RequiredOnly if this type is required to be an input stream.

An input stream that will be copied to the outputs.

outputs

Configured ByELEMENT
AccessWRITE_ONLY
RequiredNo, output will be thrown away if missing.

List of outputs to split to.


Examples

Example 1

Copy a buffer to stdout, the log, and to a file.

<oddjob>
  <job>
    <sequential>
      <jobs>
        <properties>
          <values>
            <value key="work.dir" value="work/io"/>
          </values>
        </properties>
        <copy>
          <input>
            <buffer>Duplicate This!
</buffer>
          </input>
          <output>
            <tee>
              <outputs>
                <stdout/>
                <logout/>
                <file file="${work.dir}/TeeTypeTest.txt"/>
              </outputs>
            </tee>
          </output>
        </copy>
      </jobs>
    </sequential>
  </job>
</oddjob>

Example 2

Copy data to stdout as it is being read during a copy from one buffer to another.

<oddjob>
    <job>
        <copy>
            <input>
                <tee>
                    <input>
                        <buffer>This will be copied when read.
</buffer>
                    </input>
                    <outputs>
                        <stdout/>
                    </outputs>
                </tee>
            </input>
            <output>
                <buffer/>
            </output>
        </copy>
    </job>
</oddjob>


(c) R Gordon Ltd 2005 - Present