Inserting annotations for deployment descriptor files
In your JMon source files, you can specify the following annotations:
@Application — This annotation indicates the name of the application, as well as the author, version, company, and description of the application. Insert this annotation in any one, and only one, of your JMon source files. Each value is required. This annotation must be after any
import statements and before the class definition statement. For example:
@Application(
name = "Simple",
author = "Moray Grieve",
version = "1.0",
company = "Apama",
description = "Deployment descriptor for a simple JMon monitor",
classpath = "${sys:MY_THIRD_PARTY_DIR}/lib/foo.jar;${sys:MY_THIRD_PARTY_DIR}/lib/bar.jar"
)
@MonitorType — This annotation indicates the definition of a monitor. In each monitor class, insert this annotation immediately before the monitor class definition statement. You can specify a name and a description for the monitor. The name is the fully qualified EPL name for the monitor. If you do not specify a name, the name defaults to the fully qualified JMon class name of the class you are annotating.
@MonitorType(description = "A simple JMon monitor, used to show
functionality of a new installation.")
@EventType — This annotation indicates the definition of an event type. In each event type definition class, insert this annotation immediately before the definition statement for the event type. You can specify a name and a description for the event. The name is the fully qualified EPL name for the event. If you do not specify a name, the name defaults to the fully qualified JMon class name of the class you are annotating. For example:
@EventType(description = "Event that signals a stock trade")
@Wildcard — This annotation indicates a wildcard event field. Insert it immediately before the field definition statement. You must have specified the
@EventType annotation for the event type that defines this field. For example:
import com.apama.jmon.*
import com.apama.jmon.annotation.*
@EventType
public class EventWithWildcard extends Event {
public long indexedField;
@Wildcard
public long wildcardField;
public EventWithWildcard() {
this(0, 0);
}
public EventWithWildcard(long iField, long wField) {
this.indexedField = iField;
this.wildcardField = wField;
}