public interface Fluxtion
StaticEventProcessor| Modifier and Type | Method and Description |
|---|---|
static com.fluxtion.runtime.EventProcessor |
compile(com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<EventProcessorConfig> sepConfig)
Generates and compiles Java source code for a
StaticEventProcessor. |
static com.fluxtion.runtime.EventProcessor |
compile(com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<EventProcessorConfig> sepConfig,
com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<FluxtionCompilerConfig> cfgBuilder) |
static com.fluxtion.runtime.EventProcessor |
compile(RootNodeConfig rootNode)
Generates and compiles Java source code for a
StaticEventProcessor. |
static com.fluxtion.runtime.EventProcessor |
compile(RootNodeConfig rootNode,
com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<FluxtionCompilerConfig> cfgBuilder) |
static com.fluxtion.runtime.EventProcessor |
compileAot(com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<EventProcessorConfig> cfgBuilder) |
static com.fluxtion.runtime.EventProcessor |
compileAot(com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<EventProcessorConfig> cfgBuilder,
String packageName,
String className) |
static com.fluxtion.runtime.EventProcessor |
compileAot(RootNodeConfig rootNode) |
static com.fluxtion.runtime.EventProcessor |
compileAot(RootNodeConfig rootNode,
String packagePrefix) |
static com.fluxtion.runtime.EventProcessor |
compileFromReader(Reader reader)
Generates an EventProcessor from a yaml document read from a supplied reader.
|
static com.fluxtion.runtime.EventProcessor |
interpret(com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<EventProcessorConfig> sepConfig)
Generates an in memory version of a
StaticEventProcessor. |
static com.fluxtion.runtime.EventProcessor |
interpret(RootNodeConfig rootNode)
Generates an in memory version of a
StaticEventProcessor. |
static com.fluxtion.runtime.EventProcessor compile(com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<EventProcessorConfig> sepConfig)
StaticEventProcessor. The compiled version only requires
the Fluxtion runtime dependencies to operate and process events. The source code is only maintained in memory
as a string and is not persisted,
Lifecycle.init() has not been called on the returned instance. The caller must invoke init before
sending events to the processor using StaticEventProcessor.onEvent(Object)
sepConfig - the configuration used to build this StaticEventProcessorStaticEventProcessorEventProcessorConfigstatic com.fluxtion.runtime.EventProcessor compile(com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<EventProcessorConfig> sepConfig, com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<FluxtionCompilerConfig> cfgBuilder)
static com.fluxtion.runtime.EventProcessor compileAot(com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<EventProcessorConfig> cfgBuilder)
static com.fluxtion.runtime.EventProcessor compileAot(com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<EventProcessorConfig> cfgBuilder, String packageName, String className)
static com.fluxtion.runtime.EventProcessor interpret(com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<EventProcessorConfig> sepConfig)
StaticEventProcessor. The in memory version is transient and requires
the runtime and compiler Fluxtion libraries to operate.
Lifecycle.init() has not been called on the returned instance. The caller must invoke init before
sending events to the processor using StaticEventProcessor.onEvent(Object)
sepConfig - the configuration used to build this StaticEventProcessorStaticEventProcessorEventProcessorConfigstatic com.fluxtion.runtime.EventProcessor compile(RootNodeConfig rootNode)
StaticEventProcessor. The compiled version only requires
the Fluxtion runtime dependencies to operate and process events.
Lifecycle.init() has not been called on the returned instance. The caller must invoke init before
sending events to the processor using StaticEventProcessor.onEvent(Object)
The root node is injected into the graph. If the node has any injected dependencies these are added to the graph. If a custom builder for the root node exists this will called and additional nodes can be added to the graph in the factory method.
rootNode - the root node of this graphStaticEventProcessorstatic com.fluxtion.runtime.EventProcessor compile(RootNodeConfig rootNode, com.fluxtion.runtime.partition.LambdaReflection.SerializableConsumer<FluxtionCompilerConfig> cfgBuilder)
static com.fluxtion.runtime.EventProcessor compileAot(RootNodeConfig rootNode)
static com.fluxtion.runtime.EventProcessor compileAot(RootNodeConfig rootNode, String packagePrefix)
static com.fluxtion.runtime.EventProcessor compileFromReader(Reader reader)
Format:
Example yaml output for a definition
Yaml yaml = new Yaml();
Map configMap = new HashMap<>();
configMap.put("firstKey", 12);
configMap.put("anotherKey", "my value");
FluxtionCompilerConfig compilerConfig = new FluxtionCompilerConfig();
compilerConfig.setPackageName("mypackage.whatever");
DataDrivenGenerationConfig myRootConfig = new DataDrivenGenerationConfig("myRoot", MyRootClass.class.getCanonicalName(), configMap, compilerConfig);
System.out.println("dumpAsMap:\n" + yaml.dumpAsMap(myRootConfig));
rootClass: com.company.MyRootClass name: myRoot configMap: anotherKey: my value firstKey: 12 compilerConfig: buildOutputDirectory: null className: null compileSource: true formatSource: false generateDescription: false outputDirectory: src/main/java/ packageName: mypackage.whatever resourcesOutputDirectory: src/main/resources/ templateSep: template/base/javaTemplate.vsl writeSourceToFile: false
reader - the source of the yaml documentstatic com.fluxtion.runtime.EventProcessor interpret(RootNodeConfig rootNode)
StaticEventProcessor. The in memory version is transient and requires
the runtime and compiler Fluxtion libraries to operate.
Lifecycle.init() has not been called on the returned instance. The caller must invoke init before
sending events to the processor using StaticEventProcessor.onEvent(Object)
The root node is injected into the graph. If the node has any injected dependencies these are added to the graph. If a custom builder for the root node exists this will called and additional nodes can be added to the graph in the factory method.
rootNode - the root node of this graph0StaticEventProcessorCopyright © 2022. All rights reserved.