Interface ProvidedObjectManager

    • Method Detail

      • createProvidedObject

        <T> ProvidedObjectID createProvidedObject​(java.lang.String name,
                                                  T object,
                                                  java.lang.Class<? super T> type,
                                                  PluginContext context)
        This method creates a new providedObjectID. The context passed to this method should refer to the PluginContext of which the ProMFuture object is the result, i.e. this.getProvidedObjectObject(createProvidedObject( String name, PluginContext context)) = context.getFutureResult(); The object will be wrapped in a ProMFuture, and a new childContext is created for this ProMFuture
        Parameters:
        name - The label of the providedObject identified by the returned ProvidedObjectID (can be retrieved with getProvidedObjectLabel()
        object - the object to be wrapped in a new ProMFuture.
        type - the type of the object,
        Returns:
        a globally new id, identifying the providedObject
      • createProvidedObject

        <T> ProvidedObjectID createProvidedObject​(java.lang.String name,
                                                  T object,
                                                  PluginContext context)
        This method creates a new providedObjectID. The context passed to this method should refer to the PluginContext of which the ProMFuture object is the result, i.e. this.getProvidedObjectObject(createProvidedObject( String name, PluginContext context)) = context.getFutureResult(); The object will be wrapped in a ProMFuture, and a new childContext is created for this ProMFuture Note that no type is provided with this method. Instead, the framework will use the type of the given object, or if an @SubstitutionType annotation was used on the object's class definition, the substitution type is used.
        Parameters:
        name - The label of the providedObject identified by the returned ProvidedObjectID (can be retrieved with getProvidedObjectLabel()
        object - the object to be wrapped in a new ProMFuture.
        Returns:
        a globally new id, identifying the providedObject
      • createProvidedObjects

        java.util.List<ProvidedObjectID> createProvidedObjects​(PluginContext context)
        This method creates a list of new providedObjectIDs for each object in the PluginExecutionResult of the context.
        Parameters:
        context - The context of which this providedObject will be the result
        Returns:
        a list of globally new ids, identifying the providedObjects
      • getProvidedObjectObject

        java.lang.Object getProvidedObjectObject​(ProvidedObjectID id,
                                                 boolean waitIfFuture)
                                          throws ProvidedObjectDeletedException
        returns the provided object identified by this ID. Do not use this method if not necessary, as the providedObject might not exist in memory locally.
        Parameters:
        id -
        waitIfFuture - TODO
        Returns:
        Throws:
        ProvidedObjectDeletedException
      • getProvidedObjects

        java.util.List<ProvidedObjectID> getProvidedObjects()
        Returns all provided Object IDs known to the framework. The list is ordered in order of Arrival, i.e. the first objectID added to the framework is returned first.
        Returns:
      • setEnabled

        void setEnabled​(boolean enabled)
      • isEnabled

        boolean isEnabled()
      • clear

        void clear()