Package jadex.bdi.runtime.impl
Class CapabilityPojoWrapper
java.lang.Object
jadex.bdi.runtime.impl.CapabilityPojoWrapper
- All Implemented Interfaces:
ICapability
Wrapper providing BDI methods to the user.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCapabilityPojoWrapper(Object pojo, String capa) Create a capability wrapper. -
Method Summary
Modifier and TypeMethodDescription<T> voidaddBeliefListener(String name, IBeliefListener<T> listener) Add a belief listener.jadex.core.IComponentgetAgent()Get the agent.Get the pojo capability object.<T> voidremoveBeliefListener(String name, IBeliefListener<T> listener) Remove a belief listener.
-
Field Details
-
pojo
The pojo capability object. -
capa
The fully qualified capability name (or null for agent).
-
-
Constructor Details
-
CapabilityPojoWrapper
Create a capability wrapper.
-
-
Method Details
-
addBeliefListener
Add a belief listener.- Specified by:
addBeliefListenerin interfaceICapability- Parameters:
name- The belief name.listener- The belief listener.
-
removeBeliefListener
Remove a belief listener.- Specified by:
removeBeliefListenerin interfaceICapability- 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
Get the pojo capability object.- Specified by:
getPojoCapabilityin interfaceICapability- Returns:
- The user defined java object for the capability.
-