Package jadex.bdi.runtime.wrappers
Class EventPublisher
java.lang.Object
jadex.bdi.runtime.wrappers.EventPublisher
- All Implemented Interfaces:
IEventPublisher
Helper object for publishing change events (beliefs, parameters).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jadex.rules.eca.EventType
The add event name.protected jadex.core.IComponent
The agent interpreter.protected jadex.rules.eca.EventType
The change event name.protected jadex.common.IResultCommand
<jadex.future.IFuture<Void>, PropertyChangeEvent> The event adder.protected MElement
The belief model.protected jadex.rules.eca.EventType
The remove event name. -
Constructor Summary
ConstructorsConstructorDescriptionEventPublisher
(jadex.core.IComponent agent, jadex.rules.eca.EventType changeevent, MElement melement) Create a new publisher.EventPublisher
(jadex.core.IComponent agent, jadex.rules.eca.EventType addevent, jadex.rules.eca.EventType remevent, jadex.rules.eca.EventType changeevent, MElement melement) Create a new publisher. -
Method Summary
Modifier and TypeMethodDescriptionvoid
entryAdded
(Object value, int index) An entry was added to the collection.void
entryAdded
(Object key, Object value) An entry was added to the map.void
entryChanged
(Object oldvalue, Object newvalue, int index) An entry was changed in the collection.void
entryChanged
(Object key, Object oldvalue, Object newvalue) An entry was changed in the map.void
entryRemoved
(Object value, int index) An entry was removed from the collection.void
entryRemoved
(Object key, Object value) An entry was removed from the map.protected jadex.rules.eca.EventType
Get the addevent.protected jadex.rules.eca.EventType
Get the changeevent.protected jadex.rules.eca.EventType
Get the remevent.jadex.rules.eca.RuleSystem
Get the rule system.void
observeValue
(Object val) void
void
unobserveValue
(Object val)
-
Field Details
-
agent
protected jadex.core.IComponent agentThe agent interpreter. -
addevent
protected jadex.rules.eca.EventType addeventThe add event name. -
remevent
protected jadex.rules.eca.EventType remeventThe remove event name. -
changeevent
protected jadex.rules.eca.EventType changeeventThe change event name. -
melement
The belief model. -
eventadder
The event adder.
-
-
Constructor Details
-
EventPublisher
public EventPublisher(jadex.core.IComponent agent, jadex.rules.eca.EventType changeevent, MElement melement) Create a new publisher. -
EventPublisher
public EventPublisher(jadex.core.IComponent agent, jadex.rules.eca.EventType addevent, jadex.rules.eca.EventType remevent, jadex.rules.eca.EventType changeevent, MElement melement) Create a new publisher.
-
-
Method Details
-
getRuleSystem
public jadex.rules.eca.RuleSystem getRuleSystem()Get the rule system.- Returns:
- The rule system.
-
observeValue
-
unobserveValue
-
publishToolBeliefEvent
public void publishToolBeliefEvent() -
getAddEvent
protected jadex.rules.eca.EventType getAddEvent()Get the addevent.- Returns:
- The addevent
-
getRemEvent
protected jadex.rules.eca.EventType getRemEvent()Get the remevent.- Returns:
- The remevent
-
getChangeEvent
protected jadex.rules.eca.EventType getChangeEvent()Get the changeevent.- Returns:
- The changeevent
-
entryAdded
An entry was added to the collection.- Specified by:
entryAdded
in interfaceIEventPublisher
-
entryRemoved
An entry was removed from the collection.- Specified by:
entryRemoved
in interfaceIEventPublisher
-
entryChanged
An entry was changed in the collection.- Specified by:
entryChanged
in interfaceIEventPublisher
-
entryAdded
An entry was added to the map.- Specified by:
entryAdded
in interfaceIEventPublisher
-
entryRemoved
An entry was removed from the map.- Specified by:
entryRemoved
in interfaceIEventPublisher
-
entryChanged
An entry was changed in the map.- Specified by:
entryChanged
in interfaceIEventPublisher
-