Package jadex.platform.service.ecarules
Class RuleAgent
- java.lang.Object
- 
- jadex.platform.service.ecarules.RulebaseAgent
- 
- jadex.platform.service.ecarules.RuleAgent
 
 
- 
- All Implemented Interfaces:
- IRulebaseService,- IRuleEngineService,- IRuleService
 
 public class RuleAgent extends RulebaseAgent implements IRuleService Agent that exposes an eca rule engine as service. Allows for adding/removing rules and getting events.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.List<SubscriptionIntermediateFuture<RuleEvent>>resubscribersThe subscriptions.protected RuleSystemrulesystemThe rule engine.- 
Fields inherited from class jadex.platform.service.ecarules.RulebaseAgentagent, callfutures, opencalls, rbsubscribers, rulebase
 
- 
 - 
Constructor SummaryConstructors Constructor Description RuleAgent()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IIntermediateFuture<RuleEvent>addEvent(IEvent event)Add an external event to the rule engine.IRulebasegetRulebase()Get the rulebase.IFuture<java.lang.Void>init()Init method.protected voidpublishEvent(RuleEvent event)ISubscriptionIntermediateFuture<RuleEvent>subscribeToEngine()Subscribe to rule executions.- 
Methods inherited from class jadex.platform.service.ecarules.RulebaseAgentaddRule, notifyCurrentState, notifySubscribers, removeRule, subscribeToRulebase
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface jadex.bridge.service.types.ecarules.IRulebaseServiceaddRule, removeRule, subscribeToRulebase
 
- 
 
- 
- 
- 
Field Detail- 
rulesystemprotected RuleSystem rulesystem The rule engine.
 - 
resubscribersprotected java.util.List<SubscriptionIntermediateFuture<RuleEvent>> resubscribers The subscriptions.
 
- 
 - 
Method Detail- 
initpublic IFuture<java.lang.Void> init() Init method.
 - 
getRulebasepublic IRulebase getRulebase() Get the rulebase.- Overrides:
- getRulebasein class- RulebaseAgent
 
 - 
addEventpublic IIntermediateFuture<RuleEvent> addEvent(IEvent event) Add an external event to the rule engine. It will process the event and fire rules accordingly.- Specified by:
- addEventin interface- IRuleEngineService
- Parameters:
- event- The event.
 
 - 
subscribeToEnginepublic ISubscriptionIntermediateFuture<RuleEvent> subscribeToEngine() Subscribe to rule executions.- Specified by:
- subscribeToEnginein interface- IRuleEngineService
 
 - 
publishEventprotected void publishEvent(RuleEvent event) 
 
- 
 
-