Search in sources :

Example 6 with BroadcastClientMessage

use of org.bigbluebutton.red5.client.messaging.BroadcastClientMessage in project bigbluebutton by bigbluebutton.

the class MeetingClientMessageSender method processUserLockedMessage.

private void processUserLockedMessage(UserLockedMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("meetingID", msg.meetingId);
    args.put("user", msg.userId);
    args.put("lock", msg.locked);
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "userLocked", message);
    service.sendMessage(m);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Example 7 with BroadcastClientMessage

use of org.bigbluebutton.red5.client.messaging.BroadcastClientMessage in project bigbluebutton by bigbluebutton.

the class MeetingClientMessageSender method processMeetingEndedMessage.

private void processMeetingEndedMessage(MeetingEndedMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("status", "Meeting has been ended.");
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "meetingEnded", message);
    service.sendMessage(m);
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Example 8 with BroadcastClientMessage

use of org.bigbluebutton.red5.client.messaging.BroadcastClientMessage in project bigbluebutton by bigbluebutton.

the class PresentationClientMessageSender method processPresentationConversionDone.

private void processPresentationConversionDone(String json) {
    PresentationConversionDoneMessage msg = PresentationConversionDoneMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("meetingID", msg.meetingId);
        args.put("code", msg.code);
        Map<String, Object> presentation = new HashMap<String, Object>();
        presentation.put("id", msg.presentation.get("id"));
        presentation.put("name", msg.presentation.get("name"));
        presentation.put("current", msg.presentation.get("current"));
        presentation.put("pages", msg.presentation.get("pages"));
        args.put("presentation", presentation);
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "conversionCompletedUpdateMessageCallback", message);
        service.sendMessage(m);
    }
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) PresentationConversionDoneMessage(org.bigbluebutton.common.messages.PresentationConversionDoneMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Example 9 with BroadcastClientMessage

use of org.bigbluebutton.red5.client.messaging.BroadcastClientMessage in project bigbluebutton by bigbluebutton.

the class PresentationClientMessageSender method processPresentationConversionError.

private void processPresentationConversionError(String json) {
    PresentationConversionErrorMessage msg = PresentationConversionErrorMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("meetingID", msg.meetingId);
        args.put("code", msg.code);
        args.put("presentationID", msg.presentationId);
        args.put("presentationName", msg.presentationName);
        args.put("messageKey", msg.messageKey);
        args.put("numberOfPages", msg.numPages);
        args.put("maxNumberPages", msg.maxNumPages);
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "pageCountExceededUpdateMessageCallback", message);
        service.sendMessage(m);
    }
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) PresentationConversionErrorMessage(org.bigbluebutton.common.messages.PresentationConversionErrorMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) JsonObject(com.google.gson.JsonObject)

Example 10 with BroadcastClientMessage

use of org.bigbluebutton.red5.client.messaging.BroadcastClientMessage in project bigbluebutton by bigbluebutton.

the class PresentationClientMessageSender method processPresentationRemovedMessage.

private void processPresentationRemovedMessage(String json) {
    PresentationRemovedMessage msg = PresentationRemovedMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("presentationID", msg.presentationId);
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "removePresentationCallback", message);
        service.sendMessage(m);
    }
}
Also used : BroadcastClientMessage(org.bigbluebutton.red5.client.messaging.BroadcastClientMessage) HashMap(java.util.HashMap) Gson(com.google.gson.Gson) PresentationRemovedMessage(org.bigbluebutton.common.messages.PresentationRemovedMessage) JsonObject(com.google.gson.JsonObject)

Aggregations

JsonObject (com.google.gson.JsonObject)45 HashMap (java.util.HashMap)45 BroadcastClientMessage (org.bigbluebutton.red5.client.messaging.BroadcastClientMessage)45 Gson (com.google.gson.Gson)41 Map (java.util.Map)2 DirectClientMessage (org.bigbluebutton.red5.client.messaging.DirectClientMessage)2 SimpleDateFormat (java.text.SimpleDateFormat)1 GoToSlideReplyMessage (org.bigbluebutton.common.messages.GoToSlideReplyMessage)1 PresentationConversionDoneMessage (org.bigbluebutton.common.messages.PresentationConversionDoneMessage)1 PresentationConversionErrorMessage (org.bigbluebutton.common.messages.PresentationConversionErrorMessage)1 PresentationConversionProgressMessage (org.bigbluebutton.common.messages.PresentationConversionProgressMessage)1 PresentationCursorUpdateMessage (org.bigbluebutton.common.messages.PresentationCursorUpdateMessage)1 PresentationPageGeneratedReplyMessage (org.bigbluebutton.common.messages.PresentationPageGeneratedReplyMessage)1 PresentationPageResizedMessage (org.bigbluebutton.common.messages.PresentationPageResizedMessage)1 PresentationRemovedMessage (org.bigbluebutton.common.messages.PresentationRemovedMessage)1 PresentationSharedMessage (org.bigbluebutton.common.messages.PresentationSharedMessage)1