Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2010 JBoss Inc
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.drools.runtime.rule;

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

See also:
org.drools.core.runtime.StatefulKnowledgeSession
public interface StatefulRuleSession {

    
Fire all Activations on the Agenda.

Returns:
returns the number of rules fired
    int fireAllRules();

    
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
    int fireAllRules(int max);

    
Fire all Activations on the Agenda

Parameters:
agendaFilter filters the activations that may fire
Returns:
returns the number of rules fired
    int fireAllRules(AgendaFilter agendaFilter);

    
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
    int fireAllRules(AgendaFilter agendaFilterint max);

    
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:
java.lang.IllegalStateException if this method is called when running in sequential mode
    public 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.

Parameters:
agendaFilter filters the activations that may fire
Throws:
java.lang.IllegalStateException if this method is called when running in sequential mode
    public void fireUntilHalt(final AgendaFilter agendaFilter);
New to GrepCode? Check out our FAQ X