use of org.bigbluebutton.common.messages.UserVoiceMutedMessage in project bigbluebutton by bigbluebutton.
the class UserClientMessageSender method handleUsersMessage.
public void handleUsersMessage(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")) {
// Used for JSON unmarshalling
Gson gson = new Gson();
String messageName = header.get("name").getAsString();
switch(messageName) {
case ValidateAuthTokenReplyMessage.VALIDATE_AUTH_TOKEN_REPLY:
ValidateAuthTokenReplyMessage m = ValidateAuthTokenReplyMessage.fromJson(message);
if (m != null) {
processValidateAuthTokenReply(m);
}
break;
case ValidateAuthTokenTimeoutMessage.VALIDATE_AUTH_TOKEN_TIMEOUT:
ValidateAuthTokenTimeoutMessage vattm = ValidateAuthTokenTimeoutMessage.fromJson(message);
if (vattm != null) {
processValidateAuthTokenTimeoutMessage(vattm);
}
break;
case UserLeftMessage.USER_LEFT:
UserLeftMessage ulm = UserLeftMessage.fromJson(message);
if (ulm != null) {
processUserLeftMessage(ulm);
}
break;
case UserJoinedMessage.USER_JOINED:
UserJoinedMessage ujm = UserJoinedMessage.fromJson(message);
if (ujm != null) {
processUserJoinedMessage(ujm);
}
break;
case PresenterAssignedMessage.PRESENTER_ASSIGNED:
PresenterAssignedMessage pam = PresenterAssignedMessage.fromJson(message);
if (pam != null) {
processPresenterAssignedMessage(pam);
}
break;
case UserStatusChangedMessage.USER_STATUS_CHANGED:
UserStatusChangedMessage usm = UserStatusChangedMessage.fromJson(message);
if (usm != null) {
processUserStatusChangedMessage(usm);
}
break;
case UserEmojiStatusMessage.USER_EMOJI_STATUS:
UserEmojiStatusMessage urhm = UserEmojiStatusMessage.fromJson(message);
if (urhm != null) {
processUserEmojiStatusMessage(urhm);
}
break;
case UserListeningOnlyMessage.USER_LISTENING_ONLY:
UserListeningOnlyMessage ulom = UserListeningOnlyMessage.fromJson(message);
if (ulom != null) {
processUserListeningOnlyMessage(ulom);
}
break;
case UserSharedWebcamMessage.USER_SHARED_WEBCAM:
UserSharedWebcamMessage uswm = UserSharedWebcamMessage.fromJson(message);
if (uswm != null) {
processUserSharedWebcamMessage(uswm);
}
break;
case UserUnsharedWebcamMessage.USER_UNSHARED_WEBCAM:
UserUnsharedWebcamMessage uuwm = UserUnsharedWebcamMessage.fromJson(message);
if (uuwm != null) {
processUserUnsharedWebcamMessage(uuwm);
}
break;
case UserJoinedVoiceMessage.USER_JOINED_VOICE:
UserJoinedVoiceMessage ujvm = UserJoinedVoiceMessage.fromJson(message);
if (ujvm != null) {
processUserJoinedVoiceMessage(ujvm);
}
break;
case UserLeftVoiceMessage.USER_LEFT_VOICE:
UserLeftVoiceMessage ulvm = UserLeftVoiceMessage.fromJson(message);
if (ulvm != null) {
processUserLeftVoiceMessage(ulvm);
}
break;
case UserVoiceMutedMessage.USER_VOICE_MUTED:
UserVoiceMutedMessage uvmm = UserVoiceMutedMessage.fromJson(message);
if (uvmm != null) {
processUserVoiceMutedMessage(uvmm);
}
break;
case UserVoiceTalkingMessage.USER_VOICE_TALKING:
UserVoiceTalkingMessage uvtm = UserVoiceTalkingMessage.fromJson(message);
if (uvtm != null) {
processUserVoiceTalkingMessage(uvtm);
}
break;
case RecordingStatusChangedMessage.RECORDING_STATUS_CHANGED:
RecordingStatusChangedMessage rscm = RecordingStatusChangedMessage.fromJson(message);
if (rscm != null) {
processRecordingStatusChangedMessage(rscm);
}
break;
case GetRecordingStatusReplyMessage.Get_RECORDING_STATUS_REPLY:
GetRecordingStatusReplyMessage grsrm = GetRecordingStatusReplyMessage.fromJson(message);
if (grsrm != null) {
processGetRecordingStatusReplyMessage(grsrm);
}
break;
case GetUsersReplyMessage.GET_USERS_REPLY:
GetUsersReplyMessage gurm = GetUsersReplyMessage.fromJson(message);
if (gurm != null) {
processGetUsersReplyMessage(gurm);
}
break;
case GetCurrentLayoutReplyMessage.GET_CURRENT_LAYOUT_REPLY:
processGetCurrentLayoutReplyMessage(message);
break;
case BroadcastLayoutMessage.BROADCAST_LAYOUT:
processBroadcastLayoutMessage(message);
break;
case LockLayoutMessage.LOCK_LAYOUT:
processLockLayoutMessage(message);
break;
case UserEjectedFromMeetingMessage.USER_EJECTED_FROM_MEETING:
processUserEjectedFromMeetingMessage(message);
break;
case BreakoutRoomsList.NAME:
BreakoutRoomsList brl = gson.fromJson(message, BreakoutRoomsList.class);
if (brl != null) {
processBreakoutRoomsList(brl);
}
break;
case BreakoutRoomJoinURL.NAME:
BreakoutRoomJoinURL brjum = gson.fromJson(message, BreakoutRoomJoinURL.class);
if (brjum != null) {
processBreakoutRoomJoinURL(brjum);
}
break;
case TimeRemainingUpdate.NAME:
TimeRemainingUpdate trum = gson.fromJson(message, TimeRemainingUpdate.class);
if (trum != null) {
processTimeRemainingUpdate(trum);
}
break;
case BreakoutRoomsTimeRemainingUpdate.NAME:
BreakoutRoomsTimeRemainingUpdate brtru = gson.fromJson(message, BreakoutRoomsTimeRemainingUpdate.class);
if (brtru != null) {
processBreakoutRoomsTimeRemainingUpdate(brtru);
}
break;
case UpdateBreakoutUsers.NAME:
UpdateBreakoutUsers ubum = gson.fromJson(message, UpdateBreakoutUsers.class);
if (ubum != null) {
processUpdateBreakoutUsers(ubum);
}
break;
case BreakoutRoomStarted.NAME:
BreakoutRoomStarted brsm = gson.fromJson(message, BreakoutRoomStarted.class);
if (brsm != null) {
processBreakoutRoomStarted(brsm);
}
break;
case BreakoutRoomClosed.NAME:
BreakoutRoomClosed brcm = gson.fromJson(message, BreakoutRoomClosed.class);
if (brcm != null) {
processBreakoutRoomClosed(brcm);
}
break;
}
}
}
}
Aggregations