Class EventPublisher

java.lang.Object
jadex.bdi.runtime.wrappers.EventPublisher
All Implemented Interfaces:
IEventPublisher

public class EventPublisher extends Object implements IEventPublisher
Helper object for publishing change events (beliefs, parameters).
  • Field Details

    • agent

      protected jadex.core.IComponent 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 jadex.common.IResultCommand<jadex.future.IFuture<Void>,PropertyChangeEvent> 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

      public void observeValue(Object val)
    • unobserveValue

      public void unobserveValue(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(Object value, int index)
      An entry was added to the collection.
      Specified by:
      entryAdded in interface IEventPublisher
    • entryRemoved

      public void entryRemoved(Object value, int index)
      An entry was removed from the collection.
      Specified by:
      entryRemoved in interface IEventPublisher
    • entryChanged

      public void entryChanged(Object oldvalue, Object newvalue, int index)
      An entry was changed in the collection.
      Specified by:
      entryChanged in interface IEventPublisher
    • entryAdded

      public void entryAdded(Object key, Object value)
      An entry was added to the map.
      Specified by:
      entryAdded in interface IEventPublisher
    • entryRemoved

      public void entryRemoved(Object key, Object value)
      An entry was removed from the map.
      Specified by:
      entryRemoved in interface IEventPublisher
    • entryChanged

      public void entryChanged(Object key, Object oldvalue, Object newvalue)
      An entry was changed in the map.
      Specified by:
      entryChanged in interface IEventPublisher