use of org.bigbluebutton.red5.client.messaging.DirectClientMessage in project bigbluebutton by bigbluebutton.
the class WhiteboardClientMessageSender method processIsWhiteboardEnabledReply.
private void processIsWhiteboardEnabledReply(IsWhiteboardEnabledReplyMessage msg) {
Map<String, Object> args = new HashMap<String, Object>();
args.put("enabled", msg.enabled);
Map<String, Object> message = new HashMap<String, Object>();
Gson gson = new Gson();
message.put("msg", gson.toJson(args));
DirectClientMessage m = new DirectClientMessage(msg.meetingId, msg.requesterId, "WhiteboardIsWhiteboardEnabledReply", message);
service.sendMessage(m);
// broadcast message
BroadcastClientMessage b = new BroadcastClientMessage(msg.meetingId, "WhiteboardIsWhiteboardEnabledReply", message);
service.sendMessage(b);
}
use of org.bigbluebutton.red5.client.messaging.DirectClientMessage in project bigbluebutton by bigbluebutton.
the class UserClientMessageSender method processGetRecordingStatusReplyMessage.
private void processGetRecordingStatusReplyMessage(GetRecordingStatusReplyMessage msg) {
Map<String, Object> args = new HashMap<String, Object>();
args.put("userId", msg.userId);
args.put("recording", msg.recording);
Map<String, Object> message = new HashMap<String, Object>();
Gson gson = new Gson();
message.put("msg", gson.toJson(args));
DirectClientMessage m = new DirectClientMessage(msg.meetingId, msg.userId, "getRecordingStatusReply", message);
service.sendMessage(m);
}
use of org.bigbluebutton.red5.client.messaging.DirectClientMessage in project bigbluebutton by bigbluebutton.
the class ChatClientMessageSender method processGetChatHistoryReply.
private void processGetChatHistoryReply(GetChatHistoryReplyMessage gch) {
Map<String, Object> args = new HashMap<String, Object>();
args.put("meetingId", gch.meetingId);
args.put("requester_id", gch.requesterId);
args.put("chat_history", gch.chatHistory);
Map<String, Object> message = new HashMap<String, Object>();
Gson gson = new Gson();
message.put("msg", gson.toJson(args.get("chat_history")));
DirectClientMessage m = new DirectClientMessage(gch.meetingId, gch.requesterId, "ChatRequestMessageHistoryReply", message);
service.sendMessage(m);
}
use of org.bigbluebutton.red5.client.messaging.DirectClientMessage in project bigbluebutton by bigbluebutton.
the class MeetingClientMessageSender method processMeetingStateMessage.
private void processMeetingStateMessage(MeetingStateMessage msg) {
Map<String, Object> args = new HashMap<String, Object>();
args.put("permissions", msg.permissions);
args.put("meetingMuted", msg.muted);
Map<String, Object> message = new HashMap<String, Object>();
Gson gson = new Gson();
message.put("msg", gson.toJson(args));
DirectClientMessage m = new DirectClientMessage(msg.meetingId, msg.userId, "meetingState", message);
service.sendMessage(m);
}
use of org.bigbluebutton.red5.client.messaging.DirectClientMessage in project bigbluebutton by bigbluebutton.
the class ChatClientMessageSender method processSendPrivateChatMessage.
private void processSendPrivateChatMessage(SendPrivateChatMessage msg) {
Map<String, Object> messageInfo = new HashMap<String, Object>();
messageInfo.put(ChatKeyUtil.CHAT_TYPE, msg.messageInfo.get(ChatKeyUtil.CHAT_TYPE));
messageInfo.put(ChatKeyUtil.FROM_USERID, msg.messageInfo.get(ChatKeyUtil.FROM_USERID));
messageInfo.put(ChatKeyUtil.FROM_USERNAME, msg.messageInfo.get(ChatKeyUtil.FROM_USERNAME));
messageInfo.put(ChatKeyUtil.TO_USERID, msg.messageInfo.get(ChatKeyUtil.TO_USERID));
messageInfo.put(ChatKeyUtil.TO_USERNAME, msg.messageInfo.get(ChatKeyUtil.TO_USERNAME));
messageInfo.put(ChatKeyUtil.FROM_TIME, msg.messageInfo.get(ChatKeyUtil.FROM_TIME));
messageInfo.put(ChatKeyUtil.FROM_TZ_OFFSET, msg.messageInfo.get(ChatKeyUtil.FROM_TZ_OFFSET));
messageInfo.put(ChatKeyUtil.FROM_COLOR, msg.messageInfo.get(ChatKeyUtil.FROM_COLOR));
messageInfo.put(ChatKeyUtil.MESSAGE, msg.messageInfo.get(ChatKeyUtil.MESSAGE));
String toUserId = msg.messageInfo.get(ChatKeyUtil.TO_USERID);
DirectClientMessage receiver = new DirectClientMessage(msg.meetingId, toUserId, "ChatReceivePrivateMessageCommand", messageInfo);
service.sendMessage(receiver);
DirectClientMessage sender = new DirectClientMessage(msg.meetingId, msg.requesterId, "ChatReceivePrivateMessageCommand", messageInfo);
service.sendMessage(sender);
}
Aggregations