public class Drools extends Object implements RulesEngine
Constructor and Description |
---|
Drools() |
Modifier and Type | Method and Description |
---|---|
Object |
assertEvent(Rules rules,
Object event,
String entryPoint)
Add an event to the event stream.
|
Object |
assertFact(Rules rules,
Object fact)
Assert a fact in the knowledge base.
|
Object |
createSession(Rules rules)
Create a provider-specific session for interacting with the Rules Engine.
|
void |
disposeSession(Object sessionData)
Dispose of a provider-specific session if necessary.
|
String |
getName()
Gets the name of the object
|
void |
retractFact(Rules rules,
Object fact)
Retract a fact from the knowledge base.
|
void |
setMessageService(MessageService messageService)
Inject a callback so that the Rules Engine may generate messages within Mule.
|
void |
setName(String name)
Sets the name of the object
|
protected static final Logger logger
public Object createSession(Rules rules) throws Exception
RulesEngine
createSession
in interface RulesEngine
Exception
public void disposeSession(Object sessionData) throws Exception
RulesEngine
disposeSession
in interface RulesEngine
sessionData
- - an initialized rules sessionException
public Object assertFact(Rules rules, Object fact) throws Exception
RulesEngine
assertFact
in interface RulesEngine
fact
- to assertException
public void retractFact(Rules rules, Object fact) throws Exception
RulesEngine
retractFact
in interface RulesEngine
fact
- to retractException
public Object assertEvent(Rules rules, Object event, String entryPoint) throws Exception
RulesEngine
assertEvent
in interface RulesEngine
entryPoint
- for the event streamException
public void setMessageService(MessageService messageService)
RulesEngine
setMessageService
in interface RulesEngine
messageService
- An interface within Mule which the rules may call to generate Mule messages.public void setName(String name)
NameableObject
setName
in interface NameableObject
name
- the name of the objectpublic String getName()
NamedObject
getName
in interface NamedObject
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.