org.drools.reteoo
Class ReteooStatelessSession

java.lang.Object
  extended by org.drools.reteoo.ReteooStatelessSession
All Implemented Interfaces:
Externalizable, Serializable, InternalStatelessSession, RuleBaseEventManager, StatelessSession, WorkingMemoryEventManager

public class ReteooStatelessSession
extends Object
implements StatelessSession, InternalStatelessSession, Externalizable

See Also:
Serialized Form

Field Summary
protected  AgendaEventSupport agendaEventSupport
           
protected  WorkingMemoryEventSupport workingMemoryEventSupport
          The eventSupport
 
Constructor Summary
ReteooStatelessSession()
           
ReteooStatelessSession(InternalRuleBase ruleBase)
           
 
Method Summary
 void addEventListener(AgendaEventListener listener)
          Add an event listener.
 void addEventListener(RuleBaseEventListener listener)
          Add an event listener.
 void addEventListener(WorkingMemoryEventListener listener)
          Add an event listener.
 void asyncExecute(Collection collection)
          This will assert the object List (as SEPARATE facts) in the background.
 void asyncExecute(Object object)
          This will assert the object in the background.
 void asyncExecute(Object[] array)
          This will assert the object array (as SEPARATE facts) in the background.
 void execute(Collection collection)
          Insert a List of facts, an fire the rules, returning when finished.
 void execute(Object object)
          Insert a single fact, an fire the rules, returning when finished.
 void execute(Object[] array)
          Insert an array of facts, an fire the rules, returning when finished.
 StatelessSessionResult executeWithResults(Collection collection)
          Similar to the normal execute method, but this will return "results".
 StatelessSessionResult executeWithResults(Object object)
          Similar to the normal execute method, but this will return "results".
 StatelessSessionResult executeWithResults(Object[] array)
          Similar to the normal execute method, but this will return "results".
 List getAgendaEventListeners()
          Returns all event listeners.
 InternalRuleBase getRuleBase()
           
 List getRuleBaseEventListeners()
          Returns all event listeners.
 List getWorkingMemoryEventListeners()
          Returns all event listeners.
 InternalWorkingMemory newWorkingMemory()
           
 void readExternal(ObjectInput in)
           
 void removeEventListener(AgendaEventListener listener)
          Remove an event listener.
 void removeEventListener(RuleBaseEventListener listener)
          Remove an event listener.
 void removeEventListener(WorkingMemoryEventListener listener)
          Remove an event listener.
 void setAgendaFilter(AgendaFilter agendaFilter)
           
 void setGlobal(String identifier, Object value)
          Sets a global value
 void setGlobalExporter(GlobalExporter globalExporter)
          Used to specify a global exporting strategy so that global variables can be available to StatelessSessionResults.
 void setGlobalResolver(GlobalResolver globalResolver)
          Delegate used to resolve any global names not found in the global map.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

workingMemoryEventSupport

protected WorkingMemoryEventSupport workingMemoryEventSupport
The eventSupport


agendaEventSupport

protected AgendaEventSupport agendaEventSupport
Constructor Detail

ReteooStatelessSession

public ReteooStatelessSession()

ReteooStatelessSession

public ReteooStatelessSession(InternalRuleBase ruleBase)
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

getRuleBase

public InternalRuleBase getRuleBase()
Specified by:
getRuleBase in interface InternalStatelessSession

newWorkingMemory

public InternalWorkingMemory newWorkingMemory()

addEventListener

public void addEventListener(WorkingMemoryEventListener listener)
Description copied from interface: WorkingMemoryEventManager
Add an event listener.

Specified by:
addEventListener in interface WorkingMemoryEventManager
Parameters:
listener - The listener to add.

removeEventListener

public void removeEventListener(WorkingMemoryEventListener listener)
Description copied from interface: WorkingMemoryEventManager
Remove an event listener.

Specified by:
removeEventListener in interface WorkingMemoryEventManager
Parameters:
listener - The listener to remove.

getWorkingMemoryEventListeners

public List getWorkingMemoryEventListeners()
Description copied from interface: WorkingMemoryEventManager
Returns all event listeners.

Specified by:
getWorkingMemoryEventListeners in interface WorkingMemoryEventManager
Returns:
listeners The listeners.

addEventListener

public void addEventListener(AgendaEventListener listener)
Description copied from interface: WorkingMemoryEventManager
Add an event listener.

