use of org.bigbluebutton.common.messages.GetLockSettingsMessage in project bigbluebutton by bigbluebutton.
the class LockMessageReceiver method handleMessage.
@Override
public void handleMessage(String pattern, String channel, String message) {
if (channel.equalsIgnoreCase(MessagingConstants.TO_MEETING_CHANNEL)) {
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();
if (GetLockSettingsMessage.GET_LOCK_SETTINGS.equals(messageName)) {
GetLockSettingsMessage msg = GetLockSettingsMessage.fromJson(message);
bbbGW.getLockSettings(msg.meetingId, msg.userId);
} else if (LockUserMessage.LOCK_USER.equals(messageName)) {
LockUserMessage msg = LockUserMessage.fromJson(message);
bbbGW.lockUser(msg.meetingId, msg.requesterId, msg.lock, msg.internalUserId);
} else if (SendLockSettingsMessage.SEND_LOCK_SETTINGS.equals(messageName)) {
SendLockSettingsMessage msg = SendLockSettingsMessage.fromJson(message);
bbbGW.sendLockSettings(msg.meetingId, msg.userId, msg.newSettings);
}
}
}
}
}
Aggregations