Class EventWatchComponent<T>

Type Parameters:
T - The type of the event.
All Implemented Interfaces:
Runnable, ArooaContextAware, ArooaSessionAware, Outbound<T>, PropertyChangeNotifier, Iconic, LogEnabled, Resettable, Stateful, Stoppable

public class EventWatchComponent<T> extends EventServiceBase<T>
Author:
Rob Gordon.

Description

Provides a component wrapper around a value type event source such as StateExpressionType.

Example

Running a job when two other jobs complete. Using components allows visibility on the individual event sources in a UI.
<oddjob>

    <job>

        <sequential>

            <jobs>

                <events:when id="when" xmlns:events="oddjob:events">

                    <jobs>

                        <events:list>

                            <of>

                                <events:watch name="Is Job 1 Complete">

                                    <eventSource>

                                        <state:watch xmlns:state="http://rgordon.co.uk/oddjob/state">

                                            job1 is COMPLETE

                                        </state:watch>

                                    </eventSource>

                                </events:watch>

                                <events:watch name="Is Job 2 Complete">

                                    <eventSource>

                                        <state:watch xmlns:state="http://rgordon.co.uk/oddjob/state">

                                            job2 is COMPLETE

                                        </state:watch>

                                    </eventSource>

                                </events:watch>

                            </of>

                        </events:list>

                        <echo id="job3" name="Job 3">

                            It's Done on ${when.trigger}

                        </echo>

                    </jobs>

                </events:when>

                <folder>

                    <jobs>

                        <echo id="job1" name="Job 1">

                            Hello

                        </echo>

                        <echo id="job2" name="Job 2">

                            World

                        </echo>

                    </jobs>

                </folder>

            </jobs>

        </sequential>

    </job>

</oddjob>
  • Constructor Details

    • EventWatchComponent

      public EventWatchComponent()
  • Method Details