Search in sources :

Example 31 with BroadcastClientMessage

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

the class MeetingClientMessageSender method processMeetingEndingMessage.

private void processMeetingEndingMessage(MeetingEndingMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("status", "Meeting is ending.");
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "meetingEnding", 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 32 with BroadcastClientMessage

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

the class MeetingClientMessageSender method processMeetingHasEndedMessage.

private void processMeetingHasEndedMessage(MeetingHasEndedMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("status", "Meeting has already 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, "meetingHasEnded", 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 33 with BroadcastClientMessage

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

the class PollingClientMessageSender method processPollStoppedMessage.

private void processPollStoppedMessage(String json) {
    PollStoppedMessage msg = PollStoppedMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("pollId", msg.pollId);
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        BroadcastClientMessage b = new BroadcastClientMessage(msg.meetingId, "pollStoppedMessage", 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)

Example 34 with BroadcastClientMessage

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

the class PollingClientMessageSender method processPollShowResultMessage.

private void processPollShowResultMessage(String json) {
    PollShowResultMessage msg = PollShowResultMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("poll", msg.poll);
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        BroadcastClientMessage b = new BroadcastClientMessage(msg.meetingId, "pollShowResultMessage", 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)

Example 35 with BroadcastClientMessage

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

the class PollingClientMessageSender method processPollStartedMessage.

private void processPollStartedMessage(String json) {
    PollStartedMessage msg = PollStartedMessage.fromJson(json);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("poll", msg.poll);
        Map<String, Object> message = new HashMap<String, Object>();
        Gson gson = new Gson();
        message.put("msg", gson.toJson(args));
        BroadcastClientMessage b = new BroadcastClientMessage(msg.meetingId, "pollStartedMessage", 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)

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