Package jadex.bdiv3

Class BDIAgentFactory

    • Field Detail

      • NOPLATFORM_DEFAULT_FEATURES

        public static final java.util.Collection<IComponentFeatureFactory> NOPLATFORM_DEFAULT_FEATURES
        The default component features.
      • FILETYPE_BDIAGENT

        public static final java.lang.String FILETYPE_BDIAGENT
        The BDI agent model type name (human readable for display).
        See Also:
        Constant Field Values
      • FILETYPE_BDICAPA

        public static final java.lang.String FILETYPE_BDICAPA
        The BDI capability model type name (human readable for display).
        See Also:
        Constant Field Values
      • TYPE

        public static final java.lang.String TYPE
        The model type identifier for use in the @Agent annotation.
        See Also:
        Constant Field Values
      • CAPA_TYPE

        public static final java.lang.String CAPA_TYPE
        The model type identifier for a capability.
        See Also:
        Constant Field Values
      • ICON

        protected static final LazyResource ICON
        The image icon.
      • BDI_FEATURES

        public static final java.util.Collection<IComponentFeatureFactory> BDI_FEATURES
        The specific component features for micro agents.
      • loader

        protected BDIModelLoader loader
        The application model loader.
    • Constructor Detail

      • BDIAgentFactory

        public BDIAgentFactory​(IInternalAccess provider)
        Create a new agent factory.
      • BDIAgentFactory

        public BDIAgentFactory​(IInternalAccess provider,
                               java.util.Map<java.lang.String,​java.lang.Object> properties)
        Create a new agent factory.
      • BDIAgentFactory

        public BDIAgentFactory​(java.lang.String providerid)
        Create a new agent factory for startup.
        Parameters:
        platform - The platform.
    • Method Detail

      • setFeatures

        public void setFeatures​(java.util.Collection<IComponentFeatureFactory> features)
        Set the features.
        Parameters:
        features - The features to set.
      • loadModel

        public IFuture<IModelInfo> loadModel​(java.lang.String model,
                                             java.lang.Object pojo,
                                             java.lang.String[] imports,
                                             IResourceIdentifier rid)
        Load a model.
        Specified by:
        loadModel in interface IComponentFactory
        Parameters:
        model - The model (e.g. file name).
        The - imports (if any).
        Returns:
        The loaded model.
      • isLoadable

        public IFuture<java.lang.Boolean> isLoadable​(java.lang.String model,
                                                     java.lang.Object pojo,
                                                     java.lang.String[] imports,
                                                     IResourceIdentifier rid)
        Test if a model can be loaded by the factory.
        Specified by:
        isLoadable in interface IComponentFactory
        Parameters:
        model - The model (e.g. file name).
        The - imports (if any).
        Returns:
        True, if model can be loaded.
      • getLoadableType

        public static java.lang.String getLoadableType​(SClassReader.ClassInfo ci)
        Get the model type from the class info.
        Returns:
        null, if no BDI model.
      • getLibraryService

        protected ILibraryService getLibraryService()
        Get the library service
      • isStartable

        public IFuture<java.lang.Boolean> isStartable​(java.lang.String model,
                                                      java.lang.Object pojo,
                                                      java.lang.String[] imports,
                                                      IResourceIdentifier rid)
        Test if a model is startable (e.g. an component).
        Specified by:
        isStartable in interface IComponentFactory
        Parameters:
        model - The model (e.g. file name).
        The - imports (if any).
        Returns:
        True, if startable (and loadable).
      • getComponentTypes

        public java.lang.String[] getComponentTypes()
        Get the names of ADF file types supported by this factory.
        Specified by:
        getComponentTypes in interface IComponentFactory
      • getComponentType

        public IFuture<java.lang.String> getComponentType​(java.lang.String model,
                                                          java.lang.String[] imports,
                                                          IResourceIdentifier rid)
        Get the component type of a model.
        Specified by:
        getComponentType in interface IComponentFactory
        Parameters:
        model - The model (e.g. file name).
        The - imports (if any).
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getProperties​(java.lang.String type)
        Get the properties. Arbitrary properties that can e.g. be used to define kernel-specific settings to configure tools.
        Specified by:
        getProperties in interface IComponentFactory
        Parameters:
        type - The component type.
        Returns:
        The properties or null, if the component type is not supported by this factory.
      • addExcludedMethods

        public static void addExcludedMethods​(java.util.Map<java.lang.String,​java.lang.String[]> props,
                                              java.lang.String[] excludes)
        Add excluded methods.