Class 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 Detail

      • scope

        protected java.lang.String scope
        The scope (i.e., sub capability name).
    • 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 interface ICapability
        Returns:
        The scope.
      • getLogger

        public java.util.logging.Logger getLogger()
        Get the logger.
        Specified by:
        getLogger in interface ICapability
        Returns:
        The logger.
      • getModel

        public IModelInfo getModel()
        Get the capability model.
        Specified by:
        getModel in interface ICapability
        Returns:
        The capability model.
      • getAgentName

        public java.lang.String getAgentName()
        Get the agent name.
        Specified by:
        getAgentName in interface ICapability
        Returns:
        The agent name.
      • getConfigurationName

        public java.lang.String getConfigurationName()
        Get the configuration name.
        Specified by:
        getConfigurationName in interface ICapability
        Returns:
        The configuration name.
      • 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 by System.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 interface ICapability
        Returns:
        The current time.
      • getClassLoader

        public java.lang.ClassLoader getClassLoader()
        Get the classloader.
        Specified by:
        getClassLoader in interface ICapability
        Returns:
        The classloader.
      • killAgent

        public IFuture<java.util.Map<java.lang.String,​java.lang.Object>> killAgent()
        Kill the agent.
        Specified by:
        killAgent in interface ICapability
      • 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.