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