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 inIWatcher.TriggeringType
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IWatcher.EventType
Constants that defines the type of event the event module can handle.static class
IWatcher.TriggeringType
Constants that defines the way an event is triggered.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addSubscriber(IEventConsumer e)
boolean
equals(IWatcher gw)
java.util.UUID
getId()
Returns a unique (at least for this instance of the server) identifier for the current event watcher.IWatcher.EventType
getPatternType()
IWatcher.TriggeringType
getTriggeringType()
java.util.List<java.lang.String>
getWatchPattern()
void
notifySubscribers(OroEvent e)
-
-
-
Method Detail
-
getWatchPattern
java.util.List<java.lang.String> getWatchPattern()
-
getPatternType
IWatcher.EventType getPatternType()
-
getTriggeringType
IWatcher.TriggeringType getTriggeringType()
-
notifySubscribers
void notifySubscribers(OroEvent e)
-
addSubscriber
void addSubscriber(IEventConsumer e)
-
getId
java.util.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)
-
-