Package jadex.bpmn.runtime.task
Class PojoTaskWrapper
java.lang.Object
jadex.bpmn.runtime.task.PojoTaskWrapper
- All Implemented Interfaces:
ITask
Task that acts as wrapper for pojo tasks.
Allows for using pojo tasks in the same way as conventional ITasks.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBean constructor.PojoTaskWrapper
(Object pojotask, jadex.core.IComponent ia, ProcessThread thread, List<jadex.common.FieldInfo> cominjections, Map<String, List<jadex.common.FieldInfo>> arginjections, Map<String, jadex.common.FieldInfo> resinjections) Create a new wrapper task. -
Method Summary
Modifier and TypeMethodDescriptionjadex.future.IFuture
<Void> cancel
(jadex.core.IComponent process) Cleanup in case the task is cancelled.jadex.future.IFuture
<Void> execute
(ITaskContext context, jadex.core.IComponent process) Execute the task.Get the cancelmethod.Get the pojotask.Get the resinjections.Object[]
guessParameters
(Class<?>[] ptypes, Set<Object> vals) Method that tries to guess the parameters for the method call.void
setCancelMethod
(Method cancelmethod) Set the cancelmethod.void
setPojoTask
(Object pojotask) Set the pojotask.void
setResultInjections
(Map<String, jadex.common.FieldInfo> resinjections) Set the resinjections.protected void
setResults
(boolean noret, Object result, ITaskContext context, jadex.core.IComponent process) Set the results.
-
Field Details
-
pojotask
The pojo task. -
cancelmethod
The cancel method. -
resinjections
The resinjections.
-
-
Constructor Details
-
PojoTaskWrapper
public PojoTaskWrapper()Bean constructor. -
PojoTaskWrapper
public PojoTaskWrapper(Object pojotask, jadex.core.IComponent ia, ProcessThread thread, List<jadex.common.FieldInfo> cominjections, Map<String, List<jadex.common.FieldInfo>> arginjections, Map<String, jadex.common.FieldInfo> resinjections) Create a new wrapper task.
-
-
Method Details
-
execute
Execute the task. -
cancel
Cleanup in case the task is cancelled. -
guessParameters
Method that tries to guess the parameters for the method call. -
setResults
protected void setResults(boolean noret, Object result, ITaskContext context, jadex.core.IComponent process) Set the results. -
getPojoTask
Get the pojotask.- Returns:
- The pojotask.
-
setPojoTask
Set the pojotask.- Parameters:
pojotask
- The pojotask to set.
-
getCancelMethod
Get the cancelmethod.- Returns:
- The cancelmethod.
-
setCancelMethod
Set the cancelmethod.- Parameters:
cancelmethod
- The cancelmethod to set.
-
getResultInjections
Get the resinjections.- Returns:
- The resinjections.
-
setResultInjections
Set the resinjections.- Parameters:
resinjections
- The resinjections to set.
-