use of org.openksavi.sponge.examples.EchoPlugin in project sponge by softelnet.
the class EngineBuilderTest method createAndStartupEngine.
private SpongeEngine createAndStartupEngine() {
EchoPlugin plugin = new EchoPlugin();
plugin.setName("testPlugin");
plugin.setEcho("Echo text!");
// @formatter:off
SpongeEngine engine = DefaultSpongeEngine.builder().systemProperty("system.property", "1").property("test.property", "TEST").plugin(plugin).knowledgeBase(new TestKnowledgeBase("testJavaKb")).build();
// @formatter:on
engine.getConfigurationManager().setMainProcessingUnitThreadCount(2);
engine.getConfigurationManager().setEventClonePolicy(EventClonePolicy.DEEP);
engine.startup();
return engine;
}
Aggregations