public class ResultEvent extends Object
Constructor and Description |
---|
ResultEvent(String jid,
String minionId,
com.google.gson.JsonElement data)
Creates a new ResultEvent
|
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getData()
Return event data as Map
|
<R> R |
getData(Class<R> type)
Return this event's data parsed into the given type.
|
<R> R |
getData(com.google.gson.reflect.TypeToken<R> type)
Return the event data parsed into the given type.
|
String |
getJid()
The job id to which the result belongs
|
String |
getMinionId()
The id of the minion from which the result came
|
static Optional<ResultEvent> |
parse(Event event)
Utility method to parse e generic event to a more specific one
|
public String getJid()
public String getMinionId()
public <R> R getData(com.google.gson.reflect.TypeToken<R> type)
R
- type to parse the data intotype
- type token to parse datapublic <R> R getData(Class<R> type)
R
- type to parse the data intotype
- class to parse datapublic static Optional<ResultEvent> parse(Event event)
event
- the generic event to parseCopyright © 2016. All rights reserved.