com.apama.jmon
Class PreparedEventExpressionTemplate

java.lang.Object
  extended by com.apama.jmon.PreparedEventExpressionTemplate
All Implemented Interfaces:
java.io.Serializable

public class PreparedEventExpressionTemplate
extends java.lang.Object
implements java.io.Serializable

Instances of this class are declared to represent templates for "Prepared Event Expressions". These are similar in concept to SQL prepared statements, in that they allow a monitor to declare a parameterised event expression that can then be "instantiated" as many times as necessary with different parameter values. The advantage of this approach over standard event expressions is that the expression is only parsed once, when the template is created. Instantiating the template with some set of parameters is then a relatively cheap operation. Standard event expressions will be parsed every time a listener is attached to them, which can be inefficient in monitors that create large numbers of listeners.

See the documentation for PreparedEventExpression for examples of how this class is used.

See Also:
Serialized Form

Constructor Summary
PreparedEventExpressionTemplate(java.lang.String templateString)
          Constructor to create a new instance with the given immutable expression template string.
 
Method Summary
 PreparedEventExpression getInstance()
          Create a new instance of the event expression template.
 java.lang.String getTemplateString()
          Get the String value of the PreparedEventExpressionTemplate.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PreparedEventExpressionTemplate

public PreparedEventExpressionTemplate(java.lang.String templateString)
Constructor to create a new instance with the given immutable expression template string.

Parameters:
templateString - The event expression template to be used.
Method Detail

getTemplateString

public java.lang.String getTemplateString()
Get the String value of the PreparedEventExpressionTemplate.

Returns:
value of the PreparedEventExpressionTemplate.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
getTemplateString()

getInstance

public PreparedEventExpression getInstance()
Create a new instance of the event expression template.

Returns:
A new event expression created from the template, ready to have its parameter values filled in.


Submit a bug or feature
Copyright (c) 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG