Class EchoJob

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

public class EchoJob extends Object implements Runnable, Serializable
Author:
rob
See Also:

Description

Echo text to the console.

Example

Hello World.

<oddjob>

    <job>

        <echo name="Greeting Job">Hello World</echo>

    </job>

</oddjob>
Hello World Twice.

<oddjob>

    <job>

        <sequential>

            <jobs>

                <echo id="first">Hello World Twice!</echo>

                <echo>${first.text}</echo>

            </jobs>

        </sequential>

    </job>

</oddjob>
Echo a file list.

<oddjob id="this">

    <job>

        <echo>

            <lines>

                <files files="${this.args[0]}/test/io/reference/*.txt"/>

            </lines>

        </echo>

    </job>

</oddjob>
  • Constructor Details

    • EchoJob

      public EchoJob()
  • Method Details

    • 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:
      text - 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