Class CapabilityPojoWrapper

java.lang.Object
jadex.bdi.runtime.impl.CapabilityPojoWrapper
All Implemented Interfaces:
ICapability

public class CapabilityPojoWrapper extends Object implements ICapability
Wrapper providing BDI methods to the user.
  • Field Details

    • pojo

      protected Object pojo
      The pojo capability object.
    • capa

      protected String capa
      The fully qualified capability name (or null for agent).
  • Constructor Details

    • CapabilityPojoWrapper

      public CapabilityPojoWrapper(Object pojo, String capa)
      Create a capability wrapper.
  • Method Details

    • addBeliefListener

      public <T> void addBeliefListener(String name, IBeliefListener<T> listener)
      Add a belief listener.
      Specified by:
      addBeliefListener in interface ICapability
      Parameters:
      name - The belief name.
      listener - The belief listener.
    • removeBeliefListener

      public <T> void removeBeliefListener(String name, IBeliefListener<T> listener)
      Remove a belief listener.
      Specified by:
      removeBeliefListener in interface ICapability
      Parameters:
      name - The belief name.
      listener - The belief listener.
    • getAgent

      public jadex.core.IComponent getAgent()
      Get the agent. Overridden to save the capability context within the used internal access.
    • getPojoCapability

      public Object getPojoCapability()
      Get the pojo capability object.
      Specified by:
      getPojoCapability in interface ICapability
      Returns:
      The user defined java object for the capability.