org.mule.module.drools
Class Drools

java.lang.Object
  extended by org.mule.module.drools.Drools
All Implemented Interfaces:
NameableObject, NamedObject, RulesEngine

public class Drools
extends Object
implements RulesEngine


Field Summary
protected static Logger logger
           
 
Constructor Summary
Drools()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Logger logger
Constructor Detail

Drools

public Drools()
Method Detail

createSession

public Object createSession(Rules rules)
                     throws Exception
Description copied from interface: RulesEngine
Create a provider-specific session for interacting with the Rules Engine. This method is REQUIRED.

Specified by:
createSession in interface RulesEngine
Returns:
DroolsSessionData - contains the KnowledgeSession plus any other stateful information
Throws:
Exception

disposeSession

public void disposeSession(Object sessionData)
                    throws Exception
Description copied from interface: RulesEngine
Dispose of a provider-specific session if necessary. This method is OPTIONAL.

Specified by:
disposeSession in interface RulesEngine
Parameters:
sessionData - - an initialized rules session
Throws:
Exception

assertFact

public Object assertFact(Rules rules,
                         Object fact)
                  throws Exception
Description copied from interface: RulesEngine
Assert a fact in the knowledge base. This method is REQUIRED.

Specified by:
assertFact in interface RulesEngine
fact - to assert
Returns:
a handle to the fact for future reference
Throws:
Exception

retractFact

public void retractFact(Rules rules,
                        Object fact)
                 throws Exception
Description copied from interface: RulesEngine
Retract a fact from the knowledge base. This method is REQUIRED.

Specified by:
retractFact in interface RulesEngine
fact - to retract
Throws:
Exception

assertEvent

public Object assertEvent(Rules rules,
                          Object event,
                          String entryPoint)
                   throws Exception
Description copied from interface: RulesEngine
Add an event to the event stream. This is used for CEP. This method is OPTIONAL.

Specified by:
assertEvent in interface RulesEngine
entryPoint - for the event stream
Returns:
a handle to the event for future reference
Throws:
Exception

setMessageService

public void setMessageService(MessageService messageService)
Description copied from interface: RulesEngine
Inject a callback so that the Rules Engine may generate messages within Mule. This method is REQUIRED.

Specified by:
setMessageService in interface RulesEngine
Parameters:
messageService - An interface within Mule which the rules may call to generate Mule messages.

setName

public void setName(String name)
Description copied from interface: NameableObject
Sets the name of the object

Specified by:
setName in interface NameableObject
Parameters:
name - the name of the object

getName

public String getName()
Description copied from interface: NamedObject
Gets the name of the object

Specified by:
getName in interface NamedObject
Returns:
the name of the object


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.