Class JobReturnEvent

java.lang.Object
com.suse.salt.netapi.event.JobReturnEvent

public class JobReturnEvent extends Object
Representation of job return events fired each time a minion returns data for a job.
  • Field Details

    • PATTERN

      private static final Pattern PATTERN
    • jobId

      private final String jobId
    • minionId

      private final String minionId
    • data

      private final JobReturnEvent.Data data
    • GSON

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

    • JobReturnEvent

      private JobReturnEvent(String jobIdIn, 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 Details

    • getJobId

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

      public String getMinionId()
      Returns:
      the minion id
    • getData

      public JobReturnEvent.Data getData()
      Returns:
      the event data
    • parse

      public static 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