org.oddjob.jobs
Class EchoJob

java.lang.Object
  extended by org.oddjob.jobs.EchoJob
All Implemented Interfaces:
Serializable, Runnable

public class EchoJob
extends Object
implements Runnable, Serializable

Description

Echo text to the console.

Example

Hello World.
<oddjob>
    <job>
        <echo name="Greeting Job">Hello World</echo>
    </job>
</oddjob>

Example

Hello World Twice.
<oddjob>
    <job>
        <sequential>
            <jobs>
                <echo id="first">Hello World Twice!</echo>
                <echo>${first.text}</echo>
            </jobs>
        </sequential>
    </job>
</oddjob>

Example

Echo a file list.
<oddjob id="this">
    <job>
        <echo>
            <lines>
                <files files="${this.args[0]}/test/io/reference/*.txt"/>
            </lines>
        </echo>
    </job>
</oddjob>
See Also:
Serialized Form
Author:
rob

Constructor Summary
EchoJob()
           
 
Method Summary
 String[] getLines()
           
 String getName()
          Get the name.
 OutputStream getOutput()
           
 String getText()
          Get the text.
 void run()
           
 void setLines(String[] lines)
           
 void setName(String name)
          Set the name
 void setOutput(OutputStream output)
           
 void setText(String text)
          Set the text.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EchoJob

public EchoJob()
Method Detail

getName

public String getName()
Get the name.

Returns:
The name.

setName

public void setName(String name)
Set the name

Parameters:
name - The name.

getText

public String getText()
Get the text.

Returns:
The text.

setText

public void setText(String text)
Set the text.

Parameters:
The - text.

getLines

public String[] getLines()

setLines

public void setLines(String[] lines)

getOutput

public OutputStream getOutput()

setOutput

public void setOutput(OutputStream output)

run

public void run()
Specified by:
run in interface Runnable

toString

public String toString()
Overrides:
toString in class Object