Class JobReturnEvent


  • public class JobReturnEvent
    extends java.lang.Object
    Representation of job return events fired each time a minion returns data for a job.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  JobReturnEvent.Data
      Data object of the job return event
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private JobReturnEvent.Data data  
      private static com.google.gson.Gson GSON  
      private java.lang.String jobId  
      private java.lang.String minionId  
      private static java.util.regex.Pattern PATTERN  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private JobReturnEvent​(java.lang.String jobIdIn, java.lang.String minionIdIn, JobReturnEvent.Data dataIn)
      Creates a new JobReturnEvent
    • Field Detail

      • PATTERN

        private static final java.util.regex.Pattern PATTERN
      • jobId

        private final java.lang.String jobId
      • minionId

        private final java.lang.String minionId
      • GSON

        private static final com.google.gson.Gson GSON
    • Constructor Detail

      • JobReturnEvent

        private JobReturnEvent​(java.lang.String jobIdIn,
                               java.lang.String minionIdIn,
                               JobReturnEvent.Data dataIn)
        Creates a new JobReturnEvent
        Parameters:
        jobIdIn - the id of the job
        minionIdIn - the id of the minion returning the job
        dataIn - data containing more information about this event
    • Method Detail

      • getJobId

        public java.lang.String getJobId()
        The id of the job
        Returns:
        job id
      • getMinionId

        public java.lang.String getMinionId()
        Returns:
        the minion id
      • parse

        public static java.util.Optional<JobReturnEvent> parse​(Event event)
        Utility method to parse a generic event into a more specific one.
        Parameters:
        event - the generic event to parse
        Returns:
        an option containing the parsed value or non if it could not be parsed