Interface ProvidedObjectManager

All Known Implementing Classes:
ProvidedObjectManagerImpl

public interface ProvidedObjectManager
  • Method Details

    • getProvidedObjectLifeCylceListeners

      ProvidedObjectLifeCycleListener.ListenerList getProvidedObjectLifeCylceListeners()
    • createProvidedObject

      <T> ProvidedObjectID createProvidedObject(String name, T object, 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(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

      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

      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
    • getProvidedObjectLabel

      String getProvidedObjectLabel(ProvidedObjectID id) throws ProvidedObjectDeletedException
      Throws:
      ProvidedObjectDeletedException
    • getProvidedObjectType

      Class<?> getProvidedObjectType(ProvidedObjectID id) throws ProvidedObjectDeletedException
      Throws:
      ProvidedObjectDeletedException
    • changeProvidedObjectObject

      void changeProvidedObjectObject(ProvidedObjectID id, Object newObject) throws ProvidedObjectDeletedException
      Throws:
      ProvidedObjectDeletedException
    • deleteProvidedObject

      void deleteProvidedObject(ProvidedObjectID id) throws ProvidedObjectDeletedException
      Throws:
      ProvidedObjectDeletedException
    • getProvidedObjects

      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:
    • relabelProvidedObject

      void relabelProvidedObject(ProvidedObjectID id, String label) throws ProvidedObjectDeletedException
      Throws:
      ProvidedObjectDeletedException
    • setEnabled

      void setEnabled(boolean enabled)
    • isEnabled

      boolean isEnabled()
    • clear

      void clear()