Package jadex.rules.rulesystem
Interface IAgenda
-
- All Known Implementing Classes:
AbstractAgenda
,FIFOAgenda
,LIFOAgenda
,PriorityAgenda
public interface IAgenda
The agenda interface for a rule system.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAgendaListener(IAgendaListener listener)
Add an agenda listener.void
fireRule()
Fire one activated rule.java.util.Collection
getActivations()
Get the current activations.java.util.List
getHistory()
Get the history.Activation
getLastActivation()
The last activation.Activation
getNextActivation()
Get the next activation.int
getState()
Get the state of the agenda.boolean
isEmpty()
Test if the agenda is empty.boolean
isHistoryEnabled()
Get the history mode.void
removeAgendaListener(IAgendaListener listener)
Remove an agenda listener.void
setHistoryEnabled(boolean enabled)
Set the history mode.void
setNextActivation(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.
-
-