Interface IEnvironmentSpace

    • Method Detail

      • getExternalAccess

        IExternalAccess getExternalAccess()
        Get the component of the space.
      • addPerceptType

        void addPerceptType​(PerceptType percepttype)
        Add a space percept type.
        Parameters:
        typename - The percept name.
        objecttypes - The objecttypes.
        componenttypes - The componenttypes.
      • removePerceptType

        void removePerceptType​(java.lang.String typename)
        Remove a space process type.
        Parameters:
        typename - The type name.
      • getPerceptType

        PerceptType getPerceptType​(java.lang.String percepttype)
        Get a space percept type.
        Parameters:
        percepttype - The name of the percept type.
        Returns:
        The percept type.
      • addSpaceProcessType

        void addSpaceProcessType​(java.lang.String typename,
                                 java.lang.Class clazz,
                                 java.util.List properties)
        Add a space process type.
        Parameters:
        typename - The type name.
        properties - The properties (list of maps with name/value/dynamic).
      • removeSpaceProcessType

        void removeSpaceProcessType​(java.lang.String typename)
        Remove a space process type.
        Parameters:
        typename - The type name.
      • createSpaceProcess

        void createSpaceProcess​(java.lang.String type,
                                java.util.Map props)
        Creates a space process.
        Parameters:
        id - ID of the space process
        type - The process type.
      • getSpaceProcess

        ISpaceProcess getSpaceProcess​(java.lang.Object id)
        Returns a space process.
        Parameters:
        id - ID of the space process
        Returns:
        the space process or null if not found
      • removeSpaceProcess

        void removeSpaceProcess​(java.lang.Object id)
        Removes a space process.
        Parameters:
        id - ID of the space process
      • createSpaceObject

        ISpaceObject createSpaceObject​(java.lang.String typename,
                                       java.util.Map properties,
                                       java.util.List tasks)
        Creates an object in this space.
        Parameters:
        typename - the object's type
        properties - initial properties (may be null)
        tasks - initial task list (may be null)
        Returns:
        the object.
      • addSpaceObjectType

        void addSpaceObjectType​(java.lang.String typename,
                                IPropertyMetaDataSet properties)
        Add a space object type.
        Parameters:
        typename - The type name.
        properties - The properties (map of maps with name->name/value/dynamic/event).
      • removeSpaceObjectType

        void removeSpaceObjectType​(java.lang.String typename)
        Remove a space object type.
        Parameters:
        typename - The type name.
      • destroySpaceObject

        void destroySpaceObject​(java.lang.Object id)
        Destroys an object in this space.
        Parameters:
        id - the object's ID
      • getSpaceObject

        ISpaceObject getSpaceObject​(java.lang.Object id)
        Returns an object in this space.
        Parameters:
        id - the object's ID
        Returns:
        the object in this space
      • getSpaceObjectsByType

        ISpaceObject[] getSpaceObjectsByType​(java.lang.String type)
        Get all space object of a specific type.
        Parameters:
        type - The space object type.
        Returns:
        The space objects of the desired type.
      • addObjectTaskType

        void addObjectTaskType​(java.lang.String typename,
                               java.lang.Class clazz,
                               java.util.List properties)
        Add a object task type.
        Parameters:
        typename - The type name.
        properties - The properties (list of maps with name/value/dynamic).
      • removeObjectTaskType

        void removeObjectTaskType​(java.lang.String typename)
        Remove an object task type.
        Parameters:
        typename - The type name.
      • createObjectTask

        java.lang.Object createObjectTask​(java.lang.String typename,
                                          java.util.Map properties,
                                          java.lang.Object objectid)
        Creates an object task.
        Parameters:
        typename - The type name.
        properties - The properties.
        Returns:
        The task id.
      • removeObjectTask

        void removeObjectTask​(java.lang.Object taskid,
                              java.lang.Object objectid)
        Remove an object task.
        Parameters:
        typename - The type name.
        properties - The properties.
      • addTaskListener

        void addTaskListener​(java.lang.Object taskid,
                             java.lang.Object objectid,
                             IResultListener listener)
        Add a result listener to an object task. The listener result will be the task id. If the task is already finished, the listener will be notified.
      • removeTaskListener

        void removeTaskListener​(java.lang.Object taskid,
                                java.lang.Object objectid,
                                IResultListener listener)
        Remove a result listener from an object task.
      • waitForTask

        IFuture<java.lang.Void> waitForTask​(java.lang.Object taskid,
                                            java.lang.Object objectid)
        Add a result listener to an object task. The listener result will be the task id. If the task is already finished, the listener will be notified.
      • addSpaceAction

        void addSpaceAction​(java.lang.String name,
                            ISpaceAction action)
        Adds an space action.
        Parameters:
        name - the action ID
        action - the action
      • removeSpaceAction

        void removeSpaceAction​(java.lang.String name)
        Removes an space action.
        Parameters:
        name - the action ID
      • performSpaceAction

        int performSpaceAction​(java.lang.String name,
                               java.util.Map parameters,
                               IResultListener listener)
        Perform an space action. It will be executed according to the space execution policy (e.g. at the end of a round).
        Parameters:
        name - Id of the action
        parameters - parameters for the action (may be null)
        listener - the result listener
        Returns:
        The id of the action instance for later access.
      • cancelSpaceAction

        void cancelSpaceAction​(int id)
        Cancel a queued space action.
      • addPerceptGenerator

        void addPerceptGenerator​(java.lang.Object id,
                                 IPerceptGenerator gen)
        Adds a percept generator.
        Parameters:
        id - The percept generator id.
        gen - The percept generator.
      • removePerceptGenerator

        void removePerceptGenerator​(java.lang.Object id)
        Remove a percept generator.
        Parameters:
        id - The percept generator id.
      • setOwner

        void setOwner​(java.lang.Object id,
                      IComponentDescription owner)
        Set the owner of an object.
        Parameters:
        id - The object id.
        owner - The object owner.
      • addDataView

        void addDataView​(java.lang.String name,
                         IDataView view)
        Adds a dataview to the space.
        Parameters:
        name - name of the view
        view - the view
      • removeDataView

        void removeDataView​(java.lang.String name)
        Removes a dataview from the space.
        Parameters:
        name - name of the dataview
      • getDataView

        IDataView getDataView​(java.lang.String name)
        Gets a specific dataview.
        Parameters:
        name - name of the dataview
        Returns:
        the dataview
      • getDataViews

        java.util.Map getDataViews()
        Get all available dataviews in this space.
        Returns:
        all available dataviews
      • addEnvironmentListener

        void addEnvironmentListener​(IEnvironmentListener listener)
        Add an environment listener.
        Parameters:
        listener - The environment listener.
      • removeEnvironmentListener

        void removeEnvironmentListener​(IEnvironmentListener listener)
        Remove an environment listener.
        Parameters:
        listener - The environment listener.