Package jadex.rules.rulesystem
Interface IAgenda
-
- All Known Implementing Classes:
AbstractAgenda,FIFOAgenda,LIFOAgenda,PriorityAgenda
public interface IAgendaThe agenda interface for a rule system.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAgendaListener(IAgendaListener listener)Add an agenda listener.voidfireRule()Fire one activated rule.java.util.CollectiongetActivations()Get the current activations.java.util.ListgetHistory()Get the history.ActivationgetLastActivation()The last activation.ActivationgetNextActivation()Get the next activation.intgetState()Get the state of the agenda.booleanisEmpty()Test if the agenda is empty.booleanisHistoryEnabled()Get the history mode.voidremoveAgendaListener(IAgendaListener listener)Remove an agenda listener.voidsetHistoryEnabled(boolean enabled)Set the history mode.voidsetNextActivation(Activation next)Set the next activation.
-
-
-
Method Detail
-
fireRule
void fireRule()
Fire one activated rule.
-
getActivations
java.util.Collection getActivations()
Get the current activations.- Returns:
- The activations.
-
isEmpty
boolean isEmpty()
Test if the agenda is empty.- Returns:
- True if is empty.
-
getState
int getState()
Get the state of the agenda. Changes whenever the activation list changes.
-
getLastActivation
Activation getLastActivation()
The last activation. Represents the last rule that has been executed (or that is currently executing, if still running).- Returns:
- null, when no rule has been executed or when fireRule has been called on an empty agenda.
-
getNextActivation
Activation getNextActivation()
Get the next activation.- Returns:
- The next activation.
-
setNextActivation
void setNextActivation(Activation next)
Set the next activation.
-
isHistoryEnabled
boolean isHistoryEnabled()
Get the history mode.
-
setHistoryEnabled
void setHistoryEnabled(boolean enabled)
Set the history mode.
-
getHistory
java.util.List getHistory()
Get the history.- Returns:
- null, if history not enabled.
-
addAgendaListener
void addAgendaListener(IAgendaListener listener)
Add an agenda listener.
-
removeAgendaListener
void removeAgendaListener(IAgendaListener listener)
Remove an agenda listener.
-
-