Package adams.event
Class JobCompleteEvent
- java.lang.Object
-
- java.util.EventObject
-
- adams.event.JobCompleteEvent
-
- All Implemented Interfaces:
Serializable
public class JobCompleteEvent extends EventObject
Event object that gets sent after a job finished.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
Job
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JobCompleteEvent(Object source, Job job, JobResult result)
Initializes the event.JobCompleteEvent(Object source, Job job, JobResult result, Object payload)
Initializes the event with an additional payload object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Job
getJob()
Returns the job that finished.Object
getPayload()
Returns the payload object, if any.JobResult
getResult()
Returns the result of the job.boolean
hasPayload()
Checks whether there was any payload object provided.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
JobCompleteEvent
public JobCompleteEvent(Object source, Job job, JobResult result)
Initializes the event.- Parameters:
source
- the object that triggered the eventjob
- the job that got finishedresult
- the result of the job
-
JobCompleteEvent
public JobCompleteEvent(Object source, Job job, JobResult result, Object payload)
Initializes the event with an additional payload object.- Parameters:
source
- the object that triggered the eventjob
- the job that got finishedresult
- the result of the jobpayload
- an additional object
-
-
Method Detail
-
getJob
public Job getJob()
Returns the job that finished.- Returns:
- the job
-
getResult
public JobResult getResult()
Returns the result of the job.- Returns:
- the result
-
hasPayload
public boolean hasPayload()
Checks whether there was any payload object provided.- Returns:
- true if a payload object resides in this event
- See Also:
getPayload()
-
getPayload
public Object getPayload()
Returns the payload object, if any.- Returns:
- the payload object, can be null
- See Also:
hasPayload()
-
-