Search in sources :

Example 1 with DirectClientMessage

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

the class UserClientMessageSender method processBroadcastLayoutMessage.

private void processBroadcastLayoutMessage(String message) {
    BroadcastLayoutMessage msg = BroadcastLayoutMessage.fromJson(message);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("locked", msg.locked);
        args.put("setByUserID", msg.setByUserid);
        args.put("layout", msg.layout);
        Iterator<String> usersIter = msg.users.iterator();
        while (usersIter.hasNext()) {
            String user = usersIter.next();
            DirectClientMessage m = new DirectClientMessage(msg.meetingId, user, "syncLayout", args);
            service.sendMessage(m);
        }
    }
}
Also used : BroadcastLayoutMessage(org.bigbluebutton.common.messages.BroadcastLayoutMessage) HashMap(java.util.HashMap) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 2 with DirectClientMessage

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

the class UserClientMessageSender method processLockLayoutMessage.

private void processLockLayoutMessage(String message) {
    LockLayoutMessage msg = LockLayoutMessage.fromJson(message);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("locked", msg.locked);
        args.put("setById", msg.setByUserid);
        Iterator<String> usersIter = msg.users.iterator();
        while (usersIter.hasNext()) {
            String user = usersIter.next();
            DirectClientMessage m = new DirectClientMessage(msg.meetingId, user, "layoutLocked", args);
            service.sendMessage(m);
        }
    }
}
Also used : LockLayoutMessage(org.bigbluebutton.common.messages.LockLayoutMessage) HashMap(java.util.HashMap) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 3 with DirectClientMessage

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

the class UserClientMessageSender method processBreakoutRoomJoinURL.

private void processBreakoutRoomJoinURL(BreakoutRoomJoinURL msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("parentMeetingId", msg.payload.parentMeetingId);
    args.put("breakoutMeetingId", msg.payload.breakoutMeetingId);
    args.put("userId", msg.payload.userId);
    args.put("redirectJoinURL", msg.payload.redirectJoinURL);
    args.put("noRedirectJoinURL", msg.payload.noRedirectJoinURL);
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    DirectClientMessage m = new DirectClientMessage(msg.payload.parentMeetingId, msg.payload.userId, "breakoutRoomJoinURL", 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 4 with DirectClientMessage

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

the class UserClientMessageSender method processUserEjectedFromMeetingMessage.

private void processUserEjectedFromMeetingMessage(String message) {
    UserEjectedFromMeetingMessage msg = UserEjectedFromMeetingMessage.fromJson(message);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("ejectedBy", msg.ejectedBy);
        System.out.println("**** User [" + msg.userId + "] was ejected by [" + msg.ejectedBy + "]");
        DirectClientMessage m = new DirectClientMessage(msg.meetingId, msg.userId, "userEjectedFromMeeting", args);
        service.sendMessage(m);
    }
}
Also used : UserEjectedFromMeetingMessage(org.bigbluebutton.common.messages.UserEjectedFromMeetingMessage) HashMap(java.util.HashMap) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 5 with DirectClientMessage

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

the class UserClientMessageSender method processValidateAuthTokenTimeoutMessage.

private void processValidateAuthTokenTimeoutMessage(ValidateAuthTokenTimeoutMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("userId", msg.userId);
    args.put("valid", msg.valid);
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    log.info("validateAuthTokenTimedOut - " + gson.toJson(args));
    DirectClientMessage m = new DirectClientMessage(msg.meetingId, msg.userId, "validateAuthTokenTimedOut", 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)

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