use of org.bigbluebutton.common.messages.SendCaptionHistoryReplyMessage in project bigbluebutton by bigbluebutton.
the class CaptionClientMessageSender method handleCaptionMessage.
public void handleCaptionMessage(String message) {
JsonParser parser = new JsonParser();
JsonObject obj = (JsonObject) parser.parse(message);
if (obj.has("header") && obj.has("payload")) {
JsonObject header = (JsonObject) obj.get("header");
if (header.has("name")) {
String messageName = header.get("name").getAsString();
switch(messageName) {
case SendCaptionHistoryReplyMessage.SEND_CAPTION_HISTORY_REPLY:
SendCaptionHistoryReplyMessage sch = SendCaptionHistoryReplyMessage.fromJson(message);
if (sch != null) {
processSendCaptionHistoryReplyMessage(sch);
}
break;
case UpdateCaptionOwnerMessage.UPDATE_CAPTION_OWNER:
UpdateCaptionOwnerMessage uco = UpdateCaptionOwnerMessage.fromJson(message);
if (uco != null) {
processUpdateCaptionOwnerMessage(uco);
}
break;
case EditCaptionHistoryMessage.EDIT_CAPTION_HISTORY:
EditCaptionHistoryMessage ech = EditCaptionHistoryMessage.fromJson(message);
if (ech != null) {
processEditCaptionHistoryMessage(ech);
}
break;
}
}
}
}
Aggregations