Package com.suse.salt.netapi.event
Class JobReturnEvent
- java.lang.Object
-
- com.suse.salt.netapi.event.JobReturnEvent
-
public class JobReturnEvent extends java.lang.ObjectRepresentation 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 classJobReturnEvent.DataData object of the job return event
-
Constructor Summary
Constructors Modifier Constructor Description privateJobReturnEvent(java.lang.String jobIdIn, java.lang.String minionIdIn, JobReturnEvent.Data dataIn)Creates a new JobReturnEvent
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JobReturnEvent.DatagetData()java.lang.StringgetJobId()The id of the jobjava.lang.StringgetMinionId()static java.util.Optional<JobReturnEvent>parse(Event event)Utility method to parse a generic event into a more specific one.
-
-
-
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
-
data
private final JobReturnEvent.Data data
-
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 jobminionIdIn- the id of the minion returning the jobdataIn- 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
-
getData
public JobReturnEvent.Data getData()
- Returns:
- the event data
-
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
-
-