|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.apama.jmon.Event
public abstract class Event
This is the basic definition of an Event that must be subclassed for use with the Apama Engine (or indeed any Correlators that make up an Engine).
Method Summary | |
---|---|
java.lang.Object |
clone()
|
void |
emit()
Emit this Event from the Engine on the default channel. |
void |
emit(java.lang.String channel)
Emit this Event from the Engine on a specific channel. |
void |
enqueue()
Enqueue this Event internally within the Correlator. |
void |
enqueueTo(Context ctx)
Enqueue this event to a correlator context. |
void |
enqueueTo(Context[] ctxArray)
Enqueue this event to an array of correlator contexts. |
void |
enqueueTo(java.util.List<Context> ctxList)
Enqueue this event to a list of correlator contexts. |
boolean |
equals(java.lang.Object other)
Override Object.equals() to check equality based upon the field values of the instance. |
int[] |
getFieldAttributes(java.lang.String fieldName)
Deprecated. This method has been deprecated and may be removed in a future release - Please use the new JMon annotations instead. |
java.lang.Class[] |
getMapFieldTypes(java.lang.String fieldName)
This method should be overridden in any subclass that has fields of type Map . |
java.lang.String |
getName()
Get the Correlator name for this Event subclass instance. |
static java.lang.String |
getName(java.lang.Class eventSubClass)
Get the Correlator name for the specified Event subclass. |
double |
getTime()
Get the time that the event arrived at the correlator. |
int |
hashCode()
Override Object.hashCode() to provide a hash code that is based upon the field values of the instance. |
boolean |
isExternal()
Determine if this is an "external" event - if it originated outside the correlator. |
void |
route()
Route this Event internally within the Correlator. |
java.lang.String |
toString()
Override Object.toString() to provide output compatible with the Apama standard representation of Event data types. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public void emit()
public void emit(java.lang.String channel)
channel
- the Channel on which the Event is to be emitted from the Engine.public void route()
public void enqueue()
public void enqueueTo(Context ctx)
ctx
- the destination context where the event will be enqueued to.public void enqueueTo(Context[] ctxArray)
ctxArray
- the array of destination contexts where the event will be enqueued to.public void enqueueTo(java.util.List<Context> ctxList)
ctxList
- the list of destination contexts where the event will be enqueued to.@Deprecated public int[] getFieldAttributes(java.lang.String fieldName)
public static int[] getFieldAttributes(String fieldName) { int[] attributes = null; if (fieldName.equals("payload")) attributes = new int[]{EventFieldAttributes.WILDCARD}; return attributes; }
fieldName
- the name of the member field whose attributes are to be checked.
Wildcard
public java.lang.Class[] getMapFieldTypes(java.lang.String fieldName)
Map
.
This method is required because the key and value are typed in MonitorScript dictionary container type. In MonitorScript, the key and value types are declared in syntax resembling generic or template programming. However, the standard Java language and container libraries do not yet support generics and so this light-weight mechanism has been chosen in the interim.
e.g. If a subclass has a member field with the name "myDictionary" and
that field should be treated as the correlator type
"dictionary < integer, string >", then the field should be declared
as a java.util.Map, and the getMapFieldTypes method should be overriden
as shown below:
public Class[] getMapFieldTypes(String fieldName) { Class[] types = null; if (fieldName.equals("myDictionary")) types = new Class[]{Long.TYPE, String.class}; return types; }
fieldName
- the name of the member field whose attributes are to be checked.
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- The object to be compared for equality.
public static java.lang.String getName(java.lang.Class eventSubClass)
eventSubClass
- This is the class for the event type for which the name is required.
public java.lang.String getName()
public double getTime()
public boolean isExternal()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |