org.drools.runtime.rule
Interface StatefulRuleSession

All Known Subinterfaces:
StatefulKnowledgeSession

public interface StatefulRuleSession

An interface for all StatefulRuleSession methods. This interface adds methods available to the StatefulKnowledgeSession beyond what the WorkingMemory provides.

See Also:
StatefulKnowledgeSession

Method Summary
 int fireAllRules()
          Fire all Activations on the Agenda.
 int fireAllRules(AgendaFilter agendaFilter)
          Fire all Activations on the Agenda
 int fireAllRules(AgendaFilter agendaFilter, int max)
          Fire all Activations on the Agenda
 int fireAllRules(int max)
          Fire Activations on the Agenda up to the given maximum number of activations, before returning the control to the application.
 void fireUntilHalt()
          Keeps firing activations until a halt is called.
 void fireUntilHalt(AgendaFilter agendaFilter)
          Keeps firing activations until a halt is called.
 

Method Detail

fireAllRules

int fireAllRules()
Fire all Activations on the Agenda.

Returns:
returns the number of rules fired

fireAllRules

int fireAllRules(int max)
Fire Activations on the Agenda up to the given maximum number of activations, before returning the control to the application. In case the application wants to continue firing the rules later, from the point where it stopped, it just needs to call fireAllRules() again.

Parameters:
max - the maximum number of rules that should be fired
Returns:
returns the number of rules fired

fireAllRules

int fireAllRules(AgendaFilter agendaFilter)
Fire all Activations on the Agenda

Parameters:
agendaFilter - filters the activations that may fire
Returns:
returns the number of rules fired

fireAllRules

int fireAllRules(AgendaFilter agendaFilter,
                 int max)
Fire all Activations on the Agenda

Parameters:
agendaFilter - filters the activations that may fire
max - the maximum number of rules that should be fired
Returns:
returns the number of rules fired

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. This blocks the thread until halt is called.

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. This blocks the thread until halt is called.

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


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