Package adams.event

Class 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
    • Field Detail

      • m_Job

        protected Job m_Job
        the job that finished.
      • m_Result

        protected JobResult m_Result
        the result of the job.
      • m_Payload

        protected Object m_Payload
        a payload object (can be arbitrary object).
    • Constructor Detail

      • JobCompleteEvent

        public JobCompleteEvent​(Object source,
                                Job job,
                                JobResult result)
        Initializes the event.
        Parameters:
        source - the object that triggered the event
        job - the job that got finished
        result - 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 event
        job - the job that got finished
        result - the result of the job
        payload - 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()