Interface ProvidedObjectManager
- All Known Implementing Classes:
ProvidedObjectManagerImpl
public interface ProvidedObjectManager
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changeProvidedObjectObject
(ProvidedObjectID id, Object newObject) void
clear()
<T> ProvidedObjectID
createProvidedObject
(String name, T object, Class<? super T> type, PluginContext context) This method creates a new providedObjectID.<T> ProvidedObjectID
createProvidedObject
(String name, T object, PluginContext context) This method creates a new providedObjectID.createProvidedObjects
(PluginContext context) This method creates a list of new providedObjectIDs for each object in the PluginExecutionResult of the context.void
getProvidedObjectObject
(ProvidedObjectID id, boolean waitIfFuture) returns the provided object identified by this ID.Returns all provided Object IDs known to the framework.Class<?>
boolean
void
relabelProvidedObject
(ProvidedObjectID id, String label) void
setEnabled
(boolean enabled)
-
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
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
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
- Throws:
ProvidedObjectDeletedException
-
getProvidedObjectType
- Throws:
ProvidedObjectDeletedException
-
changeProvidedObjectObject
void changeProvidedObjectObject(ProvidedObjectID id, Object newObject) throws ProvidedObjectDeletedException - Throws:
ProvidedObjectDeletedException
-
deleteProvidedObject
- 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
- Throws:
ProvidedObjectDeletedException
-
setEnabled
void setEnabled(boolean enabled) -
isEnabled
boolean isEnabled() -
clear
void clear()
-