Specified by:
addEventListener in interface WorkingMemoryEventManager
Parameters:
listener - The listener to add.

removeEventListener

public void removeEventListener(AgendaEventListener listener)
Description copied from interface: WorkingMemoryEventManager
Remove an event listener.

Specified by:
removeEventListener in interface WorkingMemoryEventManager
Parameters:
listener - The listener to remove.

getAgendaEventListeners

public List getAgendaEventListeners()
Description copied from interface: WorkingMemoryEventManager
Returns all event listeners.

Specified by:
getAgendaEventListeners in interface WorkingMemoryEventManager
Returns:
listeners The listeners.

addEventListener

public void addEventListener(RuleBaseEventListener listener)
Description copied from interface: RuleBaseEventManager
Add an event listener.

Specified by:
addEventListener in interface RuleBaseEventManager
Parameters:
listener - The listener to add.

getRuleBaseEventListeners

public List getRuleBaseEventListeners()
Description copied from interface: RuleBaseEventManager
Returns all event listeners.

Specified by:
getRuleBaseEventListeners in interface RuleBaseEventManager
Returns:
listeners The listeners.

removeEventListener

public void removeEventListener(RuleBaseEventListener listener)
Description copied from interface: RuleBaseEventManager
Remove an event listener.

Specified by:
removeEventListener in interface RuleBaseEventManager
Parameters:
listener - The listener to remove.

setAgendaFilter

public void setAgendaFilter(AgendaFilter agendaFilter)
Specified by:
setAgendaFilter in interface StatelessSession

setGlobal

public void setGlobal(String identifier,
                      Object value)
Description copied from interface: StatelessSession
Sets a global value

Specified by:
setGlobal in interface StatelessSession

setGlobalResolver

public void setGlobalResolver(GlobalResolver globalResolver)
Description copied from interface: StatelessSession
Delegate used to resolve any global names not found in the global map.

Specified by:
setGlobalResolver in interface StatelessSession

setGlobalExporter

public void setGlobalExporter(GlobalExporter globalExporter)
Description copied from interface: StatelessSession
Used to specify a global exporting strategy so that global variables can be available to StatelessSessionResults. If this is not set, then StatelessSessionResult will have no globals.

Specified by:
setGlobalExporter in interface StatelessSession
Parameters:
globalExporter - The GlobalExporter instance

execute

public void execute(Object object)
Description copied from interface: StatelessSession
Insert a single fact, an fire the rules, returning when finished.

Specified by:
execute in interface StatelessSession

execute

public void execute(Object[] array)
Description copied from interface: StatelessSession
Insert an array of facts, an fire the rules, returning when finished. This will assert the list of facts as SEPARATE facts to the engine (NOT an array).

Specified by:
execute in interface StatelessSession

execute

public void execute(Collection collection)
Description copied from interface: StatelessSession
Insert a List of facts, an fire the rules, returning when finished. This will assert the list of facts as SEPARATE facts to the engine (NOT as a List).

Specified by:
execute in interface StatelessSession

asyncExecute

public void asyncExecute(Object object)
Description copied from interface: StatelessSession
This will assert the object in the background. This is "send and forget" execution.

Specified by:
asyncExecute in interface StatelessSession

asyncExecute

public void asyncExecute(Object[] array)
Description copied from interface: StatelessSession
This will assert the object array (as SEPARATE facts) in the background. This is "send and forget" execution.

Specified by:
asyncExecute in interface StatelessSession

asyncExecute

public void asyncExecute(Collection collection)
Description copied from interface: StatelessSession
This will assert the object List (as SEPARATE facts) in the background. This is "send and forget" execution.

Specified by:
asyncExecute in interface StatelessSession

executeWithResults

public StatelessSessionResult executeWithResults(Object object)
Description copied from interface: StatelessSession
Similar to the normal execute method, but this will return "results".

Specified by:
executeWithResults in interface StatelessSession

executeWithResults

public StatelessSessionResult executeWithResults(Object[] array)
Description copied from interface: StatelessSession
Similar to the normal execute method, but this will return "results".

Specified by:
executeWithResults in interface StatelessSession

executeWithResults

public StatelessSessionResult executeWithResults(Collection collection)
Description copied from interface: StatelessSession
Similar to the normal execute method, but this will return "results".

Specified by:
executeWithResults in interface StatelessSession


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.