Interface IWatcher

All Known Implementing Classes:
AgentWatcher, GenericWatcher, NewClassInstanceWatcher

public interface IWatcher
Interface to patterns that may trigger events.

A class which implements IWatcher is expected to represent an "event trigger pattern" for the ontology. A watcher has a event type and a watch pattern. See IWatcher.EventType for details regarding how the pattern should look like according to the event type.

When the event is triggered, its #notifySubscriber(OroEvent) method is called and expected to warn the event subscribers that the event they were watching occurred.

The way the trigger is actually fired depends on the triggering mode, as returned by getTriggeringType(). Supported trigger mode are defined in IWatcher.TriggeringType.

See Also:
  • Method Details

    • getWatchPattern

      List<String> getWatchPattern()
    • getPatternType

      IWatcher.EventType getPatternType()
    • getTriggeringType

      IWatcher.TriggeringType getTriggeringType()
    • notifySubscribers

      void notifySubscribers(OroEvent e)
    • addSubscriber

      void addSubscriber(IEventConsumer e)
    • getId

      UUID getId()
      Returns a unique (at least for this instance of the server) identifier for the current event watcher.
      Returns:
      A unique ID associated to this event watcher.
    • equals

      boolean equals(IWatcher gw)