Package com.apama.epl.plugin
Class Context
- java.lang.Object
- 
- com.apama.epl.plugin.Context
 
- 
 public class Context extends java.lang.ObjectClass that holds a context reference and can be passed across the correlator EPL/Java plugin boundary. This class must only be used from an EPL Java Plugin (not from JMon).
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()booleanequals(java.lang.Object other)static ContextgetCurrent()Returns a reference to the context the plugin is currently being called from.longgetId()Equivalent to the EPL method getId on the context typejava.lang.StringgetName()Returns the name of the context.inthashCode()booleanisPublic()Returns true if the context is public (receives external / enqueued events)java.lang.StringtoString()Returns a string representation of the context instance.
 
- 
- 
- 
Constructor Detail- 
Contextpublic Context() The default constructor. This constructor will create a "dummy" context, which does not correspond to a real correlator context. It provides the same functionality as uninitialized context variables in MonitorScript. This cannot be used to send events to.
 - 
Contextpublic Context(Context other) Copy constructor
 
- 
 - 
Method Detail- 
toStringpublic java.lang.String toString() Returns a string representation of the context instance. This method produces an identical string to the one produced in MonitorScript. Example output: \"context(2,\"context_name\",false)\". In this example, the first item in the string (2) refers to the correlator context unique identifier. The second item in the string (\"context_name\") is the name of the context. The third item in the string refers to the value of receivesInput boolean flag, indicating whether the context is public or private. This method returns \"context(0,\"\",false)\" for a Context instance created with the default constructor. For more information on the definition of public and private contexts, please see the MonitorScript documentation (Writing MonitorScript Applications | Implementing Parallel Processing | Creating Contexts)- Overrides:
- toStringin class- java.lang.Object
 
 - 
getNamepublic java.lang.String getName() Returns the name of the context. For the context that is created with the following MonitorScript code: context c := context(\"test\"); When getName() method is called after this instance is retrieved in JMon, it would return \"test\". This method returns an empty string for a Context instance created with the default constructor. For more information, see the MonitorScript documentation about context datatypes.
 - 
isPublicpublic boolean isPublic() Returns true if the context is public (receives external / enqueued events)
 - 
getIdpublic long getId() Equivalent to the EPL method getId on the context type
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object other) - Overrides:
- equalsin class- java.lang.Object
 
 - 
clonepublic java.lang.Object clone() throws java.lang.CloneNotSupportedException- Throws:
- java.lang.CloneNotSupportedException
- See Also:
- Object.clone()
 
 - 
getCurrentpublic static Context getCurrent() Returns a reference to the context the plugin is currently being called from. The reference is safe to hold across invocations.
 
- 
 
-