public class EPCompilerImpl extends Object implements EPCompilerSPI
Constructor and Description |
---|
EPCompilerImpl() |
Modifier and Type | Method and Description |
---|---|
com.espertech.esper.common.client.EPCompiled |
compile(com.espertech.esper.common.client.module.Module module,
CompilerArguments arguments)
Compiles a module object model and returns the byte code for deployment into a runtime.
|
com.espertech.esper.common.client.EPCompiled |
compile(String epl,
CompilerArguments arguments)
Compiles EPL and returns the byte code for deployment into a runtime.
|
com.espertech.esper.common.client.EPCompiled |
compileQuery(com.espertech.esper.common.client.soda.EPStatementObjectModel fireAndForgetEPLQueryModel,
CompilerArguments arguments)
Compiles fire-and-forget query object model for execution by the runtime.
|
com.espertech.esper.common.client.EPCompiled |
compileQuery(String fireAndForgetEPLQuery,
CompilerArguments arguments)
Compiles a single fire-and-forget query for execution by the runtime.
|
com.espertech.esper.common.client.soda.EPStatementObjectModel |
eplToModel(String stmtText,
com.espertech.esper.common.client.configuration.Configuration configuration)
Parse the single-statement EPL and return a statement object model.
|
EPCompilerSPIExpression |
expressionCompiler(com.espertech.esper.common.client.configuration.Configuration configuration) |
com.espertech.esper.common.client.module.Module |
parseModule(String eplModuleText)
Parse the module text returning the module object model.
|
com.espertech.esper.common.client.module.Module |
readModule(File file)
Read the module by reading the text file and return the module.
|
com.espertech.esper.common.client.module.Module |
readModule(InputStream stream,
String uri)
Read the input stream and return the module.
|
com.espertech.esper.common.client.module.Module |
readModule(String resource,
ClassLoader classLoader)
Read the resource by opening from classpath and return the module.
|
com.espertech.esper.common.client.module.Module |
readModule(URL url)
Read the module by reading from the URL provided and return the module.
|
void |
syntaxValidate(com.espertech.esper.common.client.module.Module module,
CompilerArguments arguments)
Validate the syntax of the module.
|
public com.espertech.esper.common.client.EPCompiled compileQuery(String fireAndForgetEPLQuery, CompilerArguments arguments) throws EPCompileException
EPCompiler
compileQuery
in interface EPCompiler
fireAndForgetEPLQuery
- fire-and-forget query to compilearguments
- compiler argumentsEPCompileException
- when the compilation failedpublic com.espertech.esper.common.client.EPCompiled compileQuery(com.espertech.esper.common.client.soda.EPStatementObjectModel fireAndForgetEPLQueryModel, CompilerArguments arguments) throws EPCompileException
EPCompiler
compileQuery
in interface EPCompiler
fireAndForgetEPLQueryModel
- fire-and-forget query to compilearguments
- compiler argumentsEPCompileException
- when the compilation failedpublic com.espertech.esper.common.client.EPCompiled compile(String epl, CompilerArguments arguments) throws EPCompileException
EPCompiler
Use semicolon(;) to separate multiple statements in a module.
compile
in interface EPCompiler
epl
- epl to compilearguments
- compiler argumentsEPCompileException
- when the compilation failedpublic EPCompilerSPIExpression expressionCompiler(com.espertech.esper.common.client.configuration.Configuration configuration) throws EPCompileException
expressionCompiler
in interface EPCompilerSPI
EPCompileException
public com.espertech.esper.common.client.soda.EPStatementObjectModel eplToModel(String stmtText, com.espertech.esper.common.client.configuration.Configuration configuration) throws EPCompileException
EPCompiler
eplToModel
in interface EPCompiler
stmtText
- to parseconfiguration
- a configuration object when availableEPCompileException
- when the EPL could not be parsedpublic com.espertech.esper.common.client.module.Module parseModule(String eplModuleText) throws IOException, com.espertech.esper.common.client.module.ParseException
EPCompiler
parseModule
in interface EPCompiler
eplModuleText
- to parseIOException
- when the parser failedcom.espertech.esper.common.client.module.ParseException
- when parsing of the module failedpublic com.espertech.esper.common.client.EPCompiled compile(com.espertech.esper.common.client.module.Module module, CompilerArguments arguments) throws EPCompileException
EPCompiler
compile
in interface EPCompiler
module
- module object to compilearguments
- compiler argumentsEPCompileException
- when the compilation failedpublic com.espertech.esper.common.client.module.Module readModule(InputStream stream, String uri) throws IOException, com.espertech.esper.common.client.module.ParseException
EPCompiler
readModule
in interface EPCompiler
stream
- to readuri
- uri of the moduleIOException
- when the io operation failedcom.espertech.esper.common.client.module.ParseException
- when parsing of the module failedpublic com.espertech.esper.common.client.module.Module readModule(File file) throws IOException, com.espertech.esper.common.client.module.ParseException
EPCompiler
readModule
in interface EPCompiler
file
- the file to readIOException
- when the file could not be readcom.espertech.esper.common.client.module.ParseException
- when parsing of the module failedpublic com.espertech.esper.common.client.module.Module readModule(URL url) throws IOException, com.espertech.esper.common.client.module.ParseException
EPCompiler
readModule
in interface EPCompiler
url
- the URL to readIOException
- when the url input stream could not be readcom.espertech.esper.common.client.module.ParseException
- when parsing of the module failedpublic com.espertech.esper.common.client.module.Module readModule(String resource, ClassLoader classLoader) throws IOException, com.espertech.esper.common.client.module.ParseException
EPCompiler
readModule
in interface EPCompiler
resource
- name of the classpath resourceclassLoader
- classloaderIOException
- when the resource could not be readcom.espertech.esper.common.client.module.ParseException
- when parsing of the module failedpublic void syntaxValidate(com.espertech.esper.common.client.module.Module module, CompilerArguments arguments) throws EPCompileException
EPCompiler
syntaxValidate
in interface EPCompiler
module
- to validatearguments
- compiler argumentsEPCompileException
- when the EPL could not be parsedCopyright © 2005–2020. All rights reserved.