Search in sources :

Example 11 with DirectClientMessage

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);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 12 with DirectClientMessage

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);
}
Also used : HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 13 with DirectClientMessage

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);
}
Also used : HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 14 with DirectClientMessage

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);
}
Also used : HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 15 with DirectClientMessage

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);
}
Also used : HashMap(java.util.HashMap) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Aggregations

JsonObject (com.google.gson.JsonObject)20 HashMap (java.util.HashMap)20 DirectClientMessage (org.bigbluebutton.red5.client.messaging.DirectClientMessage)20 Gson (com.google.gson.Gson)14 BroadcastClientMessage (org.bigbluebutton.red5.client.messaging.BroadcastClientMessage)2 BroadcastLayoutMessage (org.bigbluebutton.common.messages.BroadcastLayoutMessage)1 GetCurrentLayoutReplyMessage (org.bigbluebutton.common.messages.GetCurrentLayoutReplyMessage)1 GetPresentationInfoReplyMessage (org.bigbluebutton.common.messages.GetPresentationInfoReplyMessage)1 GetSlideInfoReplyMessage (org.bigbluebutton.common.messages.GetSlideInfoReplyMessage)1 LockLayoutMessage (org.bigbluebutton.common.messages.LockLayoutMessage)1 UserEjectedFromMeetingMessage (org.bigbluebutton.common.messages.UserEjectedFromMeetingMessage)1