Drools :: Core 6.0.0.Beta5

org.drools.core
Interface StatefulSession

All Superinterfaces:
RuleBaseEventManager, org.kie.api.runtime.rule.SessionEntryPoint, WorkingMemory, WorkingMemoryEntryPoint, WorkingMemoryEventManager
All Known Implementing Classes:
ReteooStatefulSession

public interface StatefulSession
extends WorkingMemory

A stateful session represents a working memory which keeps state between invocations (accumulating facts/knowledge). Caution should be used when using the async methods (take note of the javadocs for specific methods). IMPORTANT: Remember to call dispose() when finished with this session.


Method Summary
 void dispose()
          Forces the workingMemory to be disconnected from the rulebase (not calling this may cause resource leaks).
 void fireUntilHalt()
          Keeps firing activations until a halt is called.
 void fireUntilHalt(AgendaFilter agendaFilter)
          Keeps firing activations until a halt is called.
 List getRuleBaseUpdateListeners()
           
 
Methods inherited from interface org.drools.core.WorkingMemory
clearActivationGroup, clearAgenda, clearAgendaGroup, clearRuleFlowGroup, fireAllRules, fireAllRules, fireAllRules, fireAllRules, getAgenda, getEnvironment, getFactHandle, getFactHandleByIdentity, getGlobal, getGlobalResolver, getObject, getProcessInstance, getProcessInstance, getProcessInstances, getQueryResults, getRuleBase, getSessionClock, getWorkingMemoryEntryPoint, getWorkItemManager, halt, iterateFactHandles, iterateFactHandles, iterateObjects, iterateObjects, setAsyncExceptionHandler, setFocus, setGlobal, setGlobalResolver, startProcess, startProcess
 
Methods inherited from interface org.drools.core.WorkingMemoryEventManager
addEventListener, addEventListener, getAgendaEventListeners, getWorkingMemoryEventListeners, removeEventListener, removeEventListener
 
Methods inherited from interface org.drools.core.RuleBaseEventManager
addEventListener, getRuleBaseEventListeners, removeEventListener
 
Methods inherited from interface org.drools.core.WorkingMemoryEntryPoint
insert, insert, retract, update
 
Methods inherited from interface org.kie.api.runtime.rule.SessionEntryPoint
delete, getEntryPointId, getFactCount, getFactHandles, getFactHandles, getObjects, getObjects
 

Method Detail

dispose

void dispose()
Forces the workingMemory to be disconnected from the rulebase (not calling this may cause resource leaks).

Specified by:
dispose in interface WorkingMemoryEntryPoint

getRuleBaseUpdateListeners

List getRuleBaseUpdateListeners()

fireUntilHalt

void fireUntilHalt()
Keeps firing activations until a halt is called. If in a given moment, there is no activation to fire, it will wait for an activation to be added to an active agenda group or rule flow group.

Throws:
IllegalStateException - if this method is called when running in sequential mode

fireUntilHalt

void fireUntilHalt(AgendaFilter agendaFilter)
Keeps firing activations until a halt is called. If in a given moment, there is no activation to fire, it will wait for an activation to be added to an active agenda group or rule flow group.

Parameters:
agendaFilter - filters the activations that may fire
Throws:
IllegalStateException - if this method is called when running in sequential mode

Drools :: Core 6.0.0.Beta5

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.