com.espertech.esper.client
Interface ConfigurationOperations

All Known Implementing Classes:
Configuration, ConfigurationOperationsImpl

public interface ConfigurationOperations

Provides configuration operations for configuration-time and runtime parameters.


Method Summary
 void addEventTypeAlias(String eventTypeAlias, Class eventClass)
          Add an alias for an event type represented by Java-bean plain-old Java object events.
 void addEventTypeAlias(String eventTypeAlias, ConfigurationEventTypeXMLDOM xmlDOMEventTypeDesc)
          Add an alias for an event type that represents org.w3c.dom.Node events.
 void addEventTypeAlias(String eventTypeAlias, Map<String,Class> typeMap)
          Add an alias for an event type that represents java.util.Map events, taking a Map of event property and class name as a parameter.
 void addEventTypeAlias(String eventTypeAlias, Properties typeMap)
          Add an alias for an event type that represents java.util.Map events.
 void addEventTypeAlias(String eventTypeAlias, String eventClassName)
          Add an alias for an event type represented by JavaBean object events.
 void addEventTypeAliasSimpleName(Class eventClass)
          Add an alias for an event type represented by Java-bean plain-old Java object events, using the simple name of the Java class as the alias.
 void addEventTypeAutoAlias(String packageName)
          Adds a Java package name of a package that Java event classes reside in.
 void addImport(String importName)
          Adds a package or class to the list of automatically-imported classes and packages.
 void addNestableEventTypeAlias(String eventTypeAlias, Map<String,Object> typeMap)
          Add an alias for an event type that represents nestable strong-typed java.util.Map events, taking a Map of event property and class name as a parameter.
 void addPlugInAggregationFunction(String functionName, String aggregationClassName)
          Adds a plug-in aggregation function given a function name and an aggregation class name.
 void addVariable(String variableName, Class type, Object initializationValue)
          Add a variable.
 

Method Detail

addEventTypeAutoAlias

void addEventTypeAutoAlias(String packageName)
Adds a Java package name of a package that Java event classes reside in.

This setting allows an application to place all it's events into one or more Java packages and then declare these packages via this method. The engine attempts to resolve an event type alias to a Java class residing in each declared package.

For example, in the statement "select * from MyEvent" the engine attempts to load class "javaPackageName.MyEvent" and if successful, uses that class as the event type.

Parameters:
packageName - is the fully-qualified Java package name of the Java package that event classes reside in

addPlugInAggregationFunction

void addPlugInAggregationFunction(String functionName,
                                  String aggregationClassName)
                                  throws ConfigurationException
Adds a plug-in aggregation function given a function name and an aggregation class name.

The aggregation class must extends the base class AggregationSupport.

The same function name cannot be added twice.

Parameters:
functionName - is the new aggregation function name
aggregationClassName - is the fully-qualified class name of the class implementing the aggregation function
Throws:
ConfigurationException - is thrown to indicate a problem adding aggregation function

addImport

void addImport(String importName)
               throws ConfigurationException
Adds a package or class to the list of automatically-imported classes and packages.

To import a single class offering a static method, simply supply the fully-qualified name of the class and use the syntax classname.methodname(...)

To import a whole package and use the classname.methodname(...) syntax, specifiy a package with wildcard, such as com.mycompany.staticlib.*.

Parameters:
importName - is a fully-qualified class name or a package name with wildcard
Throws:
ConfigurationException - if incorrect package or class names are encountered

addEventTypeAlias

void addEventTypeAlias(String eventTypeAlias,
                       String eventClassName)
                       throws ConfigurationException
Add an alias for an event type represented by JavaBean object events.

Allows a second alias to be added for the same type. Does not allow the same alias to be used for different types.

Parameters:
eventTypeAlias - is the alias for the event type
eventClassName - fully-qualified class name of the event type
Throws:
ConfigurationException - if the alias is already in used for a different type

addEventTypeAlias

