|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.core.EngineImportServiceImpl
public class EngineImportServiceImpl
Implementation for engine-level imports.
Constructor Summary | |
---|---|
EngineImportServiceImpl()
Ctor. |
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". |
void |
addMethodRefs(Map<String,ConfigurationMethodRef> configs)
Adds cache configs for method invocations for from-clause. |
ConfigurationMethodRef |
getConfigurationMethodRef(String className)
Returns the method invocation caches for the from-clause for a class. |
protected String[] |
getImports()
For testing, returns imports. |
AggregationSupport |
resolveAggregation(String name)
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. |
protected Class |
resolveClassInternal(String className)
Finds a class by class name using the auto-import information provided. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EngineImportServiceImpl()
Method Detail |
---|
public ConfigurationMethodRef getConfigurationMethodRef(String className)
EngineImportService
getConfigurationMethodRef
in interface EngineImportService
className
- the class name providing the method
public void addMethodRefs(Map<String,ConfigurationMethodRef> configs)
configs
- cache configspublic void addImport(String importName) throws EngineImportException
EngineImportService
addImport
in interface EngineImportService
importName
- is the import to add
EngineImportException
- if the information or format is invalidpublic void addAggregation(String functionName, String aggregationClass) throws EngineImportException
EngineImportService
addAggregation
in interface EngineImportService
functionName
- is the name of the function to make known.aggregationClass
- is the class that provides the aggregator
EngineImportException
- throw if format or information is invalidpublic AggregationSupport resolveAggregation(String name) throws EngineImportException, EngineImportUndefinedException
EngineImportService
resolveAggregation
in interface EngineImportService
name
- is the function name
EngineImportException
- if the aggregation providing class could not be loaded or doesn't match
EngineImportUndefinedException
- if the function is not a configured aggregation functionpublic Method resolveMethod(String classNameAlias, String methodName, Class[] paramTypes) throws EngineImportException
EngineImportService
resolveMethod
in interface EngineImportService
classNameAlias
- is the class name to usemethodName
- is the method nameparamTypes
- is parameter types match expression sub-nodes
EngineImportException
- if the method cannot be resolved to a visible static methodpublic Method resolveMethod(String classNameAlias, String methodName) throws EngineImportException
EngineImportService
resolveMethod
in interface EngineImportService
classNameAlias
- is the class name to usemethodName
- is the method name
EngineImportException
- if the method cannot be resolved to a visible static method, or
if the method is overloadedpublic Class resolveClass(String classNameAlias) throws EngineImportException
EngineImportService
resolveClass
in interface EngineImportService
classNameAlias
- is the class name to use
EngineImportException
- if there was an error resolving the classprotected Class resolveClassInternal(String className) throws ClassNotFoundException
className
- is the class name to find
ClassNotFoundException
- if the class cannot be loadedpublic Method resolveMethod(Class clazz, String methodName, Class[] paramTypes) throws EngineImportException
EngineImportService
resolveMethod
in interface EngineImportService
clazz
- is the class to look for a fitting methodmethodName
- is the method nameparamTypes
- is parameter types match expression sub-nodes
EngineImportException
- if the method cannot be resolved to a visible static or instance methodprotected String[] getImports()
|
© 2007 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |