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".
 AggregationSupport resolveAggregation(String functionName)
          Used at statement compile-time to try and resolve a given function name into an aggregation method.
 Method resolveMethod(String classNameAlias, String methodName, Class[] paramTypes)
          Resolves a given class, method and list of parameter types to a static method.
 

Method Detail

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