use of org.glassfish.api.admin.progress.ProgressStatusEventSet in project Payara by payara.
the class ProgressStatusEventJsonProprietaryReader method readProgressStatusEvent.
public static ProgressStatusEvent readProgressStatusEvent(JsonParser jp) throws IOException {
String id = null;
JsonToken token = null;
ProgressStatusEvent result = null;
while ((token = jp.nextToken()) != JsonToken.END_OBJECT) {
if (token == JsonToken.START_OBJECT) {
String nm = jp.getCurrentName();
if ("set".equals(nm)) {
result = new ProgressStatusEventSet(id);
readToPSEventSet((ProgressStatusEventSet) result, jp);
} else if ("progres".equals(nm)) {
result = new ProgressStatusEventProgress(id);
readToPSEventProgress((ProgressStatusEventProgress) result, jp);
} else if ("complete".equals(nm)) {
result = new ProgressStatusEventComplete(id);
readToPSEventComplete((ProgressStatusEventComplete) result, jp);
} else if ("create-child".equals(nm)) {
result = new ProgressStatusEventCreateChild(id);
readToPSEventCreateChild((ProgressStatusEventCreateChild) result, jp);
}
} else {
String fieldname = jp.getCurrentName();
if ("id".equals(fieldname)) {
// move to value
jp.nextToken();
id = jp.getText();
}
}
}
return result;
}
Aggregations