org.oddjob.io
Class TeeType

java.lang.Object
  extended by org.oddjob.io.TeeType
All Implemented Interfaces:
ArooaValue, ValueFactory<OutputStream>

public class TeeType
extends Object
implements ValueFactory<OutputStream>

Description

Split output to multiple other outputs.

Example

Copy a buffer to stdout and to a file.
 <copy>
  <input>
   <buffer>Duplicate This!</buffer>
  </input>
  <output>
   <tee>
    <outputs>
     <stdout/>
     <file file='something.txt'/>
    </outputs>
   </tee>
  </output>
 </copy>
 

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.oddjob.arooa.types.ValueFactory
ValueFactory.Conversions
 
Constructor Summary
TeeType()
           
 
Method Summary
 void setOutputs(int index, OutputStream output)
           
 OutputStream toValue()
          Provide an instance of the type this is a factory for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeeType

public TeeType()
Method Detail

setOutputs

public void setOutputs(int index,
                       OutputStream output)

Property: outputs

Description: List of outputs to split to.

Required: No, output will be thrown away if missing.


toValue

public OutputStream toValue()
                     throws ArooaConversionException
Description copied from interface: ValueFactory
Provide an instance of the type this is a factory for.

Specified by:
toValue in interface ValueFactory<OutputStream>
Returns:
An instance of the type. May be null.
Throws:
ArooaConversionException - If unable to provide a value.