Package jadex.micro.examples.mandelbrot
Class CalculateAgent
- java.lang.Object
-
- jadex.micro.examples.mandelbrot.CalculateAgent
-
public class CalculateAgent extends java.lang.ObjectCalculate agent allows calculating the colors of an area using a calculate service.
-
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccessagentThe agent.protected booleanhadjobFlag indicating that the agent had a job.protected intprogressProgress of the current job.protected java.lang.ObjecttaskidId of the current job.
-
Constructor Summary
Constructors Constructor Description CalculateAgent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Void>executeBody()Execute the body.intgetProgress()Get the current progress.java.lang.ObjectgetTaskId()Get the current task id.booleanisHadJob()Get the hadjob.voidsetHadJob(boolean hadjob)Set the hadjob.voidsetProgress(int progress)Set the current progress.voidsetTaskId(java.lang.Object taskid)Set the current task id.
-
-
-
Field Detail
-
agent
protected IInternalAccess agent
The agent.
-
hadjob
protected boolean hadjob
Flag indicating that the agent had a job.
-
taskid
protected java.lang.Object taskid
Id of the current job.
-
progress
protected int progress
Progress of the current job.
-
-
Method Detail
-
executeBody
public IFuture<java.lang.Void> executeBody()
Execute the body.
-
setHadJob
public void setHadJob(boolean hadjob)
Set the hadjob.- Parameters:
hadjob- The hadjob to set.
-
isHadJob
public boolean isHadJob()
Get the hadjob.- Returns:
- The hadjob.
-
getTaskId
public java.lang.Object getTaskId()
Get the current task id.
-
setTaskId
public void setTaskId(java.lang.Object taskid)
Set the current task id.
-
getProgress
public int getProgress()
Get the current progress.
-
setProgress
public void setProgress(int progress)
Set the current progress.
-
-