Package de.uka.ipd.sdq.workflow.jobs
Class SequentialBlackboardInteractingJob<BlackboardType extends Blackboard<?>>
- java.lang.Object
-
- de.uka.ipd.sdq.workflow.jobs.AbstractJob
-
- de.uka.ipd.sdq.workflow.jobs.AbstractCompositeJob
-
- de.uka.ipd.sdq.workflow.jobs.SequentialJob
-
- de.uka.ipd.sdq.workflow.jobs.SequentialBlackboardInteractingJob<BlackboardType>
-
- Type Parameters:
BlackboardType
- The type of the blackboard needed by all jobs in the sequential workflow
- All Implemented Interfaces:
IBlackboardInteractingJob<BlackboardType>
,ICompositeJob
,IJob
,Iterable<IJob>
,Collection<IJob>
,List<IJob>
- Direct Known Subclasses:
AbstractExtendableJob
,AbstractWorkflowExtensionJob
public class SequentialBlackboardInteractingJob<BlackboardType extends Blackboard<?>> extends SequentialJob implements IBlackboardInteractingJob<BlackboardType>
A sequential workflow which may contain jobs which need access to a common blackboard for information exchange. By default, the cleanup method of all jobs is called right after their execution before starting the next job. In addition, the job is removed from the job list to ensure, objects are freed for the garbage collection.
-
-
Field Summary
Fields Modifier and Type Field Description protected BlackboardType
myBlackboard
The my blackboard.-
Fields inherited from class de.uka.ipd.sdq.workflow.jobs.AbstractCompositeJob
myExecutedJobs, myJobs
-
Fields inherited from class de.uka.ipd.sdq.workflow.jobs.AbstractJob
logger
-
-
Constructor Summary
Constructors Constructor Description SequentialBlackboardInteractingJob()
Instantiates a new order preserving blackboard composite job.SequentialBlackboardInteractingJob(boolean cleanUpImmediately)
Instantiates a new order preserving blackboard composite job.SequentialBlackboardInteractingJob(String name)
Instantiates a new sequential blackboard job with a specific name.SequentialBlackboardInteractingJob(String name, boolean cleanUpImmediately)
Instantiates a new sequential blackboard job with a specific name and specifying the clean up strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(IProgressMonitor monitor)
Executes all contained jobs.BlackboardType
getBlackboard()
Gets the blackboard.void
setBlackboard(BlackboardType blackboard)
Sets the blackboard of this job to the given blackboard.-
Methods inherited from class de.uka.ipd.sdq.workflow.jobs.SequentialJob
cleanup
-
Methods inherited from class de.uka.ipd.sdq.workflow.jobs.AbstractCompositeJob
add, add, addAll, addAll, addFirst, addJob, addLast, clear, clone, contains, containsAll, descendingIterator, element, equals, get, getFirst, getLast, getName, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeAll, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, retainAll, set, setName, size, subList, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
-
-
-
Field Detail
-
myBlackboard
protected BlackboardType extends Blackboard<?> myBlackboard
The my blackboard.
-
-
Constructor Detail
-
SequentialBlackboardInteractingJob
public SequentialBlackboardInteractingJob()
Instantiates a new order preserving blackboard composite job.
-
SequentialBlackboardInteractingJob
public SequentialBlackboardInteractingJob(String name)
Instantiates a new sequential blackboard job with a specific name.- Parameters:
name
- The name of the job.
-
SequentialBlackboardInteractingJob
public SequentialBlackboardInteractingJob(boolean cleanUpImmediately)
Instantiates a new order preserving blackboard composite job.- Parameters:
cleanUpImmediately
- Flag if jobs should be cleaned up immediately or not.
-
SequentialBlackboardInteractingJob
public SequentialBlackboardInteractingJob(String name, boolean cleanUpImmediately)
Instantiates a new sequential blackboard job with a specific name and specifying the clean up strategy.- Parameters:
name
- The name of the job sequence.cleanUpImmediately
- Flag if jobs should be cleaned up immediately or not.
-
-
Method Detail
-
execute
public void execute(IProgressMonitor monitor) throws JobFailedException, UserCanceledException
Executes all contained jobs. Depending on the jobs configuration, the execution cleans up immediately or when all jobs are done.- Specified by:
execute
in interfaceIJob
- Overrides:
execute
in classSequentialJob
- Parameters:
monitor
- the monitor- Throws:
JobFailedException
- the job failed exceptionUserCanceledException
- the user canceled exception
-
setBlackboard
public void setBlackboard(BlackboardType blackboard)
Description copied from interface:IBlackboardInteractingJob
Sets the blackboard of this job to the given blackboard.- Specified by:
setBlackboard
in interfaceIBlackboardInteractingJob<BlackboardType extends Blackboard<?>>
- Parameters:
blackboard
- The blackboard to be used by this job
-
getBlackboard
public BlackboardType getBlackboard()
Gets the blackboard.- Returns:
- Returns the used blackboard.
-
-