Event Expression | Description |
StockTick(*,*) | The event listener that uses this event expression is interested in all StockTick events regardless of the event's field values. |
NewsItem("ACME",*) | The event listener that uses this event expression is interested in NewsItem events that have a value of ACME in their first field. Any value can be in the second field. |
ChainedResponse(reqId="req1") | The event listener that uses this event expression is interested in ChainedResponse events whose reqId field has a value of req1. If a ChainedResponse event has any other fields, their values are irrelevant. |
any() | The event listener that uses this event expression is interested in all events, regardless of their type. |
Category | Operator | Operation |
Followed by | -> | The event listener detects a match when it finds an event that matches the event template specified before the followed-by operator and later finds an event that matches the event template that comes after the followed-by operator. See also
Defining event listeners for patterns of events. |
Repeat matching | all | The event listener detects a match for each event that matches the specified event template. The event listener does not terminate after the first match. See also
Listening for all events of a particular type. Important: When using the all operator with operators that combine multiple event templates (such as or, xor, ->), it is likely that you want the all to apply to the whole pattern, rather than the individual event templates. To do this, you need to use brackets around the whole event expression, for example, on all (A() or B()). Using on all A() or B() or on all A() or all B() has different and potentially unwanted behavior, particularly if you use the same event type in more than one event template and the templates are not mutually exclusive. |
Logical operators | and | Logical intersection. The event listener detects a match after it finds events that match the event templates on both sides of the and operator. The order in which the listener detects the matching events does not matter. See also
Specifying the 'and' operator in event expressions. |
not | Logical negation. The event listener detects a match only if an event that matches the event template that follows the not operator has not occurred. See also
Specifying the 'not' operator in event expressions. | |
or | Logical union. The event listener detects a match as soon as it finds an event that matches one of the event templates on either side of the or operator. See also
Specifying the 'or' or 'xor' operator in event expressions. | |
xor | Logical exclusive or. The event listener detects a match if it finds an event that matches exactly one of the event templates on either side of the xor operator. For example, consider this event: A(1,1). This event does not trigger the following listener because it matches the event templates on both sides of the xor operator: on A(1,*) xor A(*,1). See also
Specifying the 'or' or 'xor' operator in event expressions. | |
Temporal operators | at | The event listener triggers at specific times or repeatedly at a specified interval. See also
Triggering event listeners at specific times. |
wait | Limits the amount of time that an event listener can detect a match. See also
Waiting within an event listener. | |
within | The event listener can find a match only within the specified timeframe. See also
Listening for event patterns within a set time. |