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 IInternalAccessagentThe agent.protected ICapabilitycapaThe capa.protected java.lang.StringscopeThe 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 IModelInfogetAgentModel()Get the agent model.java.lang.StringgetAgentName()Get the agent name.IBeliefbasegetBeliefbase()Get the belief base.java.lang.ClassLoadergetClassLoader()Get the classloader.IComponentDescriptiongetComponentDescription()Get the component description.IComponentIdentifiergetComponentIdentifier()Get the agent identifier.java.lang.StringgetConfigurationName()Get the configuration name.IEventbasegetEventbase()Get the event base.IExpressionbasegetExpressionbase()Get the expression base.IExternalAccessgetExternalAccess()Get the scope.static IValueFetchergetFetcher(IInternalAccess agent, java.lang.String scope)Get the capability-specific fetcher (scope==null for agent scope).static IValueFetchergetFetcher(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).IGoalbasegetGoalbase()Get the goal base.java.util.logging.LoggergetLogger()Get the logger.IModelInfogetModel()Get the capability model.IPlanbasegetPlanbase()Get the plan base.longgetTime()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:
getExternalAccessin interfaceICapability- Returns:
- The scope.
-
getBeliefbase
public IBeliefbase getBeliefbase()
Get the belief base.- Specified by:
getBeliefbasein interfaceICapability- Returns:
- The belief base.
-
getGoalbase
public IGoalbase getGoalbase()
Get the goal base.- Specified by:
getGoalbasein interfaceICapability- Returns:
- The goal base.
-
getPlanbase
public IPlanbase getPlanbase()
Get the plan base.- Specified by:
getPlanbasein interfaceICapability- Returns:
- The plan base.
-
getEventbase
public IEventbase getEventbase()
Get the event base.- Specified by:
getEventbasein interfaceICapability- Returns:
- The event base.
-
getExpressionbase
public IExpressionbase getExpressionbase()
Get the expression base.- Specified by:
getExpressionbasein interfaceICapability- Returns:
- The expression base.
-
getLogger
public java.util.logging.Logger getLogger()
Get the logger.- Specified by:
getLoggerin interfaceICapability- Returns:
- The logger.
-
getAgentModel
public IModelInfo getAgentModel()
Get the agent model.- Specified by:
getAgentModelin interfaceICapability- Returns:
- The agent model.
-
getModel
public IModelInfo getModel()
Get the capability model.- Specified by:
getModelin interfaceICapability- Returns:
- The capability model.
-
getAgentName
public java.lang.String getAgentName()
Get the agent name.- Specified by:
getAgentNamein interfaceICapability- Returns:
- The agent name.
-
getConfigurationName
public java.lang.String getConfigurationName()
Get the configuration name.- Specified by:
getConfigurationNamein interfaceICapability- Returns:
- The configuration name.
-
getComponentIdentifier
public IComponentIdentifier getComponentIdentifier()
Get the agent identifier.- Specified by:
getComponentIdentifierin interfaceICapability- Returns:
- The agent identifier.
-
getComponentDescription
public IComponentDescription getComponentDescription()
Get the component description.- Specified by:
getComponentDescriptionin 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:
getTimein interfaceICapability- Returns:
- The current time.
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Get the classloader.- Specified by:
getClassLoaderin interfaceICapability- Returns:
- The classloader.
-
killAgent
public IFuture<java.util.Map<java.lang.String,java.lang.Object>> killAgent()
Kill the agent.- Specified by:
killAgentin interfaceICapability
-
subscribeToEvents
public ISubscriptionIntermediateFuture<IMonitoringEvent> subscribeToEvents(IFilter<IMonitoringEvent> filter, boolean initial, IMonitoringService.PublishEventLevel elm)
Subscribe to monitoring events.- Specified by:
subscribeToEventsin 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.
-
-