Class JoinJob

All Implemented Interfaces:
Serializable, Runnable, ArooaContextAware, ArooaSessionAware, Forceable, PropertyChangeNotifier, Iconic, LogEnabled, Resettable, Stateful, Stoppable, Structural

public class JoinJob extends StructuralJob<Runnable>
Author:
Rob Gordon
See Also:

Description

Waits for a COMPLETE state from it's child job before allowing the thread of execution to continue.

Example

An join that waits for two triggers. In this example another trigger to run the last job might be a better solution because it wouldn't hog a thread - but there are situations when join is just simpler.
<oddjob>

    <job>

        <sequential>

            <jobs>

                <folder>

                    <jobs>

                        <state:flag id="apples" xmlns:state="http://rgordon.co.uk/oddjob/state"/>

                        <state:flag id="oranges" xmlns:state="http://rgordon.co.uk/oddjob/state"/>

                    </jobs>

                </folder>

                <state:join id="our-join" xmlns:state="http://rgordon.co.uk/oddjob/state">

                    <job>

                        <sequential>

                            <jobs>

                                <scheduling:trigger on="${apples}" xmlns:scheduling="http://rgordon.co.uk/oddjob/scheduling">

                                    <job>

                                        <echo>Apples</echo>

                                    </job>

                                </scheduling:trigger>

                                <scheduling:trigger on="${oranges}" xmlns:scheduling="http://rgordon.co.uk/oddjob/scheduling">

                                    <job>

                                        <echo>Oranges</echo>

                                    </job>

                                </scheduling:trigger>

                            </jobs>

                        </sequential>

                    </job>

                </state:join>

                <echo id="last-job">And that's that!</echo>

            </jobs>

        </sequential>

    </job>

</oddjob>
  • Constructor Details

    • JoinJob

      public JoinJob()
  • Method Details