|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.tivoli.zce.engine.Event
Internal representation of an event. An Event in ZCE is a hash table of label name, label value pairs, where values for each is a String. Event contains no type information on the labels, this is provided in the rule specification, and compiled into the appropriate method calls during run-time. For example, ZCE calls the appropriate translation method, e.g., getInt("numberOfHosts") to retrive the value of an integer label named "numberOfHosts".
Field Summary | |
int |
counter
Field used for the persistence mechanism. |
boolean |
currentEvent
This flag is set to true when this event is the current event processed by ZCE. |
boolean |
isCorrelated
This flag is set to true if this event was already correlated (triggered) by one of the processed rules. |
boolean |
isPersisted
This flag is set to true if this event was already registered in the persistence storage. |
IRule |
lastRule
The lastRule attribute is set to the last Rule (as IRule) that triggered this event This is used for the correct continuation of the path of this event. |
java.lang.Object |
original
field used optionaly to keep a reference to the original event: |
long |
timestamp
This attribute is calculated during the creation of the Event using the currentTimeMillis() method. |
java.lang.String |
type
This attribute represents the type of the event and is used to find the applicable set of rules to process using this event. |
Constructor Summary | |
Event()
Create empty Event to be filled in with putItem() or copyInto() |
|
Event(Event event)
Create a new Event by cloning items from a given Event |
|
Event(java.util.Vector items)
Create a new Event with a given Vector of items in it. |
Method Summary | |
protected void |
copyInto(java.util.Vector items)
Method used to add a @see java.util.Vector of EventItem |
java.util.Enumeration |
getAllLabels()
Returns the complete list of labels included in this event |
java.lang.Boolean |
getBoolean(java.lang.String label)
Return the Boolean value of attribute specified by label |
java.lang.Float |
getFloat(java.lang.String label)
Return the Float value of attribute specified by label |
java.lang.Long |
getInt(java.lang.String label)
Return the Integer value of attribute specified by label |
com.tivoli.zce.predicates.zce.IntSet |
getIntSet(java.lang.String label)
Return the IntSet value of attribute specified by label |
com.tivoli.zce.predicates.zce.IPAddress |
getIPAddress(java.lang.String label)
Return generic set value of attribute specified by label |
com.tivoli.zce.predicates.zce.IPAddressSet |
getIPAddressSet(java.lang.String label)
Return the IPAddressSet value of attribute specified by label |
java.lang.Object |
getItem(java.lang.String key)
Extract an "item" of class Object from the list of items |
java.lang.String |
getString(java.lang.String label)
Return the String value of attribute specified by label |
com.tivoli.zce.engine.StringSet |
getStringSet(java.lang.String label)
Return the StringSet value of attribute specified by label |
java.util.Vector |
getTypes()
Return class hierarchy. |
boolean |
hasAttribute(java.lang.String label)
Test if event has the attribute named specified by label |
protected void |
putItem(com.tivoli.zce.engine.EventItem item)
Method for inheriting classes to add item to list of (cached) items at runtime. |
void |
putItem(java.lang.String key,
java.lang.Object value)
Add an "item" of class Object into the list of items |
void |
setOriginal(java.lang.Object orig)
Method to set the original field. |
java.lang.String |
toString()
Convert event to String by concatenating all items |
void |
updateItem(java.lang.String label,
long value)
Update the value of an EXISTING item e.g. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public long timestamp
java.lang.System#currentTimeMillis()
public java.lang.String type
public IRule lastRule
public int counter
public boolean isCorrelated
public boolean isPersisted
public boolean currentEvent
public java.lang.Object original
Event
Constructor Detail |
public Event()
public Event(java.util.Vector items)
items
- The array of EventItemspublic Event(Event event)
event
- Event to clone items fromMethod Detail |
public void setOriginal(java.lang.Object orig)
orig
- Value to setpublic boolean hasAttribute(java.lang.String label)
label
- Label to check forpublic void putItem(java.lang.String key, java.lang.Object value)
key
- the field namevalue
- the field valuepublic java.lang.Object getItem(java.lang.String key)
key
- the field nameprotected void putItem(com.tivoli.zce.engine.EventItem item)
item
- Item to add to list of (cached) itemsprotected void copyInto(java.util.Vector items)
items
- public java.lang.String getString(java.lang.String label)
label
- Label to get String value forpublic java.lang.Long getInt(java.lang.String label)
label
- Label to get integer value forpublic java.lang.Float getFloat(java.lang.String label)
label
- Label to get float value forpublic com.tivoli.zce.engine.StringSet getStringSet(java.lang.String label)
label
- Label to get string set value forpublic com.tivoli.zce.predicates.zce.IntSet getIntSet(java.lang.String label)
label
- Label to get integer set value forpublic com.tivoli.zce.predicates.zce.IPAddressSet getIPAddressSet(java.lang.String label)
label
- Label to get IPAddress set value forpublic java.lang.Boolean getBoolean(java.lang.String label)
label
- Label to get boolean value forpublic com.tivoli.zce.predicates.zce.IPAddress getIPAddress(java.lang.String label)
label
- Label to get generic set value forpublic final void updateItem(java.lang.String label, long value)
label
- Label to be updatedvalue
- New value for given labelpublic java.lang.String toString()
toString
in class java.lang.Object
public java.util.Enumeration getAllLabels()
public final java.util.Vector getTypes()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |