Overview of contexts in JMon applications
The Apama JMon API provides the com.apama.jmon.Context type. This class corresponds to the EPL context type, but with a more limited set of features:
![*](chapterTOC_bullet.png)
A JMon event definition can contain a
Context type field. This lets you transfer a reference to a context to and from an Apama JMon application. You cannot pass context references between the correlator and your Apama JMon application on their own.
![*](chapterTOC_bullet.png)
You can enqueue events to
![*](chapterTOC_bullet.png)
Particular contexts:
Event.enqueueTo(Context c)![*](chapterTOC_bullet.png)
A list or array of contexts:
Event.enqueueTo(java.util.List<Context> ctxList)
Event.enqueueTo(Context[] ctxList)
![*](chapterTOC_bullet.png)
You can call
Context.getCurrent() to obtain a reference to the context that a piece of code is running in. See
Obtaining context references.
![*](chapterTOC_bullet.png)
The
Context class provides accessor methods for context properties such as context name and context ID.