Package jadex.bdiv3x.runtime
Class CapabilityWrapper
- java.lang.Object
-
- jadex.bdiv3x.runtime.CapabilityWrapper
-
- All Implemented Interfaces:
ICapability
public class CapabilityWrapper extends java.lang.Object implements ICapability
XML version of the capability. Is a facade to the old API.
-
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccess
agent
The agent.protected ICapability
capa
The capa.protected java.lang.String
scope
The scope (i.e., sub capability name).
-
Constructor Summary
Constructors Constructor Description CapabilityWrapper(IInternalAccess agent, java.lang.String scope)
Create a new capability.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IModelInfo
getAgentModel()
Get the agent model.java.lang.String
getAgentName()
Get the agent name.IBeliefbase
getBeliefbase()
Get the belief base.java.lang.ClassLoader
getClassLoader()
Get the classloader.IComponentDescription
getComponentDescription()
Get the component description.IComponentIdentifier
getComponentIdentifier()
Get the agent identifier.java.lang.String
getConfigurationName()
Get the configuration name.IEventbase
getEventbase()
Get the event base.IExpressionbase
getExpressionbase()
Get the expression base.IExternalAccess
getExternalAccess()
Get the scope.static IValueFetcher
getFetcher(IInternalAccess agent, java.lang.String scope)
Get the capability-specific fetcher (scope==null for agent scope).static IValueFetcher
getFetcher(IInternalAccess agent, java.lang.String scope, java.util.Map<java.lang.String,java.lang.Object> values)
Get the capability-specific fetcher (scope==null for agent scope).IGoalbase
getGoalbase()
Get the goal base.java.util.logging.Logger
getLogger()
Get the logger.IModelInfo
getModel()
Get the capability model.IPlanbase
getPlanbase()
Get the plan base.long
getTime()
Get the current time.IFuture<java.util.Map<java.lang.String,java.lang.Object>>
killAgent()
Kill the agent.ISubscriptionIntermediateFuture<IMonitoringEvent>
subscribeToEvents(IFilter<IMonitoringEvent> filter, boolean initial, IMonitoringService.PublishEventLevel elm)
Subscribe to monitoring events.
-
-
-
Field Detail
-
agent
protected IInternalAccess agent
The agent.
-
scope
protected java.lang.String scope
The scope (i.e., sub capability name).
-
capa
protected ICapability capa
The capa.
-
-
Constructor Detail
-
CapabilityWrapper
public CapabilityWrapper(IInternalAccess agent, java.lang.String scope)
Create a new capability.
-
-
Method Detail
-
getExternalAccess
public IExternalAccess getExternalAccess()
Get the scope. Method with IExternalAccess return value included for compatibility with IInternalAccess.- Specified by:
getExternalAccess
in interfaceICapability
- Returns:
- The scope.
-
getBeliefbase
public IBeliefbase getBeliefbase()
Get the belief base.- Specified by:
getBeliefbase
in interfaceICapability
- Returns:
- The belief base.
-
getGoalbase
public IGoalbase getGoalbase()
Get the goal base.- Specified by:
getGoalbase
in interfaceICapability
- Returns:
- The goal base.
-
getPlanbase
public IPlanbase getPlanbase()
Get the plan base.- Specified by:
getPlanbase
in interfaceICapability
- Returns:
- The plan base.
-
getEventbase
public IEventbase getEventbase()
Get the event base.- Specified by:
getEventbase
in interfaceICapability
- Returns:
- The event base.
-
getExpressionbase
public IExpressionbase getExpressionbase()
Get the expression base.- Specified by:
getExpressionbase
in interfaceICapability
- Returns:
- The expression base.
-
getLogger
public java.util.logging.Logger getLogger()
Get the logger.- Specified by:
getLogger
in interfaceICapability
- Returns:
- The logger.
-
getAgentModel
public IModelInfo getAgentModel()
Get the agent model.- Specified by:
getAgentModel
in interfaceICapability
- Returns:
- The agent model.
-
getModel
public IModelInfo getModel()
Get the capability model.- Specified by:
getModel
in interfaceICapability
- Returns:
- The capability model.
-
getAgentName
public java.lang.String getAgentName()
Get the agent name.- Specified by:
getAgentName
in interfaceICapability
- Returns:
- The agent name.
-
getConfigurationName
public java.lang.String getConfigurationName()
Get the configuration name.- Specified by:
getConfigurationName
in interfaceICapability
- Returns:
- The configuration name.
-
getComponentIdentifier
public IComponentIdentifier getComponentIdentifier()
Get the agent identifier.- Specified by:
getComponentIdentifier
in interfaceICapability
- Returns:
- The agent identifier.
-
getComponentDescription
public IComponentDescription getComponentDescription()
Get the component description.- Specified by:
getComponentDescription
in interfaceICapability
- Returns:
- The component description.
-
getTime
public long getTime()
Get the current time. The time unit depends on the currently running clock implementation. For the default system clock, the time value adheres to the time representation as used bySystem.currentTimeMillis()
, i.e., the value of milliseconds passed since 0:00 'o clock, January 1st, 1970, UTC. For custom simulation clocks, arbitrary representations can be used.- Specified by:
getTime
in interfaceICapability
- Returns:
- The current time.
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Get the classloader.- Specified by:
getClassLoader
in interfaceICapability
- Returns:
- The classloader.
-
killAgent
public IFuture<java.util.Map<java.lang.String,java.lang.Object>> killAgent()
Kill the agent.- Specified by:
killAgent
in interfaceICapability
-
subscribeToEvents
public ISubscriptionIntermediateFuture<IMonitoringEvent> subscribeToEvents(IFilter<IMonitoringEvent> filter, boolean initial, IMonitoringService.PublishEventLevel elm)
Subscribe to monitoring events.- Specified by:
subscribeToEvents
in interfaceICapability
- Parameters:
filter
- An optional filter.
-
getFetcher
public static IValueFetcher getFetcher(IInternalAccess agent, java.lang.String scope)
Get the capability-specific fetcher (scope==null for agent scope).
-
getFetcher
public static IValueFetcher getFetcher(IInternalAccess agent, java.lang.String scope, java.util.Map<java.lang.String,java.lang.Object> values)
Get the capability-specific fetcher (scope==null for agent scope). Also creates a new fetcher, if values are given.
-
-