Package com.suse.salt.netapi.event
Class MinionStartEvent
- java.lang.Object
-
- com.suse.salt.netapi.event.MinionStartEvent
-
public class MinionStartEvent extends Object
Represents an event fired when a minion connects to the salt master
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getData()
Return event data as Map<R> R
getData(com.google.gson.reflect.TypeToken<R> type)
Return the event data parsed into the given type.<R> R
getData(Class<R> type)
Return this event's data parsed into the given type.String
getMinionId()
The id of the minion that startedstatic Optional<MinionStartEvent>
parse(Event event)
Utility method to parse e generic event to a more specific one
-
-
-
Method Detail
-
getMinionId
public String getMinionId()
The id of the minion that started- Returns:
- the minion id
-
getData
public <R> R getData(com.google.gson.reflect.TypeToken<R> type)
Return the event data parsed into the given type.- Type Parameters:
R
- type to parse the data into- Parameters:
type
- type token to parse data- Returns:
- the event data
-
getData
public <R> R getData(Class<R> type)
Return this event's data parsed into the given type.- Type Parameters:
R
- type to parse the data into- Parameters:
type
- class to parse data- Returns:
- the data
-
parse
public static Optional<MinionStartEvent> parse(Event event)
Utility method to parse e generic event to 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
-
-