public class PipelineRuleParser extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.antlr.v4.runtime.tree.ParseTreeWalker |
WALKER |
| Constructor and Description |
|---|
PipelineRuleParser(FunctionRegistry functionRegistry,
CodeGenerator codeGenerator) |
| Modifier and Type | Method and Description |
|---|---|
Pipeline |
parsePipeline(String id,
String source) |
List<Pipeline> |
parsePipelines(String pipelines) |
Rule |
parseRule(String rule,
boolean silent) |
Rule |
parseRule(String rule,
boolean silent,
PipelineClassloader classLoader) |
Rule |
parseRule(String id,
String rule,
boolean silent) |
Rule |
parseRule(String id,
String rule,
boolean silent,
PipelineClassloader ruleClassLoader)
Parses the given rule source and optionally generates a Java class for it if the classloader is not null.
|
static String |
unescape(String string) |
static String |
unquote(String string,
char quoteChar) |
@Inject public PipelineRuleParser(FunctionRegistry functionRegistry, CodeGenerator codeGenerator)
public Rule parseRule(String rule, boolean silent) throws ParseException
ParseExceptionpublic Rule parseRule(String rule, boolean silent, PipelineClassloader classLoader) throws ParseException
ParseExceptionpublic Rule parseRule(String id, String rule, boolean silent) throws ParseException
ParseExceptionpublic Rule parseRule(String id, String rule, boolean silent, PipelineClassloader ruleClassLoader) throws ParseException
id - the id of the rule, necessary to generate coderule - rule source codesilent - don't emit status messages during parsingruleClassLoader - the classloader to load the generated code into (can be null)ParseException - if a one or more parse errors occurpublic List<Pipeline> parsePipelines(String pipelines) throws ParseException
ParseExceptionCopyright © 2012–2021 Graylog, Inc.. All rights reserved.