com.github.chen0040.drools.StatefulRuleEngine Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of friendly-drools Show documentation
Show all versions of friendly-drools Show documentation
Friendly wrapper that provides useful utilities over Drools engine
The newest version!
package com.github.chen0040.drools;
import org.kie.api.runtime.Channel;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.rule.FactHandle;
import org.kie.api.runtime.rule.QueryResults;
import java.util.List;
/**
* Created by xschen on 11/7/16.
*/
public interface StatefulRuleEngine extends RuleEngine {
FactHandle insert(Object fact);
int fireAllRules(); // for discrete event rule firing
void fireUntilHalt(); // for continuous event rule firing
void halt(); // for continuous event rule firing
void enableEventStreaming();
void enablePseudoClock();
List getFacts(Class clazz);
void setGlobal(String identifier, Object value);
T getGlobal(String identifier, Class clazz);
void registerChannel(String channelIdentifier, Channel channel);
void unregisterChannel(String channelIdentifier);
void dispose();
KieSession getSession();
QueryResults getQueryResult(String queryIdentifier, Object... args);
}