public class RulebaseAgent
extends java.lang.Object
implements jadex.bridge.service.types.ecarules.IRulebaseService
Modifier and Type | Field and Description |
---|---|
protected jadex.bridge.IInternalAccess |
agent
The agent.
|
protected java.util.Map<java.lang.Integer,jadex.commons.future.Future<java.lang.Void>> |
callfutures
callid -> future .
|
protected java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> |
opencalls
The open calls (callid -> set of event ids that have to be acked.
|
protected java.util.List<jadex.commons.future.SubscriptionIntermediateFuture<jadex.bridge.service.types.ecarules.IRulebaseEvent>> |
rbsubscribers
The subscriptions.
|
protected jadex.rules.eca.IRulebase |
rulebase
The rulebase.
|
Constructor and Description |
---|
RulebaseAgent() |
Modifier and Type | Method and Description |
---|---|
jadex.commons.future.IFuture<java.lang.Void> |
addRule(jadex.rules.eca.IRule<?> rule)
Add a new rule.
|
jadex.rules.eca.IRulebase |
getRulebase()
Get the rulebase.
|
protected void |
notifyCurrentState(jadex.commons.future.SubscriptionIntermediateFuture<jadex.bridge.service.types.ecarules.IRulebaseEvent> sub)
Notify the current state.
|
protected jadex.commons.future.IFuture<java.lang.Void> |
notifySubscribers(ARulebaseEvent event,
java.util.Set<java.lang.Integer> evs)
Notify all subscribers of an event.
|
jadex.commons.future.IFuture<java.lang.Void> |
removeRule(java.lang.String rulename)
Remove a rule.
|
jadex.commons.future.ISubscriptionIntermediateFuture<jadex.bridge.service.types.ecarules.IRulebaseEvent> |
subscribeToRulebase()
Subscribe to rule base changes.
|
protected jadex.bridge.IInternalAccess agent
protected java.util.List<jadex.commons.future.SubscriptionIntermediateFuture<jadex.bridge.service.types.ecarules.IRulebaseEvent>> rbsubscribers
protected jadex.rules.eca.IRulebase rulebase
protected java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> opencalls
protected java.util.Map<java.lang.Integer,jadex.commons.future.Future<java.lang.Void>> callfutures
public jadex.rules.eca.IRulebase getRulebase()
public jadex.commons.future.IFuture<java.lang.Void> addRule(jadex.rules.eca.IRule<?> rule)
addRule
in interface jadex.bridge.service.types.ecarules.IRulebaseService
rule
- The rule.public jadex.commons.future.IFuture<java.lang.Void> removeRule(java.lang.String rulename)
removeRule
in interface jadex.bridge.service.types.ecarules.IRulebaseService
rule
- The rule.public jadex.commons.future.ISubscriptionIntermediateFuture<jadex.bridge.service.types.ecarules.IRulebaseEvent> subscribeToRulebase()
subscribeToRulebase
in interface jadex.bridge.service.types.ecarules.IRulebaseService
protected jadex.commons.future.IFuture<java.lang.Void> notifySubscribers(ARulebaseEvent event, java.util.Set<java.lang.Integer> evs)
protected void notifyCurrentState(jadex.commons.future.SubscriptionIntermediateFuture<jadex.bridge.service.types.ecarules.IRulebaseEvent> sub)