Package jadex.bdiv3.runtime.wrappers
Class EventPublisher
- java.lang.Object
-
- jadex.bdiv3.runtime.wrappers.EventPublisher
-
- All Implemented Interfaces:
IEventPublisher
public class EventPublisher extends java.lang.Object implements IEventPublisher
Helper object for publishing change events (beliefs, parameters).
-
-
Field Summary
Fields Modifier and Type Field Description protected jadex.rules.eca.EventType
addevent
The add event name.protected IInternalAccess
agent
The agent interpreter.protected jadex.rules.eca.EventType
changeevent
The change event name.protected IResultCommand<IFuture<java.lang.Void>,PropertyChangeEvent>
eventadder
The event adder.protected MElement
melement
The belief model.protected jadex.rules.eca.EventType
remevent
The remove event name.
-
Constructor Summary
Constructors Constructor Description EventPublisher(IInternalAccess agent, jadex.rules.eca.EventType addevent, jadex.rules.eca.EventType remevent, jadex.rules.eca.EventType changeevent, MElement melement)
Create a new publisher.EventPublisher(IInternalAccess agent, java.lang.String changeevent, MElement melement)
Create a new publisher.EventPublisher(IInternalAccess agent, java.lang.String addevent, java.lang.String remevent, java.lang.String changeevent, MElement melement)
Create a new publisher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
entryAdded(java.lang.Object value, int index)
An entry was added to the collection.void
entryAdded(java.lang.Object key, java.lang.Object value)
An entry was added to the map.void
entryChanged(java.lang.Object oldvalue, java.lang.Object newvalue, int index)
An entry was changed in the collection.void
entryChanged(java.lang.Object key, java.lang.Object oldvalue, java.lang.Object newvalue)
An entry was changed in the map.void
entryRemoved(java.lang.Object value, int index)
An entry was removed from the collection.void
entryRemoved(java.lang.Object key, java.lang.Object value)
An entry was removed from the map.protected jadex.rules.eca.EventType
getAddEvent()
Get the addevent.protected jadex.rules.eca.EventType
getChangeEvent()
Get the changeevent.protected jadex.rules.eca.EventType
getRemEvent()
Get the remevent.jadex.rules.eca.RuleSystem
getRuleSystem()
Get the rule system.void
observeValue(java.lang.Object val)
void
publishToolBeliefEvent()
void
unobserveValue(java.lang.Object val)
-
-
-
Field Detail
-
agent
protected IInternalAccess agent
The agent interpreter.
-
addevent
protected jadex.rules.eca.EventType addevent
The add event name.
-
remevent
protected jadex.rules.eca.EventType remevent
The remove event name.
-
changeevent
protected jadex.rules.eca.EventType changeevent
The change event name.
-
melement
protected MElement melement
The belief model.
-
eventadder
protected IResultCommand<IFuture<java.lang.Void>,PropertyChangeEvent> eventadder
The event adder.
-
-
Constructor Detail
-
EventPublisher
public EventPublisher(IInternalAccess agent, java.lang.String changeevent, MElement melement)
Create a new publisher.
-
EventPublisher
public EventPublisher(IInternalAccess agent, java.lang.String addevent, java.lang.String remevent, java.lang.String changeevent, MElement melement)
Create a new publisher.
-
EventPublisher
public EventPublisher(IInternalAccess agent, jadex.rules.eca.EventType addevent, jadex.rules.eca.EventType remevent, jadex.rules.eca.EventType changeevent, MElement melement)
Create a new publisher.
-
-
Method Detail
-
getRuleSystem
public jadex.rules.eca.RuleSystem getRuleSystem()
Get the rule system.- Returns:
- The rule system.
-
observeValue
public void observeValue(java.lang.Object val)
-
unobserveValue
public void unobserveValue(java.lang.Object val)
-
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
public void entryAdded(java.lang.Object value, int index)
An entry was added to the collection.- Specified by:
entryAdded
in interfaceIEventPublisher
-
entryRemoved
public void entryRemoved(java.lang.Object value, int index)
An entry was removed from the collection.- Specified by:
entryRemoved
in interfaceIEventPublisher
-
entryChanged
public void entryChanged(java.lang.Object oldvalue, java.lang.Object newvalue, int index)
An entry was changed in the collection.- Specified by:
entryChanged
in interfaceIEventPublisher
-
entryAdded
public void entryAdded(java.lang.Object key, java.lang.Object value)
An entry was added to the map.- Specified by:
entryAdded
in interfaceIEventPublisher
-
entryRemoved
public void entryRemoved(java.lang.Object key, java.lang.Object value)
An entry was removed from the map.- Specified by:
entryRemoved
in interfaceIEventPublisher
-
entryChanged
public void entryChanged(java.lang.Object key, java.lang.Object oldvalue, java.lang.Object newvalue)
An entry was changed in the map.- Specified by:
entryChanged
in interfaceIEventPublisher
-
-