void addEventTypeAlias(String eventTypeAlias,
                       Class eventClass)
                       throws ConfigurationException
Add an alias for an event type represented by Java-bean plain-old Java object events.

Allows a second alias to be added for the same type. Does not allow the same alias to be used for different types.

Parameters:
eventTypeAlias - is the alias for the event type
eventClass - is the Java event class for which to create the alias
Throws:
ConfigurationException - if the alias is already in used for a different type

addEventTypeAliasSimpleName

void addEventTypeAliasSimpleName(Class eventClass)
Add an alias for an event type represented by Java-bean plain-old Java object events, using the simple name of the Java class as the alias.

For example, if your class is "com.mycompany.MyEvent", then this method adds the alias "MyEvent" for the class.

Allows a second alias to be added for the same type. Does not allow the same alias to be used for different types.

Parameters:
eventClass - is the Java event class for which to create the alias from the class simple name
Throws:
ConfigurationException - if the alias is already in used for a different type

addEventTypeAlias

void addEventTypeAlias(String eventTypeAlias,
                       Properties typeMap)
                       throws ConfigurationException
Add an alias for an event type that represents java.util.Map events.

Allows a second alias to be added for the same type. Does not allow the same alias to be used for different types.

Parameters:
eventTypeAlias - is the alias for the event type
typeMap - maps the name of each property in the Map event to the type (fully qualified classname) of its value in Map event instances.
Throws:
ConfigurationException - if the alias is already in used for a different type

addEventTypeAlias

void addEventTypeAlias(String eventTypeAlias,
                       Map<String,Class> typeMap)
                       throws ConfigurationException
Add an alias for an event type that represents java.util.Map events, taking a Map of event property and class name as a parameter.

This method is provided for convenience and is same in function to method taking a Properties object that contain fully qualified class name as values.

Allows a second alias to be added for the same type. Does not allow the same alias to be used for different types.

Parameters:
eventTypeAlias - is the alias for the event type
typeMap - maps the name of each property in the Map event to the type of its value in the Map object
Throws:
ConfigurationException - if the alias is already in used for a different type

addNestableEventTypeAlias

void addNestableEventTypeAlias(String eventTypeAlias,
                               Map<String,Object> typeMap)
                               throws ConfigurationException
Add an alias for an event type that represents nestable strong-typed java.util.Map events, taking a Map of event property and class name as a parameter.

This method takes a Map of String property names and Object property type. Each Object property type can either be a java.lang.Class to denote a built-in type or POJO application object, or can itself also be a Map to describe a property that itself is a map of further properties.

This method is provided for convenience and is same in function to method taking a Properties object that contain fully qualified class name as values.

Allows a second alias to be added for the same type. Does not allow the same alias to be used for different types.

Parameters:
eventTypeAlias - is the alias for the event type
typeMap - maps the name of each property in the Map event to the type of its value in the Map object
Throws:
ConfigurationException - if the alias is already in used for a different type

addEventTypeAlias

void addEventTypeAlias(String eventTypeAlias,
                       ConfigurationEventTypeXMLDOM xmlDOMEventTypeDesc)
                       throws ConfigurationException
Add an alias for an event type that represents org.w3c.dom.Node events.

Allows a second alias to be added for the same type. Does not allow the same alias to be used for different types.

Parameters:
eventTypeAlias - is the alias for the event type
xmlDOMEventTypeDesc - descriptor containing property and mapping information for XML-DOM events
Throws:
ConfigurationException - if the alias is already in used for a different type

addVariable

void addVariable(String variableName,
                 Class type,
                 Object initializationValue)
                 throws ConfigurationException
Add a variable.

Parameters:
variableName - name of the variable to add
type - the type of the variable must be a primitive or boxed Java-builtin scalar type.
initializationValue - is the first assigned value
Throws:
ConfigurationException - if the type and initialization value don't match or the variable name is already in use

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com