|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.apama.jmon.EventExpression
public class EventExpression
Instances of this class are declared to represent an "Event Expression" as defined in the Apama reference manual "The JMON Application Framework".
An example expression is:
NewsItem("ACME", *):news -> StockTick("ACME", *)In this example the matching NewsItem event is tagged as 'news'. This means that the NewsItem event that caused the match will be available to the
MatchListener
from the fired MatchEvent
by calling evt.getMatchingEvent("news");
When the expression is matched, all registered listeners will be informed.
An object implementing the MatchListener
interface may be registered by calling
the addMatchListener
method, and deregistered by calling the
removeMatchListener
method.
Constructor Summary | |
---|---|
EventExpression(java.lang.String eventExpressionString)
Constructor to create a new instance with the given immutable expression string. |
Method Summary | |
---|---|
void |
addMatchListener(MatchListener listenerToAdd)
Add a listener to be notified when the match occurs for this event expression. |
java.lang.String |
getEventExpressionString()
Get the String value of the EventExpression. |
void |
removeAllMatchListeners()
Remove all previously registered match listeners. |
void |
removeMatchListener(MatchListener listenerToRemove)
Remove a match listener that was previously registered. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventExpression(java.lang.String eventExpressionString)
eventExpressionString
- The event expression to be used.Method Detail |
---|
public java.lang.String getEventExpressionString()
public java.lang.String toString()
toString
in class java.lang.Object
getEventExpressionString()
public void addMatchListener(MatchListener listenerToAdd)
listenerToAdd
- an object implementing the MatchListener interface to be notified when matches occur for this expression.public void removeMatchListener(MatchListener listenerToRemove)
listenerToRemove
- an object implementing the MatchListener interface to be removed from the notification list for this expression.public void removeAllMatchListeners()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |