net.esper.eql.core
Interface EngineImportService

All Known Implementing Classes:
EngineImportServiceImpl

public interface EngineImportService

Service for engine-level resolution of static methods and aggregation methods.


Method Summary
 void addAggregation(String functionName, String aggregationClass)
          Add an aggregation function.
 void addImport(String importName)
          Add an import, such as "com.mypackage.*" or "com.mypackage.MyClass".
 ConfigurationMethodRef getConfigurationMethodRef(String className)
          Returns the method invocation caches for the from-clause for a class.
 AggregationSupport resolveAggregation(String functionName)
          Used at statement compile-time to try and resolve a given function name into an aggregation method.
 Class resolveClass(String classNameAlias)
          Resolves a given class name, either fully qualified and simple and imported to a class.
 Method resolveMethod(Class clazz, String methodName, Class[] paramTypes)
          Resolves a given method name and list of parameter types to an instance or static method exposed by the given class.
 Method resolveMethod(String classNameAlias, String methodName)
          Resolves a given class and method name to a static method, expecting the method to exist exactly once and not be overloaded, with any parameters.
 Method resolveMethod(String classNameAlias, String methodName, Class[] paramTypes)
          Resolves a given class, method and list of parameter types to a static method.
 

Method Detail

getConfigurationMethodRef

ConfigurationMethodRef getConfigurationMethodRef(String className)
Returns the method invocation caches for the from-clause for a class.

Parameters:
className - the class name providing the method
Returns:
cache configs

addImport

void addImport(String importName)
               throws EngineImportException
Add an import, such as "com.mypackage.*" or "com.mypackage.MyClass".

Parameters:
importName - is the import to add
Throws:
EngineImportException - if the information or format is invalid

addAggregation

void addAggregation(String functionName,
                    String aggregationClass)
                    throws EngineImportException
Add an aggregation function.

Parameters:
functionName - is the name of the function to make known.
aggregationClass - is the class that provides the aggregator
Throws:
EngineImportException - throw if format or information is invalid

resolveAggregation

AggregationSupport resolveAggregation(String functionName)
                                      throws EngineImportUndefinedException,
                                             EngineImportException
Used at statement compile-time to try and resolve a given function name into an aggregation method. Matches function name case-neutral.

Parameters:
functionName - is the function name
Returns:
aggregation provider
Throws:
EngineImportUndefinedException - if the function is not a configured aggregation function
EngineImportException - if the aggregation providing class could not be loaded or doesn't match

resolveMethod

Method resolveMethod(String classNameAlias,
                     String methodName,
                     Class[] paramTypes)
                     throws EngineImportException
Resolves a given class, method and list of parameter types to a static method.

Parameters:
classNameAlias - is the class name to use
methodName - is the method name
paramTypes - is parameter types match expression sub-nodes
Returns:
method this resolves to
Throws:
EngineImportException - if the method cannot be resolved to a visible static method

resolveClass

Class resolveClass(String classNameAlias)
                   throws EngineImportException
Resolves a given class name, either fully qualified and simple and imported to a class.

Parameters:
classNameAlias - is the class name to use
Returns:
class this resolves to
Throws:
EngineImportException - if there was an error resolving the class

resolveMethod

Method resolveMethod(String classNameAlias,
                     String methodName)
                     throws EngineImportException
Resolves a given class and method name to a static method, expecting the method to exist exactly once and not be overloaded, with any parameters.

Parameters:
classNameAlias - is the class name to use
methodName - is the method name
Returns:
method this resolves to
Throws:
EngineImportException - if the method cannot be resolved to a visible static method, or if the method is overloaded

resolveMethod

Method resolveMethod(Class clazz,
                     String methodName,
                     Class[] paramTypes)
                     throws EngineImportException
Resolves a given method name and list of parameter types to an instance or static method exposed by the given class.

Parameters:
clazz - is the class to look for a fitting method
methodName - is the method name
paramTypes - is parameter types match expression sub-nodes
Returns:
method this resolves to
Throws:
EngineImportException - if the method cannot be resolved to a visible static or instance method

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