Search in sources :

Example 16 with DirectClientMessage

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

the class UserClientMessageSender method processValidateAuthTokenReply.

private void processValidateAuthTokenReply(ValidateAuthTokenReplyMessage 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("validateAuthTokenReply - " + gson.toJson(args));
    DirectClientMessage m = new DirectClientMessage(msg.meetingId, msg.userId, "validateAuthTokenReply", 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 17 with DirectClientMessage

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

the class UserClientMessageSender method processGetCurrentLayoutReplyMessage.

private void processGetCurrentLayoutReplyMessage(String message) {
    GetCurrentLayoutReplyMessage msg = GetCurrentLayoutReplyMessage.fromJson(message);
    if (msg != null) {
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("locked", msg.locked);
        args.put("setById", msg.setByUserid);
        args.put("layout", msg.layout);
        DirectClientMessage m = new DirectClientMessage(msg.meetingId, msg.requestedByUserid, "getCurrentLayoutResponse", args);
        service.sendMessage(m);
    }
}
Also used : HashMap(java.util.HashMap) JsonObject(com.google.gson.JsonObject) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage) GetCurrentLayoutReplyMessage(org.bigbluebutton.common.messages.GetCurrentLayoutReplyMessage)

Example 18 with DirectClientMessage

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

the class UserClientMessageSender method processUserJoinedMessage.

private void processUserJoinedMessage(UserJoinedMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("user", msg.user);
    Map<String, Object> message = new HashMap<String, Object>();
    Gson gson = new Gson();
    message.put("msg", gson.toJson(args));
    String userId = msg.user.get("userId").toString();
    log.info("joinMeetingReply - " + gson.toJson(args));
    DirectClientMessage jmr = new DirectClientMessage(msg.meetingId, userId, "joinMeetingReply", message);
    service.sendMessage(jmr);
    BroadcastClientMessage m = new BroadcastClientMessage(msg.meetingId, "participantJoined", 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) DirectClientMessage(org.bigbluebutton.red5.client.messaging.DirectClientMessage)

Example 19 with DirectClientMessage

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

the class UserClientMessageSender method processGetUsersReplyMessage.

private void processGetUsersReplyMessage(GetUsersReplyMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("count", msg.users.size());
    args.put("users", msg.users);
    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, "getUsersReply", 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 20 with DirectClientMessage

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

the class WhiteboardClientMessageSender method processGetWhiteboardShapesReplyMessage.

private void processGetWhiteboardShapesReplyMessage(GetWhiteboardShapesReplyMessage msg) {
    Map<String, Object> args = new HashMap<String, Object>();
    args.put("whiteboardId", msg.whiteboardId);
    args.put("count", msg.shapes.size());
    args.put("annotations", msg.shapes);
    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, "WhiteboardRequestAnnotationHistoryReply", 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