Class Blackboard<T>
- java.lang.Object
-
- de.uka.ipd.sdq.workflow.blackboard.Blackboard<T>
-
- Type Parameters:
T- The type of the partitions of the blackboard
- All Implemented Interfaces:
IBlackboard<T>
- Direct Known Subclasses:
MDSDBlackboard
public class Blackboard<T> extends Object implements IBlackboard<T>
A blackboard is a storage space where workflow jobs can retrieve and store data from respectively to. It implements the well known architecture pattern "Blackboard" of POSA I The blackboard contains information pieces called partitions. Each partition contains data needed for a specific type of job. For example, in a compiler, there would be a partition called symbol table to store the detected variable declarations.
-
-
Constructor Summary
Constructors Constructor Description Blackboard()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPartition(String id, T partition)Add a specific partition to the blackboard.TgetPartition(String id)Get a specific partition from the blackboard identified by the id it was registered with.booleanhasPartition(String id)Query the blackboard for a named partition.voidremovePartition(String id)Remove a named partition from the blackboard.
-
-
-
Method Detail
-
addPartition
public void addPartition(String id, T partition)
Add a specific partition to the blackboard.- Specified by:
addPartitionin interfaceIBlackboard<T>- Parameters:
id- The identifier for the partition to add.partition- The partition itself.- See Also:
IBlackboard.addPartition(java.lang.String, java.lang.Object)
-
getPartition
public T getPartition(String id)
Get a specific partition from the blackboard identified by the id it was registered with.- Specified by:
getPartitionin interfaceIBlackboard<T>- Parameters:
id- The id to get the partition for.- Returns:
- The requested partition or null if none matching found.
- See Also:
IBlackboard.getPartition(java.lang.String)
-
hasPartition
public boolean hasPartition(String id)
Description copied from interface:IBlackboardQuery the blackboard for a named partition.- Specified by:
hasPartitionin interfaceIBlackboard<T>- Parameters:
id- The ID of the named partition- Returns:
- true if the partition exists on the blackboard
-
removePartition
public void removePartition(String id)
Description copied from interface:IBlackboardRemove a named partition from the blackboard.- Specified by:
removePartitionin interfaceIBlackboard<T>- Parameters:
id- ID of the partition to removeS
-
-