- remove apps from red5

This commit is contained in:
Richard Alam 2015-05-28 17:58:35 +00:00
parent 1f02d3ba06
commit 00988e2da6
223 changed files with 105 additions and 17038 deletions

View File

@ -3,7 +3,7 @@ package org.bigbluebutton.common.messages;
import java.util.HashMap;
import java.util.Map;
import org.bigbluebutton.conference.service.chat.ChatKeyUtil;
import org.bigbluebutton.red5.service.ChatKeyUtil;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

View File

@ -3,7 +3,7 @@ package org.bigbluebutton.common.messages;
import java.util.HashMap;
import java.util.Map;
import org.bigbluebutton.conference.service.chat.ChatKeyUtil;
import org.bigbluebutton.red5.service.ChatKeyUtil;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

View File

@ -5,7 +5,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.bigbluebutton.conference.service.chat.ChatKeyUtil;
import org.bigbluebutton.red5.service.ChatKeyUtil;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;

View File

@ -1,126 +0,0 @@
package org.bigbluebutton.conference.meeting.messaging.redis;
import java.util.HashMap;
import java.util.Map;
import org.bigbluebutton.common.messages.CreateMeetingMessage;
import org.bigbluebutton.common.messages.DestroyMeetingMessage;
import org.bigbluebutton.common.messages.EndMeetingMessage;
import org.bigbluebutton.common.messages.GetAllMeetingsRequest;
import org.bigbluebutton.common.messages.IPublishedMessage;
import org.bigbluebutton.common.messages.KeepAliveMessage;
import org.bigbluebutton.common.messages.MessageFromJsonConverter;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.bigbluebutton.common.messages.RegisterUserMessage;
import org.bigbluebutton.common.messages.UserConnectedToGlobalAudio;
import org.bigbluebutton.common.messages.UserDisconnectedFromGlobalAudio;
import org.bigbluebutton.common.messages.ValidateAuthTokenMessage;
import org.bigbluebutton.conference.service.messaging.redis.MessageHandler;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import com.google.gson.Gson;
public class MeetingMessageHandler implements MessageHandler {
private static Logger log = Red5LoggerFactory.getLogger(MeetingMessageHandler.class, "bigbluebutton");
private IBigBlueButtonInGW bbbGW;
@Override
public void handleMessage(String pattern, String channel, String message) {
// System.out.println("Checking message: " + pattern + " " + channel + " " + message);
if (channel.equalsIgnoreCase(MessagingConstants.TO_MEETING_CHANNEL)) {
System.out.println("Meeting message: " + channel + " " + message);
IPublishedMessage msg = MessageFromJsonConverter.convert(message);
if (msg != null) {
if (msg instanceof EndMeetingMessage) {
EndMeetingMessage emm = (EndMeetingMessage) msg;
log.info("Received end meeting request. Meeting id [{}]", emm.meetingId);
bbbGW.endMeeting(emm.meetingId);
} else if (msg instanceof CreateMeetingMessage) {
CreateMeetingMessage emm = (CreateMeetingMessage) msg;
log.info("Received create meeting request. Meeting id [{}]", emm.id);
bbbGW.createMeeting2(emm.id, emm.externalId, emm.name, emm.record, emm.voiceBridge,
emm.duration, emm.autoStartRecording, emm.allowStartStopRecording,
emm.moderatorPass, emm.viewerPass, emm.createTime, emm.createDate);
} else if (msg instanceof RegisterUserMessage) {
RegisterUserMessage emm = (RegisterUserMessage) msg;
log.info("Received register user request. Meeting id [{}], userid=[{}], token=[{}]", emm.meetingID, emm.internalUserId, emm.authToken);
bbbGW.registerUser(emm.meetingID, emm.internalUserId, emm.fullname, emm.role, emm.externUserID, emm.authToken);
} else if (msg instanceof DestroyMeetingMessage) {
DestroyMeetingMessage emm = (DestroyMeetingMessage) msg;
log.info("Received destroy meeting request. Meeting id [{}]", emm.meetingId);
bbbGW.destroyMeeting(emm.meetingId);
} else if (msg instanceof ValidateAuthTokenMessage) {
ValidateAuthTokenMessage emm = (ValidateAuthTokenMessage) msg;
System.out.println("Received ValidateAuthTokenMessage token request. Meeting id [" + emm.meetingId + "]");
log.info("Received ValidateAuthTokenMessage token request. Meeting id [{}]", emm.meetingId);
log.warn("TODO: Need to pass sessionId on ValidateAuthTokenMessage message.");
String sessionId = "tobeimplemented";
bbbGW.validateAuthToken(emm.meetingId, emm.userId, emm.token, emm.replyTo, sessionId);
} else if (msg instanceof UserConnectedToGlobalAudio) {
UserConnectedToGlobalAudio emm = (UserConnectedToGlobalAudio) msg;
Map<String, Object> logData = new HashMap<String, Object>();
logData.put("voiceConf", emm.voiceConf);
logData.put("userId", emm.userid);
logData.put("username", emm.name);
logData.put("event", "user_connected_to_global_audio");
logData.put("description", "User connected to global audio.");
Gson gson = new Gson();
String logStr = gson.toJson(logData);
log.info("User connected to global audio: data={}", logStr);
bbbGW.userConnectedToGlobalAudio(emm.voiceConf, emm.userid, emm.name);
} else if (msg instanceof UserDisconnectedFromGlobalAudio) {
UserDisconnectedFromGlobalAudio emm = (UserDisconnectedFromGlobalAudio) msg;
Map<String, Object> logData = new HashMap<String, Object>();
logData.put("voiceConf", emm.voiceConf);
logData.put("userId", emm.userid);
logData.put("username", emm.name);
logData.put("event", "user_disconnected_from_global_audio");
logData.put("description", "User disconnected from global audio.");
Gson gson = new Gson();
String logStr = gson.toJson(logData);
log.info("User disconnected from global audio: data={}", logStr);
bbbGW.userDisconnectedFromGlobalAudio(emm.voiceConf, emm.userid, emm.name);
}
else if (msg instanceof GetAllMeetingsRequest) {
GetAllMeetingsRequest emm = (GetAllMeetingsRequest) msg;
log.info("Received GetAllMeetingsRequest");
bbbGW.getAllMeetings("no_need_of_a_meeting_id");
} else {
log.warn("Unknown message: [" + message + "]");
}
} else {
log.warn("Failed to decode message: [" + message + "]");
}
} else if (channel.equalsIgnoreCase(MessagingConstants.TO_SYSTEM_CHANNEL)) {
IPublishedMessage msg = MessageFromJsonConverter.convert(message);
if (msg != null) {
if (msg instanceof KeepAliveMessage) {
KeepAliveMessage emm = (KeepAliveMessage) msg;
// log.debug("Received KeepAliveMessage request. Meeting id [{}]", emm.keepAliveId);
bbbGW.isAliveAudit(emm.keepAliveId);
}
} else {
log.warn("Unknown message: [" + message + "]");
}
}
}
public void setBigBlueButtonInGW(IBigBlueButtonInGW bbbGW) {
this.bbbGW = bbbGW;
}
}

View File

@ -1,47 +0,0 @@
package org.bigbluebutton.conference.service.chat;
import org.bigbluebutton.common.messages.GetChatHistoryRequestMessage;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.bigbluebutton.common.messages.SendPrivateChatMessage;
import org.bigbluebutton.common.messages.SendPublicChatMessage;
import org.bigbluebutton.conference.service.messaging.redis.MessageHandler;
import com.google.gson.JsonParser;
import com.google.gson.JsonObject;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
public class ChatMessageListener implements MessageHandler{
private IBigBlueButtonInGW bbbGW;
public void setBigBlueButtonInGW(IBigBlueButtonInGW bbbGW) {
this.bbbGW = bbbGW;
}
@Override
public void handleMessage(String pattern, String channel, String message) {
if (channel.equalsIgnoreCase(MessagingConstants.TO_CHAT_CHANNEL)) {
JsonParser parser = new JsonParser();
JsonObject obj = (JsonObject) parser.parse(message);
if (obj.has("header") && obj.has("payload")) {
JsonObject header = (JsonObject) obj.get("header");
if (header.has("name")) {
String messageName = header.get("name").getAsString();
if (GetChatHistoryRequestMessage.GET_CHAT_HISTORY_REQUEST.equals(messageName)) {
GetChatHistoryRequestMessage msg = GetChatHistoryRequestMessage.fromJson(message);
bbbGW.getChatHistory(msg.meetingId, msg.requesterId, msg.replyTo);
} else if (SendPublicChatMessage.SEND_PUBLIC_CHAT_MESSAGE.equals(messageName)){
SendPublicChatMessage msg = SendPublicChatMessage.fromJson(message);
bbbGW.sendPublicMessage(msg.meetingId, msg.requesterId, msg.messageInfo);
} else if (SendPrivateChatMessage.SEND_PRIVATE_CHAT_MESSAGE.equals(messageName)){
SendPrivateChatMessage msg = SendPrivateChatMessage.fromJson(message);
bbbGW.sendPrivateMessage(msg.meetingId, msg.requesterId, msg.messageInfo);
}
}
}
}
}
}

View File

@ -1,47 +0,0 @@
package org.bigbluebutton.conference.service.lock;
import org.bigbluebutton.common.messages.GetLockSettingsMessage;
import org.bigbluebutton.common.messages.LockUserMessage;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.bigbluebutton.common.messages.SendLockSettingsMessage;
import org.bigbluebutton.conference.service.messaging.redis.MessageHandler;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import com.google.gson.JsonParser;
import com.google.gson.JsonObject;
public class LockMessageListener implements MessageHandler{
private IBigBlueButtonInGW bbbGW;
public void setBigBlueButtonInGW(IBigBlueButtonInGW bbbGW) {
this.bbbGW = bbbGW;
}
@Override
public void handleMessage(String pattern, String channel, String message) {
if (channel.equalsIgnoreCase(MessagingConstants.TO_MEETING_CHANNEL)) {
JsonParser parser = new JsonParser();
JsonObject obj = (JsonObject) parser.parse(message);
if (obj.has("header") && obj.has("payload")) {
JsonObject header = (JsonObject) obj.get("header");
if (header.has("name")) {
String messageName = header.get("name").getAsString();
if (GetLockSettingsMessage.GET_LOCK_SETTINGS.equals(messageName)) {
GetLockSettingsMessage msg = GetLockSettingsMessage.fromJson(message);
bbbGW.getLockSettings(msg.meetingId, msg.userId);
} else if(LockUserMessage.LOCK_USER.equals(messageName)) {
LockUserMessage msg = LockUserMessage.fromJson(message);
bbbGW.lockUser(msg.meetingId, msg.requesterId, msg.lock, msg.internalUserId);
} else if(SendLockSettingsMessage.SEND_LOCK_SETTINGS.equals(messageName)) {
SendLockSettingsMessage msg = SendLockSettingsMessage.fromJson(message);
bbbGW.sendLockSettings(msg.meetingId, msg.userId, msg.newSettings);
}
}
}
}
}
}

View File

@ -1,25 +0,0 @@
package org.bigbluebutton.conference.service.messaging.redis;
import java.util.Set;
public class MessageDistributor {
private ReceivedMessageHandler handler;
private Set<MessageHandler> listeners;
public void setMessageListeners(Set<MessageHandler> listeners) {
this.listeners = listeners;
}
public void setMessageHandler(ReceivedMessageHandler handler) {
this.handler = handler;
if (handler != null) {
handler.setMessageDistributor(this);
}
}
public void notifyListeners(String pattern, String channel, String message) {
for (MessageHandler listener : listeners) {
listener.handleMessage(pattern, channel, message);
}
}
}

View File

@ -1,23 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.messaging.redis;
public interface MessageHandler {
void handleMessage(String pattern, String channel, String message);
}

View File

@ -1,92 +0,0 @@
package org.bigbluebutton.conference.service.messaging.redis;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPubSub;
public class MessageReceiver {
private static Logger log = Red5LoggerFactory.getLogger(MessageReceiver.class, "bigbluebutton");
private ReceivedMessageHandler handler;
private JedisPool redisPool;
private volatile boolean receiveMessage = false;
private final Executor msgReceiverExec = Executors.newSingleThreadExecutor();
public void stop() {
receiveMessage = false;
}
public void start() {
log.info("Ready to receive messages from Redis pubsub.");
try {
receiveMessage = true;
final Jedis jedis = redisPool.getResource();
Runnable messageReceiver = new Runnable() {
public void run() {
if (receiveMessage) {
jedis.psubscribe(new PubSubListener(),
MessagingConstants.TO_BBB_APPS_PATTERN);
}
}
};
msgReceiverExec.execute(messageReceiver);
} catch (Exception e) {
log.error("Error subscribing to channels: " + e.getMessage());
}
}
public void setRedisPool(JedisPool redisPool){
this.redisPool = redisPool;
}
public void setMessageHandler(ReceivedMessageHandler handler) {
this.handler = handler;
}
private class PubSubListener extends JedisPubSub {
public PubSubListener() {
super();
}
@Override
public void onMessage(String channel, String message) {
// Not used.
}
@Override
public void onPMessage(String pattern, String channel, String message) {
handler.handleMessage(pattern, channel, message);
}
@Override
public void onPSubscribe(String pattern, int subscribedChannels) {
log.debug("Subscribed to the pattern: " + pattern);
}
@Override
public void onPUnsubscribe(String pattern, int subscribedChannels) {
// Not used.
}
@Override
public void onSubscribe(String channel, int subscribedChannels) {
// Not used.
}
@Override
public void onUnsubscribe(String channel, int subscribedChannels) {
// Not used.
}
}
}

View File

@ -1,74 +0,0 @@
package org.bigbluebutton.conference.service.messaging.redis;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
public class MessageSender {
private static Logger log = Red5LoggerFactory.getLogger(MessageSender.class, "bigbluebutton");
private JedisPool redisPool;
private volatile boolean sendMessage = false;
private final Executor msgSenderExec = Executors.newSingleThreadExecutor();
private final Executor runExec = Executors.newSingleThreadExecutor();
private BlockingQueue<MessageToSend> messages = new LinkedBlockingQueue<MessageToSend>();
public void stop() {
sendMessage = false;
}
public void start() {
log.info("Redis message publisher starting!");
try {
sendMessage = true;
Runnable messageSender = new Runnable() {
public void run() {
while (sendMessage) {
try {
MessageToSend msg = messages.take();
publish(msg.getChannel(), msg.getMessage());
} catch (InterruptedException e) {
log.warn("Failed to get message from queue.");
}
}
}
};
msgSenderExec.execute(messageSender);
} catch (Exception e) {
log.error("Error subscribing to channels: " + e.getMessage());
}
}
public void send(String channel, String message) {
MessageToSend msg = new MessageToSend(channel, message);
messages.add(msg);
}
private void publish(final String channel, final String message) {
Runnable task = new Runnable() {
public void run() {
Jedis jedis = redisPool.getResource();
try {
jedis.publish(channel, message);
} catch(Exception e){
log.warn("Cannot publish the message to redis", e);
} finally {
redisPool.returnResource(jedis);
}
}
};
runExec.execute(task);
}
public void setRedisPool(JedisPool redisPool){
this.redisPool = redisPool;
}
}

View File

@ -1,19 +0,0 @@
package org.bigbluebutton.conference.service.messaging.redis;
public class MessageToSend {
private final String channel;
private final String message;
public MessageToSend(String channel, String message) {
this.channel = channel;
this.message = message;
}
public String getChannel() {
return channel;
}
public String getMessage() {
return message;
}
}

View File

@ -1,28 +0,0 @@
package org.bigbluebutton.conference.service.messaging.redis;
public class ReceivedMessage {
private final String pattern;
private final String channel;
private final String message;
public ReceivedMessage(String pattern, String channel, String message) {
this.pattern = pattern;
this.channel = channel;
this.message = message;
}
public String getPattern() {
return pattern;
}
public String getChannel() {
return channel;
}
public String getMessage() {
return message;
}
}

View File

@ -1,72 +0,0 @@
package org.bigbluebutton.conference.service.messaging.redis;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
public class ReceivedMessageHandler {
private static Logger log = Red5LoggerFactory.getLogger(ReceivedMessageHandler.class, "bigbluebutton");
private BlockingQueue<ReceivedMessage> receivedMessages = new LinkedBlockingQueue<ReceivedMessage>();
private volatile boolean processMessage = false;
private final Executor msgProcessorExec = Executors.newSingleThreadExecutor();
private final Executor runExec = Executors.newSingleThreadExecutor();
private MessageDistributor handler;
public void stop() {
processMessage = false;
}
public void start() {
log.info("Ready to handle messages from Redis pubsub!");
try {
processMessage = true;
Runnable messageProcessor = new Runnable() {
public void run() {
while (processMessage) {
try {
ReceivedMessage msg = receivedMessages.take();
processMessage(msg);
} catch (InterruptedException e) {
log.warn("Error while taking received message from queue.");
}
}
}
};
msgProcessorExec.execute(messageProcessor);
} catch (Exception e) {
log.error("Error subscribing to channels: " + e.getMessage());
}
}
private void processMessage(final ReceivedMessage msg) {
Runnable task = new Runnable() {
public void run() {
if (handler != null) {
handler.notifyListeners(msg.getPattern(), msg.getChannel(), msg.getMessage());
} else {
log.info("No listeners interested in messages from Redis!");
}
}
};
runExec.execute(task);
}
public void handleMessage(String pattern, String channel, String message) {
ReceivedMessage rm = new ReceivedMessage(pattern, channel, message);
receivedMessages.add(rm);
}
public void setMessageDistributor(MessageDistributor h) {
this.handler = h;
}
}

View File

@ -1,284 +0,0 @@
package org.bigbluebutton.conference.service.participants;
import org.bigbluebutton.common.messages.AssignPresenterRequestMessage;
import org.bigbluebutton.common.messages.BroadcastLayoutRequestMessage;
import org.bigbluebutton.common.messages.EjectUserFromMeetingRequestMessage;
import org.bigbluebutton.common.messages.EjectUserFromVoiceRequestMessage;
import org.bigbluebutton.common.messages.GetCurrentLayoutRequestMessage;
import org.bigbluebutton.common.messages.GetRecordingStatusRequestMessage;
import org.bigbluebutton.common.messages.GetUsersRequestMessage;
import org.bigbluebutton.common.messages.InitAudioSettingsMessage;
import org.bigbluebutton.common.messages.InitPermissionsSettingMessage;
import org.bigbluebutton.common.messages.IsMeetingMutedRequestMessage;
import org.bigbluebutton.common.messages.LockLayoutRequestMessage;
import org.bigbluebutton.common.messages.LockMuteUserRequestMessage;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.bigbluebutton.common.messages.MuteAllExceptPresenterRequestMessage;
import org.bigbluebutton.common.messages.MuteAllRequestMessage;
import org.bigbluebutton.common.messages.MuteUserRequestMessage;
import org.bigbluebutton.common.messages.SetRecordingStatusRequestMessage;
import org.bigbluebutton.common.messages.SetUserStatusRequestMessage;
import org.bigbluebutton.common.messages.UserLeavingMessage;
import org.bigbluebutton.common.messages.UserLoweredHandMessage;
import org.bigbluebutton.common.messages.UserRaisedHandMessage;
import org.bigbluebutton.common.messages.UserShareWebcamRequestMessage;
import org.bigbluebutton.common.messages.UserUnshareWebcamRequestMessage;
import org.bigbluebutton.conference.BigBlueButtonApplication;
import org.bigbluebutton.conference.service.messaging.redis.MessageHandler;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import com.google.gson.JsonParser;
import com.google.gson.JsonObject;
public class ParticipantsListener implements MessageHandler{
private static Logger log = Red5LoggerFactory.getLogger(BigBlueButtonApplication.class, "bigbluebutton");
private IBigBlueButtonInGW bbbInGW;
public void setBigBlueButtonInGW(IBigBlueButtonInGW bbbInGW) {
this.bbbInGW = bbbInGW;
}
@Override
public void handleMessage(String pattern, String channel, String message) {
if (channel.equalsIgnoreCase(MessagingConstants.TO_USERS_CHANNEL)) {
System.out.println("Users message: " + channel + " " + message);
JsonParser parser = new JsonParser();
JsonObject obj = (JsonObject) parser.parse(message);
if (obj.has("header") && obj.has("payload")) {
JsonObject header = (JsonObject) obj.get("header");
JsonObject payload = (JsonObject) obj.get("payload");
if (header.has("name")) {
String messageName = header.get("name").getAsString();
switch (messageName) {
case UserLeavingMessage.USER_LEAVING:
processUserLeavingMessage(message);
break;
case AssignPresenterRequestMessage.ASSIGN_PRESENTER_REQUEST:
processAssignPresenterRequestMessage(message);
break;
case UserRaisedHandMessage.USER_RAISED_HAND:
processUserRaisedHandMessage(message);
break;
case UserLoweredHandMessage.USER_LOWERED_HAND:
processUserLoweredHandMessage(message);
break;
case EjectUserFromMeetingRequestMessage.EJECT_USER_FROM_MEETING_REQUEST:
processEjectUserFromMeetingRequestMessage(message);
break;
case UserShareWebcamRequestMessage.USER_SHARE_WEBCAM_REQUEST:
processUserShareWebcamRequestMessage(message);
break;
case UserUnshareWebcamRequestMessage.USER_UNSHARE_WEBCAM_REQUEST:
processUserUnshareWebcamRequestMessage(message);
break;
case SetUserStatusRequestMessage.SET_USER_STATUS_REQUEST:
processSetUserStatusRequestMessage(message);
break;
case SetRecordingStatusRequestMessage.SET_RECORDING_STATUS_REQUEST:
processSetRecordingStatusRequestMessage(message);
break;
case GetRecordingStatusRequestMessage.GET_RECORDING_STATUS_REQUEST:
processGetRecordingStatusRequestMessage(message);
break;
case GetUsersRequestMessage.GET_USERS_REQUEST:
processGetUsersRequestMessage(message);
break;
case InitPermissionsSettingMessage.INIT_PERMISSIONS_SETTING:
processInitPermissionsSettingMessage(message);
break;
case InitAudioSettingsMessage.INIT_AUDIO_SETTING:
processInitAudioSettingsMessage(message);
break;
case BroadcastLayoutRequestMessage.BROADCAST_LAYOUT_REQUEST:
processBroadcastLayoutRequestMessage(message);
break;
case LockLayoutRequestMessage.LOCK_LAYOUT_REQUEST:
processLockLayoutRequestMessage(message);
break;
case GetCurrentLayoutRequestMessage.GET_CURRENT_LAYOUT_REQUEST:
processGetCurrentLayoutRequestMessage(message);
break;
case MuteAllExceptPresenterRequestMessage.MUTE_ALL_EXCEPT_PRESENTER_REQUEST:
processMuteAllExceptPresenterRequestMessage(message);
break;
case MuteAllRequestMessage.MUTE_ALL_REQUEST:
processMuteAllRequestMessage(message);
break;
case IsMeetingMutedRequestMessage.IS_MEETING_MUTED_REQUEST:
processIsMeetingMutedRequestMessage(message);
break;
case MuteUserRequestMessage.MUTE_USER_REQUEST:
processMuteUserRequestMessage(message);
break;
case LockMuteUserRequestMessage.LOCK_MUTE_USER_REQUEST:
processLockMuteUserRequestMessage(message);
break;
case EjectUserFromVoiceRequestMessage.EJECT_USER_FROM_VOICE_REQUEST:
processEjectUserFromVoiceRequestMessage(message);
break;
}
}
}
}
}
private void processUserLeavingMessage(String message) {
UserLeavingMessage ulm = UserLeavingMessage.fromJson(message);
if (ulm != null) {
bbbInGW.userLeft(ulm.meetingId, ulm.userId, ulm.meetingId);
}
}
private void processAssignPresenterRequestMessage(String message) {
AssignPresenterRequestMessage apm = AssignPresenterRequestMessage.fromJson(message);
if (apm != null) {
bbbInGW.assignPresenter(apm.meetingId, apm.newPresenterId, apm.newPresenterName, apm.assignedBy);
}
}
private void processUserRaisedHandMessage(String message) {
UserRaisedHandMessage urhm = UserRaisedHandMessage.fromJson(message);
if (urhm != null) {
bbbInGW.userRaiseHand(urhm.meetingId, urhm.userId);;
}
}
private void processUserLoweredHandMessage(String message) {
UserLoweredHandMessage ulhm = UserLoweredHandMessage.fromJson(message);
if (ulhm != null) {
bbbInGW.lowerHand(ulhm.meetingId, ulhm.userId, ulhm.loweredBy);
}
}
private void processEjectUserFromMeetingRequestMessage(String message) {
EjectUserFromMeetingRequestMessage eufm = EjectUserFromMeetingRequestMessage.fromJson(message);
if (eufm != null) {
bbbInGW.ejectUserFromMeeting(eufm.meetingId, eufm.userId, eufm.ejectedBy);
}
}
private void processUserShareWebcamRequestMessage(String message) {
UserShareWebcamRequestMessage msg = UserShareWebcamRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.shareWebcam(msg.meetingId, msg.userId, msg.stream);
}
}
private void processUserUnshareWebcamRequestMessage(String message) {
UserUnshareWebcamRequestMessage msg = UserUnshareWebcamRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.unshareWebcam(msg.meetingId, msg.userId, msg.stream);
}
}
private void processSetUserStatusRequestMessage(String message) {
SetUserStatusRequestMessage msg = SetUserStatusRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.setUserStatus(msg.meetingId, msg.userId, msg.status, msg.value);
}
}
private void processSetRecordingStatusRequestMessage(String message) {
SetRecordingStatusRequestMessage msg = SetRecordingStatusRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.setRecordingStatus(msg.meetingId, msg.userId, msg.recording);
}
}
private void processGetRecordingStatusRequestMessage(String message) {
GetRecordingStatusRequestMessage msg = GetRecordingStatusRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.getRecordingStatus(msg.meetingId, msg.userId);
}
}
private void processGetUsersRequestMessage(String message) {
GetUsersRequestMessage msg = GetUsersRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.getUsers(msg.meetingId, msg.requesterId);
}
}
private void processInitPermissionsSettingMessage(String message) {
InitPermissionsSettingMessage msg = InitPermissionsSettingMessage.fromJson(message);
if (msg != null) {
bbbInGW.initLockSettings(msg.meetingId, msg.permissions);
}
}
private void processInitAudioSettingsMessage(String message) {
InitAudioSettingsMessage msg = InitAudioSettingsMessage.fromJson(message);
if (msg != null) {
bbbInGW.initAudioSettings(msg.meetingId, msg.userId, msg.muted);
}
}
private void processBroadcastLayoutRequestMessage(String message) {
BroadcastLayoutRequestMessage msg = BroadcastLayoutRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.broadcastLayout(msg.meetingId, msg.userId, msg.layout);
}
}
private void processLockLayoutRequestMessage(String message) {
LockLayoutRequestMessage msg = LockLayoutRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.lockLayout(msg.meetingId, msg.userId, msg.lock, msg.viewersOnly, msg.layout);
}
}
private void processGetCurrentLayoutRequestMessage(String message) {
GetCurrentLayoutRequestMessage msg = GetCurrentLayoutRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.getCurrentLayout(msg.meetingId, msg.userId);
}
}
private void processMuteAllExceptPresenterRequestMessage(String message) {
MuteAllExceptPresenterRequestMessage msg = MuteAllExceptPresenterRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.muteAllExceptPresenter(msg.meetingId, msg.requesterId, msg.mute);
}
}
private void processMuteAllRequestMessage(String message) {
MuteAllRequestMessage msg = MuteAllRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.muteAllUsers(msg.meetingId, msg.requesterId, msg.mute);
}
}
private void processIsMeetingMutedRequestMessage(String message) {
IsMeetingMutedRequestMessage msg = IsMeetingMutedRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.isMeetingMuted(msg.meetingId, msg.requesterId);
}
}
private void processMuteUserRequestMessage(String message) {
MuteUserRequestMessage msg = MuteUserRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.muteUser(msg.meetingId, msg.requesterId, msg.userId, msg.mute);
}
}
private void processLockMuteUserRequestMessage(String message) {
LockMuteUserRequestMessage msg = LockMuteUserRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.lockMuteUser(msg.meetingId, msg.requesterId, msg.userId, msg.lock);
}
}
private void processEjectUserFromVoiceRequestMessage(String message) {
EjectUserFromVoiceRequestMessage msg = EjectUserFromVoiceRequestMessage.fromJson(message);
if (msg != null) {
bbbInGW.ejectUserFromVoice(msg.meetingId, msg.userId, msg.requesterId);
}
}
}

View File

@ -1,85 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 2.1 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.poll;
import org.slf4j.Logger;
import org.bigbluebutton.conference.BigBlueButtonSession;
import org.bigbluebutton.conference.Constants;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.api.Red5;
import org.red5.server.api.scope.IScope;
public class PollService {
private static Logger log = Red5LoggerFactory.getLogger( PollService.class, "bigbluebutton" );
private IBigBlueButtonInGW bbbInGW;
public void setBigBlueButtonInGW(IBigBlueButtonInGW inGW) {
bbbInGW = inGW;
}
public void getPolls() {
bbbInGW.getPolls(getMeetingID(), getRequesterID());
}
public void createPoll(String msg){
System.out.println("*** PollService:: create poll \n" + msg + "\n");
bbbInGW.createPoll(getMeetingID(), getRequesterID(), msg);
}
public void updatePoll(String msg){
System.out.println("*** PollService:: update poll \n" + msg + "\n");
bbbInGW.updatePoll(getMeetingID(), getRequesterID(), msg);
}
public void startPoll(String msg){
System.out.println("*** PollService:: start poll \n" + msg + "\n");
bbbInGW.startPoll(getMeetingID(), getRequesterID(), msg);
}
public void stopPoll(String msg){
System.out.println("*** PollService:: stop poll \n" + msg + "\n");
bbbInGW.stopPoll(getMeetingID(), getRequesterID(), msg);
}
public void removePoll(String msg){
System.out.println("*** PollService:: remove poll \n" + msg + "\n");
bbbInGW.removePoll(getMeetingID(), getRequesterID(), msg);
}
public void respondPoll(String msg){
System.out.println("*** PollService:: respond poll \n" + msg + "\n");
bbbInGW.respondPoll(getMeetingID(), getRequesterID(), msg);
}
private String getMeetingID() {
IScope scope = Red5.getConnectionLocal().getScope();
return scope.getName();
}
private String getRequesterID() {
return getBbbSession().getInternalUserID();
}
private BigBlueButtonSession getBbbSession() {
return (BigBlueButtonSession) Red5.getConnectionLocal().getAttribute(Constants.SESSION);
}
}

View File

@ -1,45 +0,0 @@
package org.bigbluebutton.conference.service.poll.messaging.redis;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.bigbluebutton.conference.service.messaging.redis.MessageHandler;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
public class PollRedisMessageHandler implements MessageHandler {
private static Logger log = Red5LoggerFactory.getLogger(PollRedisMessageHandler.class, "bigbluebutton");
private IBigBlueButtonInGW bbbGW;
@Override
public void handleMessage(String pattern, String channel, String message) {
// log.debug("Checking message: " + pattern + " " + channel + " " + message);
if (channel.equalsIgnoreCase(MessagingConstants.TO_POLLING_CHANNEL)){
Gson gson = new Gson();
JsonParser parser = new JsonParser();
JsonObject obj = parser.parse(message).getAsJsonObject();
String messageId = gson.fromJson(obj.get("messageId"), String.class);
//HashMap<String,String> map = gson.fromJson(message, new TypeToken<Map<String, String>>() {}.getType());
//String messageId = map.get("messageId");
if (messageId != null){
if (MessagingConstants.SEND_POLLS_EVENT.equalsIgnoreCase(messageId)){
String meetingId = gson.fromJson(obj.get("meetingId"), String.class);
bbbGW.preCreatedPoll(meetingId, message);
}
}
}
}
public void setBigBlueButtonInGW(IBigBlueButtonInGW bbbGW) {
this.bbbGW = bbbGW;
}
}

View File

@ -1,59 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.presentation;
import org.slf4j.Logger;
import org.red5.logging.Red5LoggerFactory;
public class ConversionUpdatesProcessor {
private static Logger log = Red5LoggerFactory.getLogger(ConversionUpdatesProcessor.class, "bigbluebutton");
private PresentationApplication presentationApplication;
public void sendConversionUpdate(String messageKey, String conference,
String code, String presId, String presName) {
presentationApplication.sendConversionUpdate(messageKey, conference,
code, presId, presName);
}
public void sendPageCountError(String messageKey, String conference,
String code, String presId, int numberOfPages,
int maxNumberPages, String presName) {
presentationApplication.sendPageCountError(messageKey, conference,
code, presId, numberOfPages,
maxNumberPages, presName);
}
public void sendSlideGenerated(String messageKey, String conference,
String code, String presId, int numberOfPages,
int pagesCompleted, String presName) {
presentationApplication.sendSlideGenerated(messageKey, conference,
code, presId, numberOfPages, pagesCompleted, presName);
}
public void sendConversionCompleted(String messageKey, String conference,
String code, String presId, Integer numberOfPages, String presName,
String presBaseUrl) {
presentationApplication.sendConversionCompleted(messageKey, conference,
code, presId, numberOfPages, presName, presBaseUrl);
}
public void setPresentationApplication(PresentationApplication a) {
presentationApplication = a;
}
}

View File

@ -1,240 +0,0 @@
package org.bigbluebutton.conference.service.presentation;
import java.util.HashMap;
import java.util.Map;
import org.bigbluebutton.common.messages.GetPresentationInfoMessage;
import org.bigbluebutton.common.messages.GetSlideInfoMessage;
import org.bigbluebutton.common.messages.GoToSlideMessage;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.bigbluebutton.common.messages.RemovePresentationMessage;
import org.bigbluebutton.common.messages.ResizeAndMoveSlideMessage;
import org.bigbluebutton.common.messages.SendConversionCompletedMessage;
import org.bigbluebutton.common.messages.SendConversionUpdateMessage;
import org.bigbluebutton.common.messages.SendCursorUpdateMessage;
import org.bigbluebutton.common.messages.SendPageCountErrorMessage;
import org.bigbluebutton.common.messages.SendSlideGeneratedMessage;
import org.bigbluebutton.common.messages.SharePresentationMessage;
import org.bigbluebutton.conference.service.messaging.redis.MessageHandler;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import com.google.gson.JsonParser;
import com.google.gson.JsonObject;
public class PresentationMessageListener implements MessageHandler {
public static final String OFFICE_DOC_CONVERSION_SUCCESS_KEY = "OFFICE_DOC_CONVERSION_SUCCESS";
public static final String OFFICE_DOC_CONVERSION_FAILED_KEY = "OFFICE_DOC_CONVERSION_FAILED";
public static final String SUPPORTED_DOCUMENT_KEY = "SUPPORTED_DOCUMENT";
public static final String UNSUPPORTED_DOCUMENT_KEY = "UNSUPPORTED_DOCUMENT";
public static final String PAGE_COUNT_FAILED_KEY = "PAGE_COUNT_FAILED";
public static final String PAGE_COUNT_EXCEEDED_KEY = "PAGE_COUNT_EXCEEDED";
public static final String GENERATED_SLIDE_KEY = "GENERATED_SLIDE";
public static final String GENERATING_THUMBNAIL_KEY = "GENERATING_THUMBNAIL";
public static final String GENERATED_THUMBNAIL_KEY = "GENERATED_THUMBNAIL";
public static final String CONVERSION_COMPLETED_KEY = "CONVERSION_COMPLETED";
private ConversionUpdatesProcessor conversionUpdatesProcessor;
private IBigBlueButtonInGW bbbInGW;
public void setConversionUpdatesProcessor(ConversionUpdatesProcessor p) {
conversionUpdatesProcessor = p;
}
public void setBigBlueButtonInGW(IBigBlueButtonInGW inGW) {
bbbInGW = inGW;
}
private void sendConversionUpdate(String messageKey, String conference,
String code, String presId, String filename) {
conversionUpdatesProcessor.sendConversionUpdate(messageKey, conference,
code, presId, filename);
}
public void sendPageCountError(String messageKey, String conference,
String code, String presId, Integer numberOfPages,
Integer maxNumberPages, String filename) {
conversionUpdatesProcessor.sendPageCountError(messageKey, conference,
code, presId, numberOfPages,
maxNumberPages, filename);
}
private void sendSlideGenerated(String messageKey, String conference,
String code, String presId, Integer numberOfPages,
Integer pagesCompleted, String filename) {
conversionUpdatesProcessor.sendSlideGenerated(messageKey, conference,
code, presId, numberOfPages,
pagesCompleted, filename);
}
private void sendConversionCompleted(String messageKey, String conference,
String code, String presId, Integer numberOfPages,
String filename, String presBaseUrl) {
conversionUpdatesProcessor.sendConversionCompleted(messageKey, conference,
code, presId, numberOfPages, filename, presBaseUrl);
}
@Override
public void handleMessage(String pattern, String channel, String message) {
if (channel.equalsIgnoreCase(MessagingConstants.TO_PRESENTATION_CHANNEL)) {
JsonParser parser = new JsonParser();
JsonObject obj = (JsonObject) parser.parse(message);
if (obj.has("header") && obj.has("payload")) {
JsonObject header = (JsonObject) obj.get("header");
if (header.has("name")) {
String messageName = header.get("name").getAsString();
if (SendConversionUpdateMessage.SEND_CONVERSION_UPDATE.equals(messageName)) {
SendConversionUpdateMessage msg = SendConversionUpdateMessage.fromJson(message);
System.out.println("in messageHandler - sendConversionCompleted");
// sendConversionUpdate(msg.messageKey, msg.meetingId, msg.code,
// msg.presId, msg.presName);
bbbInGW.sendConversionUpdate(msg.messageKey, msg.meetingId,
msg.code, msg.presId, msg.presName);
} else if (ResizeAndMoveSlideMessage.RESIZE_AND_MOVE_SLIDE.equals(messageName)) {
System.out.println("in messageHandler - resizeAndMoveSlide");
ResizeAndMoveSlideMessage msg = ResizeAndMoveSlideMessage.fromJson(message);
bbbInGW.resizeAndMoveSlide(msg.meetingId, msg.xOffset, msg.yOffset,
msg.widthRatio, msg.heightRatio);
} else if (GetPresentationInfoMessage.GET_PRESENTATION_INFO.equals(messageName)) {
System.out.println("in messageHandler - getPresentationInfo");
GetPresentationInfoMessage msg = GetPresentationInfoMessage.fromJson(message);
bbbInGW.getPresentationInfo(msg.meetingId, msg.requesterId, msg.replyTo);
} else if (SendConversionCompletedMessage.SEND_CONVERSION_COMPLETED.equals(messageName)) {
System.out.println("in messageHandler - sendConversionCompleted");
SendConversionCompletedMessage msg = SendConversionCompletedMessage.fromJson(message);
// sendConversionCompleted(msg.messageKey, msg.meetingId, msg.code,
// msg.presId, msg.numPages, msg.presName, msg.presBaseUrl);
bbbInGW.sendConversionCompleted(msg.messageKey, msg.meetingId, msg.code,
msg.presId, msg.numPages, msg.presName, msg.presBaseUrl);
} else if (SendPageCountErrorMessage.SEND_PAGE_COUNT_ERROR.equals(messageName)) {
System.out.println("in messageHandler - sendPageCountError");
SendPageCountErrorMessage msg = SendPageCountErrorMessage.fromJson(message);
// sendPageCountError(msg.messageKey, msg.meetingId, msg.code,
// msg.presId, msg.numberOfPages, msg.maxNumberPages, msg.presName);
bbbInGW.sendPageCountError(msg.messageKey, msg.meetingId, msg.code,
msg.presId, msg.numberOfPages, msg.maxNumberPages, msg.presName);
} else if (GoToSlideMessage.GO_TO_SLIDE.equals(messageName)) {
System.out.println("in messageHandler - goToSlide");
GoToSlideMessage msg = GoToSlideMessage.fromJson(message);
bbbInGW.gotoSlide(msg.meetingId, msg.page);
} else if (RemovePresentationMessage.REMOVE_PRESENTATION.equals(messageName)) {
System.out.println("in messageHandler - removePresentation");
RemovePresentationMessage msg = RemovePresentationMessage.fromJson(message);
bbbInGW.removePresentation(msg.meetingId, msg.presentationId);
} else if (SendCursorUpdateMessage.SEND_CURSOR_UPDATE.equals(messageName)) {
SendCursorUpdateMessage msg = SendCursorUpdateMessage.fromJson(message);
bbbInGW.sendCursorUpdate(msg.meetingId, msg.xPercent, msg.yPercent);
} else if (SharePresentationMessage.SHARE_PRESENTATION.equals(messageName)) {
System.out.println("in messageHandler - sharePresentation");
SharePresentationMessage msg = SharePresentationMessage.fromJson(message);
bbbInGW.sharePresentation(msg.meetingId, msg.presentationId, msg.share);
} else if (GetSlideInfoMessage.GET_SLIDE_INFO.equals(messageName)) {
System.out.println("in messageHandler - GetSlideInfo");
GetSlideInfoMessage msg = GetSlideInfoMessage.fromJson(message);
bbbInGW.getSlideInfo(msg.meetingId, msg.requesterId, msg.replyTo);
} else if (SendSlideGeneratedMessage.SEND_SLIDE_GENERATED.equals(messageName)) {
System.out.println("in messageHandler - SendSlideGenerated");
SendSlideGeneratedMessage msg = SendSlideGeneratedMessage.fromJson(message);
bbbInGW.sendSlideGenerated(msg.messageKey, msg.meetingId, msg.code,
msg.presId, msg.numberOfPages, msg.pagesCompleted, msg.presName);
}
}
}
else {
Gson gson = new Gson();
HashMap<String,String> map = gson.fromJson(message, new TypeToken<Map<String, String>>() {}.getType());
String code = (String) map.get("returnCode");
String presId = (String) map.get("presentationId");
String filename = (String) map.get("filename");
String conference = (String) map.get("conference");
String messageKey = (String) map.get("messageKey");
if (messageKey.equalsIgnoreCase(OFFICE_DOC_CONVERSION_SUCCESS_KEY) ||
messageKey.equalsIgnoreCase(OFFICE_DOC_CONVERSION_FAILED_KEY) ||
messageKey.equalsIgnoreCase(SUPPORTED_DOCUMENT_KEY) ||
messageKey.equalsIgnoreCase(UNSUPPORTED_DOCUMENT_KEY) ||
messageKey.equalsIgnoreCase(GENERATING_THUMBNAIL_KEY) ||
messageKey.equalsIgnoreCase(GENERATED_THUMBNAIL_KEY) ||
messageKey.equalsIgnoreCase(PAGE_COUNT_FAILED_KEY)){
sendConversionUpdate(messageKey, conference, code, presId, filename);
} else if(messageKey.equalsIgnoreCase(PAGE_COUNT_EXCEEDED_KEY)){
Integer numberOfPages = new Integer((String) map.get("numberOfPages"));
Integer maxNumberPages = new Integer((String) map.get("maxNumberPages"));
sendPageCountError(messageKey, conference, code,
presId, numberOfPages, maxNumberPages, filename);
} else if(messageKey.equalsIgnoreCase(GENERATED_SLIDE_KEY)){
Integer numberOfPages = new Integer((String) map.get("numberOfPages"));
Integer pagesCompleted = new Integer((String) map.get("pagesCompleted"));
sendSlideGenerated(messageKey, conference, code,
presId, numberOfPages, pagesCompleted, filename);
} else if(messageKey.equalsIgnoreCase(CONVERSION_COMPLETED_KEY)){
Integer numberOfPages = new Integer((String) map.get("numberOfPages"));
String presBaseUrl = (String) map.get("presentationBaseUrl");
sendConversionCompleted(messageKey, conference, code,
presId, numberOfPages, filename, presBaseUrl);
}
}
}
}
// @Override
// public void handleMessage(String pattern, String channel, String message) {
//
// if (channel.equalsIgnoreCase(MessagingConstants.TO_PRESENTATION_CHANNEL)) {
//
// JsonParser parser = new JsonParser();
// JsonObject obj = (JsonObject) parser.parse(message);
//
// if(obj.has("payload") && obj.has("header")) {
//
// JsonObject headerObject = (JsonObject) obj.get("header");
// JsonObject payloadObject = (JsonObject) obj.get("payload");
//
// String eventName = headerObject.get("name").toString().replace("\"", "");
//
// if(eventName.equalsIgnoreCase("presentation_page_changed_message") ||
// eventName.equalsIgnoreCase("presentation_page_resized_message")) {
//
// JsonObject pageObject = (JsonObject) payloadObject.get("page");
// String roomName = payloadObject.get("meeting_id").toString().replace("\"", "");
//
// if(eventName.equalsIgnoreCase("presentation_page_changed_message")) {
// String pageId = pageObject.get("id").toString().replace("\"", "");
// bbbInGW.gotoSlide(roomName, pageId);
// } else if(eventName.equalsIgnoreCase("presentation_page_resized_message")) {
// String xOffset = pageObject.get("x_offset").toString().replace("\"", "");
// String yOffset = pageObject.get("y_offset").toString().replace("\"", "");
// String widthRatio = pageObject.get("width_ratio").toString().replace("\"", "");
// String heightRatio = pageObject.get("height_ratio").toString().replace("\"", "");
// bbbInGW.resizeAndMoveSlide(roomName, Double.parseDouble(xOffset), Double.parseDouble(yOffset), Double.parseDouble(widthRatio), Double.parseDouble(heightRatio));
// }
// }
// }
//
// }
// }
}

View File

@ -1,12 +0,0 @@
package org.bigbluebutton.conference.service.presentation;
public class PreuploadedPresentation {
public final String id;
public final int numPages;
public PreuploadedPresentation(String id, int numPages) {
this.id = id;
this.numPages = numPages;
}
}

View File

@ -1,55 +0,0 @@
package org.bigbluebutton.conference.service.presentation;
import java.io.File;
import java.io.FileFilter;
import java.io.FilenameFilter;
import java.util.ArrayList;
public class PreuploadedPresentationsUtil {
private String bbbDir = "/var/bigbluebutton/";
public ArrayList<PreuploadedPresentation> getPreuploadedPresentations(String meetingID) {
ArrayList<PreuploadedPresentation> preuploadedPresentations = new ArrayList<PreuploadedPresentation>();
try {
// TODO: this is hard-coded, and not really a great abstraction. need to fix this up later
String folderPath = bbbDir + meetingID + "/" + meetingID;
File folder = new File(folderPath);
//log.debug("folder: {} - exists: {} - isDir: {}", folder.getAbsolutePath(), folder.exists(), folder.isDirectory());
if (folder.exists() && folder.isDirectory()) {
File[] presentations = folder.listFiles(new FileFilter() {
public boolean accept(File path) {
return path.isDirectory();
}
});
for (File presFile : presentations) {
int numPages = getNumPages(presFile);
PreuploadedPresentation p = new PreuploadedPresentation(presFile.getName(), numPages);
preuploadedPresentations.add(p);
}
}
} catch (Exception ex) {
}
return preuploadedPresentations;
}
private int getNumPages(File presDir) {
File[] files = presDir.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".swf");
}
});
return files.length;
}
public void setBigBlueButtonDirectory(String dir) {
if (dir.endsWith("/")) bbbDir = dir;
else bbbDir = dir + "/";
}
}

View File

@ -1,85 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder;
import java.util.HashMap;
/**
* Abstract class for all events that need to be recorded.
* @author Richard Alam
*
*/
public abstract class RecordEvent {
protected final HashMap<String, String> eventMap = new HashMap<String, String>();
protected final static String MODULE = "module";
protected final static String TIMESTAMP = "timestamp";
protected final static String MEETING = "meetingId";
protected final static String EVENT = "eventName";
public final String getMeetingID() {
return eventMap.get(MEETING);
}
/**
* Set the module that generated the event.
* @param module
*/
public final void setModule(String module) {
eventMap.put(MODULE, module);
}
/**
* Set the timestamp of the event.
* @param timestamp
*/
public final void setTimestamp(long timestamp) {
eventMap.put(TIMESTAMP, Long.toString(timestamp));
}
/**
* Set the meetingId for this particular event.
* @param meetingId
*/
public final void setMeetingId(String meetingId) {
eventMap.put(MEETING, meetingId);
}
/**
* Set the name of the event.
* @param event
*/
public final void setEvent(String event) {
eventMap.put(EVENT, event);
}
/**
* Convert the event into a Map to be recorded.
* @return
*/
public final HashMap<String, String> toMap() {
return eventMap;
}
@Override
public String toString() {
return eventMap.get(MODULE) + " " + eventMap.get(EVENT);
}
}

View File

@ -1,35 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder;
/**
*
* The IRecorder interface define all the neccesary methods to implement for
* dispatch events to a JMS queue
*
* */
public interface Recorder {
/**
* Receive the messages from the bigbluebutton modules and send
* them to a queue. These messages are the events generated in a conference.
* @param message a JSON String message with the attributes of an event
*/
public void record(String session, RecordEvent event);
}

View File

@ -1,108 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import org.bigbluebutton.service.recording.RedisListRecorder;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
/**
*
* The RecorderApplication class is used for setting the record module
* in BigBlueButton for send events messages to a JMS queue.
* The class follows the same standard as the others modules of BigBlueButton Apps.
*/
public class RecorderApplication {
private static Logger log = Red5LoggerFactory.getLogger(RecorderApplication.class, "bigbluebutton");
private static final int NTHREADS = 1;
private static final Executor exec = Executors.newFixedThreadPool(NTHREADS);
private static final Executor runExec = Executors.newFixedThreadPool(NTHREADS);
private BlockingQueue<RecordEvent> messages;
private volatile boolean recordEvents = false;
private RedisListRecorder redisListRecorder;
private Recorder recorder;
public RecorderApplication() {
messages = new LinkedBlockingQueue<RecordEvent>();
}
public void start() {
recordEvents = true;
Runnable sender = new Runnable() {
public void run() {
while (recordEvents) {
RecordEvent message;
try {
message = messages.take();
recordEvent(message);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
};
exec.execute(sender);
}
public void stop() {
recordEvents = false;
}
public void destroyRecordSession(String meetingID) {
// recordingSessions.remove(meetingID);
}
public void createRecordSession(String meetingID) {
// recordingSessions.put(meetingID, meetingID);
}
public void record(String meetingID, RecordEvent message) {
messages.offer(message);
}
private void recordEvent(final RecordEvent message) {
Runnable task = new Runnable() {
public void run() {
recorder.record(message.getMeetingID(), message);
}
};
runExec.execute(task);
}
public void setRecorder(Recorder recorder) {
this.recorder = recorder;
log.debug("setting recorder");
}
public void setRedisListRecorder(RedisListRecorder rec) {
redisListRecorder = rec;
}
}

View File

@ -1,57 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
public class RedisDispatcher implements Recorder {
private static Logger log = Red5LoggerFactory.getLogger(Recorder.class, "bigbluebutton");
private static final String COLON=":";
JedisPool redisPool;
public RedisDispatcher() {
super();
log.debug("setting redis dispatcher");
}
@Override
public void record(String session, RecordEvent message) {
Jedis jedis = redisPool.getResource();
try {
Long msgid = jedis.incr("global:nextRecordedMsgId");
jedis.hmset("recording" + COLON + session + COLON + msgid, message.toMap());
jedis.rpush("meeting" + COLON + session + COLON + "recordings", msgid.toString());
} finally {
redisPool.returnResource(jedis);
}
}
public JedisPool getRedisPool() {
return redisPool;
}
public void setRedisPool(JedisPool redisPool) {
this.redisPool = redisPool;
}
}

View File

@ -1,28 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.chat;
import org.bigbluebutton.conference.service.recorder.RecordEvent;
public abstract class AbstractChatRecordEvent extends RecordEvent {
public AbstractChatRecordEvent() {
setModule("CHAT");
}
}

View File

@ -1,43 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.chat;
public class PublicChatRecordEvent extends AbstractChatRecordEvent {
private static final String SENDER = "sender";
private static final String MESSAGE = "message";
private static final String COLOR = "color";
public PublicChatRecordEvent() {
super();
setEvent("PublicChatEvent");
}
public void setSender(String sender) {
eventMap.put(SENDER, sender);
}
public void setMessage(String message) {
eventMap.put(MESSAGE, message);
}
public void setColor(String color) {
eventMap.put(COLOR, color);
}
}

View File

@ -1,28 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.participants;
import org.bigbluebutton.conference.service.recorder.RecordEvent;
public abstract class AbstractParticipantRecordEvent extends RecordEvent {
public AbstractParticipantRecordEvent() {
setModule("PARTICIPANT");
}
}

View File

@ -1,39 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.participants;
public class AssignPresenterRecordEvent extends AbstractParticipantRecordEvent {
public AssignPresenterRecordEvent() {
super();
setEvent("AssignPresenterEvent");
}
public void setUserId(String userid) {
eventMap.put("userid", userid);
}
public void setName(String name) {
eventMap.put("name", name);
}
public void setAssignedBy(String by) {
eventMap.put("assignedBy", by);
}
}

View File

@ -1,27 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.participants;
public class ParticipantEndAndKickAllRecordEvent extends AbstractParticipantRecordEvent {
public ParticipantEndAndKickAllRecordEvent() {
super();
setEvent("EndAndKickAllEvent");
}
}

View File

@ -1,47 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.participants;
public class ParticipantJoinRecordEvent extends AbstractParticipantRecordEvent {
public ParticipantJoinRecordEvent() {
super();
setEvent("ParticipantJoinEvent");
}
public void setUserId(String userId) {
eventMap.put("userId", userId);
}
public void setName(String name){
eventMap.put("name",name);
}
/**
* Sets the role of the user as MODERATOR or VIEWER
* @param role
*/
public void setRole(String role) {
eventMap.put("role", role);
}
public void setStatus(String status) {
eventMap.put("status", status);
}
}

View File

@ -1,32 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.participants;
public class ParticipantLeftRecordEvent extends AbstractParticipantRecordEvent {
public ParticipantLeftRecordEvent() {
super();
setEvent("ParticipantLeftEvent");
}
public void setUserId(String userId) {
eventMap.put("userId", userId);
}
}

View File

@ -1,39 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.participants;
public class ParticipantStatusChangeRecordEvent extends AbstractParticipantRecordEvent {
public ParticipantStatusChangeRecordEvent() {
super();
setEvent("ParticipantStatusChangeEvent");
}
public void setUserId(String userId) {
eventMap.put("userId", userId);
}
public void setStatus(String status) {
eventMap.put("status", status);
}
public void setValue(String value) {
eventMap.put("value", value);
}
}

View File

@ -1,35 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.participants;
public class RecordStatusRecordEvent extends AbstractParticipantRecordEvent {
public RecordStatusRecordEvent() {
super();
setEvent("RecordStatusEvent");
}
public void setUserId(String userId) {
eventMap.put("userId", userId);
}
public void setRecordingStatus(String status) {
eventMap.put("status", status);
}
}

View File

@ -1,29 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.polling;
import org.bigbluebutton.conference.service.recorder.RecordEvent;
public abstract class AbstractPollRecordEvent extends RecordEvent {
public AbstractPollRecordEvent() {
setModule("POLL");
}
}

View File

@ -1,35 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.polling;
public class PollClearedRecordEvent extends AbstractPollRecordEvent {
private static final String POLL_ID = "pollID";
public PollClearedRecordEvent(){
super();
setEvent("PollClearedEvent");
}
public void setPollID(String pollID) {
eventMap.put(POLL_ID, pollID);
}
}

View File

@ -1,66 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.polling;
public class PollCreatedRecordEvent extends AbstractPollRecordEvent {
private static final String POLL_ID = "pollID";
private static final String TITLE = "title";
private static final String QUESTION_PATTERN = "question";
private static final String QUESTION_TEXT = "text";
private static final String QUESTION_MULTIRESPONSE = "multiresponse";
private static final String RESPONSE_PATTERN = "response";
private static final String RESPONSE_TEXT = "text";
private static final String RESPONDER_PATTERN = "responder";
private static final String RESPONDER_USER = "user";
private static final String SEPARATOR = "-";
public PollCreatedRecordEvent() {
super();
setEvent("PollCreatedEvent");
}
public void setPollID(String pollID) {
eventMap.put(POLL_ID, pollID);
}
public void setTitle(String title) {
eventMap.put(TITLE, title);
}
public void addQuestion(String id, String question, Boolean multiresponse) {
eventMap.put(QUESTION_PATTERN + SEPARATOR + id + SEPARATOR + QUESTION_TEXT, question);
eventMap.put(QUESTION_PATTERN + SEPARATOR + id + SEPARATOR + QUESTION_MULTIRESPONSE, multiresponse.toString());
}
public void addResponse(String questionID, String responseID, String response) {
eventMap.put(QUESTION_PATTERN + SEPARATOR + questionID + SEPARATOR + RESPONSE_PATTERN + SEPARATOR + responseID + RESPONSE_TEXT, response);
}
/*public void addResponder(String questionID, String responseID, String responderID, String userID) {
eventMap.put(QUESTION_PATTERN + SEPARATOR + questionID + SEPARATOR + RESPONSE_PATTERN + SEPARATOR + responseID + RESPONSE_TEXT, response);
}*/
}

View File

@ -1,37 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.polling;
public class PollRemovedRecordEvent extends AbstractPollRecordEvent {
private static final String POLL_ID = "pollID";
public PollRemovedRecordEvent(){
super();
setEvent("PollRemovedEvent");
}
public void setPollID(String pollID) {
eventMap.put(POLL_ID, pollID);
}
}

View File

@ -1,35 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.polling;
public class PollStartedRecordEvent extends AbstractPollRecordEvent {
private static final String POLL_ID = "pollID";
public PollStartedRecordEvent(){
super();
setEvent("PollStartedEvent");
}
public void setPollID(String pollID) {
eventMap.put(POLL_ID, pollID);
}
}

View File

@ -1,35 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.polling;
public class PollStoppedRecordEvent extends AbstractPollRecordEvent {
private static final String POLL_ID = "pollID";
public PollStoppedRecordEvent(){
super();
setEvent("PollStoppedEvent");
}
public void setPollID(String pollID) {
eventMap.put(POLL_ID, pollID);
}
}

View File

@ -1,60 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.polling;
public class PollUpdatedRecordEvent extends AbstractPollRecordEvent {
private static final String POLL_ID = "pollID";
private static final String TITLE = "title";
private static final String QUESTION_PATTERN = "question";
private static final String QUESTION_TEXT = "text";
private static final String QUESTION_MULTIRESPONSE = "multiresponse";
private static final String RESPONSE_PATTERN = "response";
private static final String RESPONSE_TEXT = "text";
private static final String RESPONDER_PATTERN = "responder";
private static final String RESPONDER_USER = "user";
private static final String SEPARATOR = "-";
public PollUpdatedRecordEvent(){
super();
setEvent("PollUpdatedEvent");
}
public void setPollID(String pollID) {
eventMap.put(POLL_ID, pollID);
}
public void setTitle(String title) {
eventMap.put(TITLE, title);
}
public void addQuestion(String id, String question, Boolean multiresponse) {
eventMap.put(QUESTION_PATTERN + SEPARATOR + id + SEPARATOR + QUESTION_TEXT, question);
eventMap.put(QUESTION_PATTERN + SEPARATOR + id + SEPARATOR + QUESTION_MULTIRESPONSE, multiresponse.toString());
}
public void addResponse(String questionID, String responseID, String response) {
eventMap.put(QUESTION_PATTERN + SEPARATOR + questionID + SEPARATOR + RESPONSE_PATTERN + SEPARATOR + responseID + RESPONSE_TEXT, response);
}
}

View File

@ -1,28 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.presentation;
import org.bigbluebutton.conference.service.recorder.RecordEvent;
public abstract class AbstractPresentationRecordEvent extends RecordEvent {
public AbstractPresentationRecordEvent() {
setModule("PRESENTATION");
}
}

View File

@ -1,40 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.presentation;
public class ConversionCompletedPresentationRecordEvent extends
AbstractPresentationRecordEvent {
public ConversionCompletedPresentationRecordEvent() {
super();
setEvent("ConversionCompletedEvent");
}
public void setPresentationName(String name) {
eventMap.put("presentationName", name);
}
public void setOriginalFilename(String name) {
eventMap.put("originalFilename", name);
}
public void setSlidesInfo(String slidesInfo) {
eventMap.put("slidesInfo", slidesInfo);
}
}

View File

@ -1,36 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.presentation;
public class CursorUpdateRecordEvent extends AbstractPresentationRecordEvent{
public CursorUpdateRecordEvent() {
super();
setEvent("CursorMoveEvent");
}
public void setXPercent(double percent) {
eventMap.put("xOffset", Double.toString(percent));
}
public void setYPercent(double percent) {
eventMap.put("yOffset", Double.toString(percent));
}
}

View File

@ -1,40 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.presentation;
public class GenerateSlidePresentationRecordEvent extends
AbstractPresentationRecordEvent {
public GenerateSlidePresentationRecordEvent() {
super();
setEvent("GenerateSlideEvent");
}
public void setPresentationName(String name) {
eventMap.put("presentationName", name);
}
public void setNumberOfPages(int numPages) {
eventMap.put("numberOfPages", Integer.toString(numPages));
}
public void setPagesCompleted(int pagesCompleted) {
eventMap.put("pagesCompleted", Integer.toString(pagesCompleted));
}
}

View File

@ -1,81 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.presentation;
public class GotoSlidePresentationRecordEvent extends
AbstractPresentationRecordEvent {
public GotoSlidePresentationRecordEvent() {
super();
setEvent("GotoSlideEvent");
}
public void setSlide(int slide) {
/**
* Subtract 1 from the page number to be zero-based to be
* compatible with 0.81 and earlier. (ralam Sept 2, 2014)
*/
eventMap.put("slide", Integer.toString(slide - 1));
}
public void setId(String id) {
eventMap.put("id", id);
}
public void setNum(int num) {
eventMap.put("num", Integer.toString(num));
}
public void setCurrent(boolean current) {
eventMap.put("current", Boolean.toString(current));
}
public void setThumbUri(String thumbUri) {
eventMap.put("thumbUri", thumbUri);
}
public void setSwfUri(String swfUri) {
eventMap.put("swfUri", swfUri);
}
public void setTxtUri(String txtUri) {
eventMap.put("txtUri", txtUri);
}
public void setPngUri(String pngUri) {
eventMap.put("pngUri", pngUri);
}
public void setXOffset(double offset) {
eventMap.put("xOffset", Double.toString(offset));
}
public void setYOffset(double offset) {
eventMap.put("yOffset", Double.toString(offset));
}
public void setWidthRatio(double ratio) {
eventMap.put("widthRatio", Double.toString(ratio));
}
public void setHeightRatio(double ratio) {
eventMap.put("heightRatio", Double.toString(ratio));
}
}

View File

@ -1,33 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.presentation;
public class RemovePresentationPresentationRecordEvent extends
AbstractPresentationRecordEvent {
public RemovePresentationPresentationRecordEvent() {
super();
setEvent("RemovePresentationEvent");
}
public void setPresentationName(String name) {
eventMap.put("presentationName", name);
}
}

View File

@ -1,72 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.presentation;
public class ResizeAndMoveSlidePresentationRecordEvent extends
AbstractPresentationRecordEvent {
public ResizeAndMoveSlidePresentationRecordEvent() {
super();
setEvent("ResizeAndMoveSlideEvent");
}
public void setId(String id) {
eventMap.put("id", id);
}
public void setNum(int num) {
eventMap.put("num", Integer.toString(num));
}
public void setCurrent(boolean current) {
eventMap.put("current", Boolean.toString(current));
}
public void setThumbUri(String thumbUri) {
eventMap.put("thumbUri", thumbUri);
}
public void setSwfUri(String swfUri) {
eventMap.put("swfUri", swfUri);
}
public void setTxtUri(String txtUri) {
eventMap.put("txtUri", txtUri);
}
public void setPngUri(String pngUri) {
eventMap.put("pngUri", pngUri);
}
public void setXOffset(double offset) {
eventMap.put("xOffset", Double.toString(offset));
}
public void setYOffset(double offset) {
eventMap.put("yOffset", Double.toString(offset));
}
public void setWidthRatio(double ratio) {
eventMap.put("widthRatio", Double.toString(ratio));
}
public void setHeightRatio(double ratio) {
eventMap.put("heightRatio", Double.toString(ratio));
}
}

View File

@ -1,40 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder.presentation;
public class SharePresentationPresentationRecordEvent extends
AbstractPresentationRecordEvent {
public SharePresentationPresentationRecordEvent() {
super();
setEvent("SharePresentationEvent");
}
public void setPresentationName(String name) {
eventMap.put("presentationName", name);
}
public void setOriginalFilename(String name) {
eventMap.put("originalFilename", name);
}
public void setShare(boolean share) {
eventMap.put("share", Boolean.toString(share));
}
}

View File

@ -1,50 +0,0 @@
package org.bigbluebutton.conference.service.voice;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.bigbluebutton.conference.service.messaging.redis.MessageHandler;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
public class VoiceMessageListener implements MessageHandler{
private IBigBlueButtonInGW bbbGW;
public void setBigBlueButtonInGW(IBigBlueButtonInGW bbbGW) {
this.bbbGW = bbbGW;
}
@Override
public void handleMessage(String pattern, String channel, String message) {
if (channel.equalsIgnoreCase(MessagingConstants.TO_VOICE_CHANNEL)) {
JsonParser parser = new JsonParser();
JsonObject obj = (JsonObject) parser.parse(message);
JsonObject headerObject = (JsonObject) obj.get("header");
JsonObject payloadObject = (JsonObject) obj.get("payload");
String eventName = headerObject.get("name").toString().replace("\"", "");
if (eventName.equalsIgnoreCase(MessagingConstants.MUTE_USER_REQUEST)){
String meetingID = payloadObject.get("meeting_id").toString().replace("\"", "");
String requesterID = payloadObject.get("requester_id").toString().replace("\"", "");
String userID = payloadObject.get("userid").toString().replace("\"", "");
String muteString = payloadObject.get(VoiceKeyUtil.MUTE).toString().replace("\"", "");
Boolean mute = Boolean.valueOf(muteString);
System.out.println("handling mute_user_request");
bbbGW.muteUser(meetingID, requesterID, userID, mute);
}
else if (eventName.equalsIgnoreCase(MessagingConstants.USER_LEFT_VOICE_REQUEST)){
String meetingID = payloadObject.get("meeting_id").toString().replace("\"", "");
String userID = payloadObject.get("userid").toString().replace("\"", "");
System.out.println("handling user_left_voice_request");
bbbGW.voiceUserLeft(meetingID, userID);
}
}
}
}

View File

@ -1,68 +0,0 @@
package org.bigbluebutton.conference.service.whiteboard;
import org.bigbluebutton.common.messages.ClearWhiteboardRequestMessage;
import org.bigbluebutton.common.messages.EnableWhiteboardRequestMessage;
import org.bigbluebutton.common.messages.IsWhiteboardEnabledRequestMessage;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.bigbluebutton.common.messages.RequestWhiteboardAnnotationHistoryRequestMessage;
import org.bigbluebutton.common.messages.SendWhiteboardAnnotationRequestMessage;
import org.bigbluebutton.common.messages.UndoWhiteboardRequest;
import org.bigbluebutton.conference.service.messaging.redis.MessageHandler;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import org.bigbluebutton.core.api.Red5BBBInGw;
import com.google.gson.JsonParser;
import com.google.gson.JsonObject;
public class WhiteboardListener implements MessageHandler{
private IBigBlueButtonInGW bbbInGW;
public void setBigBlueButtonInGW(IBigBlueButtonInGW bbbInGW) {
this.bbbInGW = bbbInGW;
}
@Override
public void handleMessage(String pattern, String channel, String message) {
if (channel.equalsIgnoreCase(MessagingConstants.TO_WHITEBOARD_CHANNEL)) {
JsonParser parser = new JsonParser();
JsonObject obj = (JsonObject) parser.parse(message);
if (obj.has("header") && obj.has("payload")) {
JsonObject header = (JsonObject) obj.get("header");
if (header.has("name")) {
String messageName = header.get("name").getAsString();
if (UndoWhiteboardRequest.UNDO_WHITEBOARD_REQUEST.equals(messageName)) {
System.out.println("inListener:UNDO_WHITEBOARD_REQUEST");
UndoWhiteboardRequest msg = UndoWhiteboardRequest.fromJson(message);
bbbInGW.undoWhiteboard(msg.meetingId, msg.requesterId, msg.whiteboardId);
} else if (ClearWhiteboardRequestMessage.CLEAR_WHITEBOARD_REQUEST.equals(messageName)) {
System.out.println("inListener:CLEAR_WHITEBOARD_REQUEST");
ClearWhiteboardRequestMessage msg = ClearWhiteboardRequestMessage.fromJson(message);
bbbInGW.clearWhiteboard(msg.meetingId, msg.requesterId, msg.whiteboardId);
} else if (RequestWhiteboardAnnotationHistoryRequestMessage.REQUEST_WHITEBOARD_ANNOTATION_HISTORY_REQUEST.equals(messageName)) {
System.out.println("inListener:REQUEST_WHITEBOARD_ANNOTATION_HISTORY_REQUEST");
RequestWhiteboardAnnotationHistoryRequestMessage msg = RequestWhiteboardAnnotationHistoryRequestMessage.fromJson(message);
bbbInGW.requestWhiteboardAnnotationHistory(msg.meetingId, msg.requesterId, msg.whiteboardId, msg.replyTo);
} else if (IsWhiteboardEnabledRequestMessage.IS_WHITEBOARD_ENABLED_REQUEST.equals(messageName)) {
System.out.println("inListener: IS_WHITEBOARD_ENABLED_REQUEST");
IsWhiteboardEnabledRequestMessage msg = IsWhiteboardEnabledRequestMessage.fromJson(message);
bbbInGW.isWhiteboardEnabled(msg.meetingId, msg.requesterId, msg.replyTo);
} else if (EnableWhiteboardRequestMessage.ENABLE_WHITEBOARD_REQUEST.equals(messageName)) {
System.out.println("inListener: ENABLE_WHITEBOARD_REQUEST");
EnableWhiteboardRequestMessage msg = EnableWhiteboardRequestMessage.fromJson(message);
bbbInGW.enableWhiteboard(msg.meetingId, msg.requesterId, msg.enable);
} else if (SendWhiteboardAnnotationRequestMessage.SEND_WHITEBOARD_ANNOTATION_REQUEST.equals(messageName)) {
System.out.println("inListener: SEND_WHITEBOARD_ANNOTATION_REQUEST");
SendWhiteboardAnnotationRequestMessage msg = SendWhiteboardAnnotationRequestMessage.fromJson(message);
bbbInGW.sendWhiteboardAnnotation(msg.meetingId, msg.requesterId, msg.annotation);
}
}
}
}
}
}

View File

@ -1,46 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.whiteboard.redis;
import org.bigbluebutton.conference.service.recorder.RecordEvent;
public abstract class AbstractWhiteboardRecordEvent extends RecordEvent {
public AbstractWhiteboardRecordEvent() {
setModule("WHITEBOARD");
}
public void setPresentation(String name) {
eventMap.put("presentation", name);
}
public void setPageNumber(String page) {
/**
* Subtract 1 from the page number to be zero-based to be
* compatible with 0.81 and earlier. (ralam Sept 2, 2014)
*/
Integer num = new Integer(page);
// System.out.println("WB Page Number real pagenum=[" + num + "] rec pagenum=[" + (num - 1) + "]");
eventMap.put("pageNumber", new Integer(num - 1).toString());
}
public void setWhiteboardId(String id) {
eventMap.put("whiteboardId", id);
}
}

View File

@ -1,69 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.whiteboard.redis;
import java.util.ArrayList;
import java.util.Map;
public class AddShapeWhiteboardRecordEvent extends AbstractWhiteboardRecordEvent {
public AddShapeWhiteboardRecordEvent() {
super();
setEvent("AddShapeEvent");
}
public void addAnnotation(Map<String, Object> annotation) {
for (Map.Entry<String, Object> entry : annotation.entrySet()) {
String key = entry.getKey();
if (key.equals("points")) {
eventMap.put("dataPoints", pointsToString((ArrayList<Object>)entry.getValue()));
} else {
Object value = entry.getValue();
eventMap.put(key, value.toString());
}
}
}
private String pointsToString(ArrayList<Object> points){
String datapoints = "";
for (int i = 0; i < points.size(); i++) {
datapoints += (points.get(i)).toString() + ",";
}
// Trim the trailing comma
return datapoints.substring(0, datapoints.length() - 1);
}
public void setFillColor(int fillColor) {
eventMap.put("fillColor", Integer.toString(fillColor));
}
public void setThickness(int thickness) {
eventMap.put("thickness", Integer.toString(thickness));
}
public void setFill(boolean fill) {
eventMap.put("fill", Boolean.toString(fill));
}
public void setTransparent(boolean transparent) {
eventMap.put("transparent", Boolean.toString(transparent));
}
}

View File

@ -1,54 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.whiteboard.redis;
import java.util.ArrayList;
import java.util.Map;
public class AddTextWhiteboardRecordEvent extends AbstractWhiteboardRecordEvent {
public AddTextWhiteboardRecordEvent() {
super();
setEvent("AddTextEvent");
}
public void addAnnotation(Map<String, Object> annotation) {
for (Map.Entry<String, Object> entry : annotation.entrySet()) {
String key = entry.getKey();
if (key.equals("points")) {
ArrayList<Double> value = (ArrayList<Double>)entry.getValue();
eventMap.put("dataPoints", pointsToString(value));
} else {
Object value = entry.getValue();
eventMap.put(key, value.toString());
}
}
}
private String pointsToString(ArrayList<Double> points){
String datapoints = "";
for (Double i : points) {
datapoints += i + ",";
}
// Trim the trailing comma
return datapoints.substring(0, datapoints.length() - 1);
}
}

View File

@ -1,28 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.whiteboard.redis;
public class ClearPageWhiteboardRecordEvent extends
AbstractWhiteboardRecordEvent {
public ClearPageWhiteboardRecordEvent() {
super();
setEvent("ClearPageEvent");
}
}

View File

@ -1,53 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.whiteboard.redis;
import java.util.ArrayList;
import java.util.Map;
public class ModifyTextWhiteboardRecordEvent extends AbstractWhiteboardRecordEvent {
public ModifyTextWhiteboardRecordEvent() {
super();
setEvent("ModifyTextEvent");
}
public void addAnnotation(Map<String, Object> annotation) {
for (Map.Entry<String, Object> entry : annotation.entrySet()) {
String key = entry.getKey();
if (key.equals("points")) {
ArrayList<Double> value = (ArrayList<Double>)entry.getValue();
eventMap.put("dataPoints", pointsToString(value));
} else {
Object value = entry.getValue();
eventMap.put(key, value.toString());
}
}
}
private String pointsToString(ArrayList<Double> points){
String datapoints = "";
for (Double i : points) {
datapoints += i + ",";
}
// Trim the trailing comma
return datapoints.substring(0, datapoints.length() - 1);
}
}

View File

@ -1,33 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.whiteboard.redis;
public class ToggleGridWhiteboardRecordEvent extends
AbstractWhiteboardRecordEvent {
public ToggleGridWhiteboardRecordEvent() {
super();
setEvent("ToggleGridEvent");
}
public void setGridEnabled(boolean enabled) {
eventMap.put("gridEnabled", Boolean.toString(enabled));
}
}

View File

@ -1,32 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.whiteboard.redis;
public class UndoShapeWhiteboardRecordEvent extends
AbstractWhiteboardRecordEvent {
public UndoShapeWhiteboardRecordEvent() {
super();
setEvent("UndoShapeEvent");
}
public void setShapeId(String id) {
eventMap.put("shapeId", id);
}
}

View File

@ -1,6 +0,0 @@
package org.bigbluebutton.core.api;
public interface IDispatcher {
void dispatch(String jsonMessage);
}

View File

@ -1,5 +0,0 @@
package org.bigbluebutton.core.api;
public interface IOutMessage {
}

View File

@ -1,23 +0,0 @@
package org.bigbluebutton.core.api;
import java.util.Set;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
public class MessageOutGateway {
private static Logger log = Red5LoggerFactory.getLogger(MessageOutGateway.class, "bigbluebutton");
private Set<OutMessageListener2> listeners;
public void send(IOutMessage msg) {
// log.debug("before listeners send. check message:" + msg);
for (OutMessageListener2 l : listeners) {
// log.debug("listener " + l);
l.handleMessage(msg);
}
}
public void setListeners(Set<OutMessageListener2> listeners) {
this.listeners = listeners;
}
}

View File

@ -1,6 +0,0 @@
package org.bigbluebutton.core.api;
public interface OutMessageListener2 {
void handleMessage(IOutMessage msg);
}

View File

@ -48,9 +48,7 @@ import org.bigbluebutton.common.messages.UserRaisedHandMessage;
import org.bigbluebutton.common.messages.UserShareWebcamRequestMessage;
import org.bigbluebutton.common.messages.UserUnshareWebcamRequestMessage;
import org.bigbluebutton.common.messages.ValidateAuthTokenMessage;
import org.bigbluebutton.conference.service.messaging.redis.MessageSender;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import org.bigbluebutton.red5.pubsub.redis.MessageSender;
public class Red5BBBInGw implements IBigBlueButtonInGW {
@ -351,7 +349,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void removePresentation(String meetingID, String presentationID) {
System.out.println("~~removePresentation in Red5BBBInGw");
RemovePresentationMessage msg = new RemovePresentationMessage(meetingID, presentationID);
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
}
@ -361,7 +358,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
String replyTo) {
GetPresentationInfoMessage msg = new GetPresentationInfoMessage(meetingID,
requesterID, replyTo);
System.out.println("~~getPresentationInfo in Red5BBBInGw");
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
}
@ -379,7 +375,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
public void resizeAndMoveSlide(String meetingID, double xOffset,
double yOffset, double widthRatio, double heightRatio) {
System.out.println("~~resizeAndMoveSlide in Red5BBBInGw");
ResizeAndMoveSlideMessage msg = new ResizeAndMoveSlideMessage(meetingID,
xOffset, yOffset, widthRatio, heightRatio);
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
@ -387,7 +382,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void gotoSlide(String meetingID, String page) {
System.out.println("~~gotoSlide in Red5BBBInGw");
GoToSlideMessage msg = new GoToSlideMessage(meetingID, page);
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
}
@ -395,7 +389,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void sharePresentation(String meetingID, String presentationID,
boolean share) {
System.out.println("~~sharePresentation in Red5BBBInGw");
SharePresentationMessage msg = new SharePresentationMessage(meetingID, presentationID, share);
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
}
@ -403,7 +396,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void getSlideInfo(String meetingID, String requesterID,
String replyTo) {
System.out.println("~~getSlideInfo in Red5BBBInGw");
GetSlideInfoMessage msg = new GetSlideInfoMessage(meetingID, requesterID,
replyTo);
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
@ -412,7 +404,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void sendConversionUpdate(String messageKey, String meetingId,
String code, String presId, String presName) {
System.out.println("~~sendConversionUpdate in Red5BBBInGw");
SendConversionUpdateMessage msg = new SendConversionUpdateMessage(messageKey, meetingId,
code, presId, presName);
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
@ -422,7 +413,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
public void sendPageCountError(String messageKey, String meetingId,
String code, String presId, int numberOfPages, int maxNumberPages,
String presName) {
System.out.println("~~sendPageCountError in Red5BBBInGw");
SendPageCountErrorMessage msg = new SendPageCountErrorMessage(messageKey, meetingId,
code, presId, numberOfPages, maxNumberPages, presName);
@ -433,7 +423,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
public void sendSlideGenerated(String messageKey, String meetingId,
String code, String presId, int numberOfPages, int pagesCompleted,
String presName) {
System.out.println("~~sendSlideGenerated in Red5BBBInGw");
SendSlideGeneratedMessage msg = new SendSlideGeneratedMessage(messageKey, meetingId,
code, presId, numberOfPages, pagesCompleted, presName);
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
@ -443,7 +432,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
public void sendConversionCompleted(String messageKey, String meetingId,
String code, String presId, int numPages, String presName,
String presBaseUrl) {
System.out.println("~~sendConversionCompleted in Red5BBBInGw");
SendConversionCompletedMessage msg = new SendConversionCompletedMessage(messageKey, meetingId,
code, presId, numPages, presName, presBaseUrl);
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
@ -513,7 +501,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void getChatHistory(String meetingID, String requesterID,
String replyTo) {
System.out.println("~~getChatHistory in Red5BBBInGw");
GetChatHistoryRequestMessage msg = new GetChatHistoryRequestMessage(meetingID, requesterID, replyTo);
sender.send(MessagingConstants.TO_CHAT_CHANNEL, msg.toJson());
}
@ -521,7 +508,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void sendPublicMessage(String meetingID, String requesterID,
Map<String, String> message) {
System.out.println("~~sendPublicMessage in Red5BBBInGw");
SendPublicChatMessage msg = new SendPublicChatMessage(meetingID, requesterID, message);
sender.send(MessagingConstants.TO_CHAT_CHANNEL, msg.toJson());
}
@ -529,7 +515,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void sendPrivateMessage(String meetingID, String requesterID,
Map<String, String> message) {
System.out.println("~~sendPrivateMessage in Red5BBBInGw");
SendPrivateChatMessage msg = new SendPrivateChatMessage(meetingID, requesterID, message);
sender.send(MessagingConstants.TO_CHAT_CHANNEL, msg.toJson());
}
@ -537,7 +522,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void sendWhiteboardAnnotation(String meetingID, String requesterID,
Map<String, Object> annotation) {
System.out.println("~~sendWhiteboardAnnotation in Red5BBBInGw");
SendWhiteboardAnnotationRequestMessage msg = new SendWhiteboardAnnotationRequestMessage(meetingID, requesterID, annotation);
sender.send(MessagingConstants.TO_WHITEBOARD_CHANNEL, msg.toJson());
}
@ -545,7 +529,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void requestWhiteboardAnnotationHistory(String meetingID,
String requesterID, String whiteboardId, String replyTo) {
System.out.println("~~requestWhiteboardAnnotationHistory in Red5BBBInGw");
RequestWhiteboardAnnotationHistoryRequestMessage msg = new RequestWhiteboardAnnotationHistoryRequestMessage(meetingID, requesterID, whiteboardId, replyTo);
sender.send(MessagingConstants.TO_WHITEBOARD_CHANNEL, msg.toJson());
@ -554,7 +537,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void clearWhiteboard(String meetingID, String requesterID,
String whiteboardId) {
System.out.println("~~ClearWhiteboardRequestMessage in Red5BBBInGw");
ClearWhiteboardRequestMessage msg = new ClearWhiteboardRequestMessage(meetingID, requesterID, whiteboardId);
sender.send(MessagingConstants.TO_WHITEBOARD_CHANNEL, msg.toJson());
@ -563,7 +545,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void undoWhiteboard(String meetingID, String requesterID,
String whiteboardId) {
System.out.println("~~undoWhiteboard in Red5BBBInGw");
org.bigbluebutton.common.messages.UndoWhiteboardRequest msg = new org.bigbluebutton.common.messages.UndoWhiteboardRequest(meetingID, requesterID, whiteboardId);
sender.send(MessagingConstants.TO_WHITEBOARD_CHANNEL, msg.toJson());
}
@ -571,7 +552,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void enableWhiteboard(String meetingID, String requesterID,
Boolean enable) {
System.out.println("~~enableWhiteboard in Red5BBBInGw");
EnableWhiteboardRequestMessage msg = new EnableWhiteboardRequestMessage(meetingID, requesterID, enable);
sender.send(MessagingConstants.TO_WHITEBOARD_CHANNEL, msg.toJson());
}
@ -579,7 +559,6 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void isWhiteboardEnabled(String meetingID, String requesterID,
String replyTo) {
System.out.println("~~isWhiteboardEnabled in Red5BBBInGw");
IsWhiteboardEnabledRequestMessage msg = new IsWhiteboardEnabledRequestMessage(meetingID, requesterID, replyTo);
sender.send(MessagingConstants.TO_WHITEBOARD_CHANNEL, msg.toJson());

View File

@ -1,66 +0,0 @@
package org.bigbluebutton.core.api;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
public class RedisLpushDispatcher implements IDispatcher {
private static final int NTHREADS = 1;
private static final Executor exec = Executors.newFixedThreadPool(NTHREADS);
private static final String BBBMESSAGES = "bbb:meeting:messages";
private BlockingQueue<String> messages;
private volatile boolean dispatchEvents = false;
private JedisPool redisPool;
public RedisLpushDispatcher() {
messages = new LinkedBlockingQueue<String>();
}
@Override
public void dispatch(String jsonMessage) {
messages.offer(jsonMessage);
}
private void saveMessage(String msg) {
Jedis jedis = redisPool.getResource();
try {
jedis.lpush(BBBMESSAGES, msg);
} finally {
redisPool.returnResource(jedis);
}
}
public void start() {
dispatchEvents = true;
Runnable sender = new Runnable() {
public void run() {
while (dispatchEvents) {
String message;
try {
message = messages.take();
saveMessage(message);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
};
exec.execute(sender);
}
public void stop() {
dispatchEvents = false;
}
public void setRedisPool(JedisPool redisPool) {
this.redisPool = redisPool;
}
}

View File

@ -1,25 +0,0 @@
package org.bigbluebutton.freeswitch.pubsub.redis;
import java.util.Set;
public class MessageDistributor {
private ReceivedMessageHandler handler;
private Set<MessageHandler> listeners;
public void setMessageListeners(Set<MessageHandler> listeners) {
this.listeners = listeners;
}
public void setMessageHandler(ReceivedMessageHandler handler) {
this.handler = handler;
if (handler != null) {
handler.setMessageDistributor(this);
}
}
public void notifyListeners(String pattern, String channel, String message) {
for (MessageHandler listener : listeners) {
listener.handleMessage(pattern, channel, message);
}
}
}

View File

@ -1,23 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.freeswitch.pubsub.redis;
public interface MessageHandler {
void handleMessage(String pattern, String channel, String message);
}

View File

@ -1,92 +0,0 @@
package org.bigbluebutton.freeswitch.pubsub.redis;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPubSub;
public class MessageReceiver {
private static Logger log = Red5LoggerFactory.getLogger(MessageReceiver.class, "bigbluebutton");
private ReceivedMessageHandler handler;
private JedisPool redisPool;
private volatile boolean receiveMessage = false;
private final Executor msgReceiverExec = Executors.newSingleThreadExecutor();
public void stop() {
receiveMessage = false;
}
public void start() {
log.info("Ready to receive messages from Redis pubsub.");
try {
receiveMessage = true;
final Jedis jedis = redisPool.getResource();
Runnable messageReceiver = new Runnable() {
public void run() {
if (receiveMessage) {
jedis.psubscribe(new PubSubListener(),
MessagingConstants.FROM_BBB_APPS_PATTERN);
}
}
};
msgReceiverExec.execute(messageReceiver);
} catch (Exception e) {
log.error("Error subscribing to channels: " + e.getMessage());
}
}
public void setRedisPool(JedisPool redisPool){
this.redisPool = redisPool;
}
public void setMessageHandler(ReceivedMessageHandler handler) {
this.handler = handler;
}
private class PubSubListener extends JedisPubSub {
public PubSubListener() {
super();
}
@Override
public void onMessage(String channel, String message) {
// Not used.
}
@Override
public void onPMessage(String pattern, String channel, String message) {
handler.handleMessage(pattern, channel, message);
}
@Override
public void onPSubscribe(String pattern, int subscribedChannels) {
log.debug("Subscribed to the pattern: " + pattern);
}
@Override
public void onPUnsubscribe(String pattern, int subscribedChannels) {
// Not used.
}
@Override
public void onSubscribe(String channel, int subscribedChannels) {
// Not used.
}
@Override
public void onUnsubscribe(String channel, int subscribedChannels) {
// Not used.
}
}
}

View File

@ -1,74 +0,0 @@
package org.bigbluebutton.freeswitch.pubsub.redis;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
public class MessageSender {
private static Logger log = Red5LoggerFactory.getLogger(MessageSender.class, "bigbluebutton");
private JedisPool redisPool;
private volatile boolean sendMessage = false;
private final Executor msgSenderExec = Executors.newSingleThreadExecutor();
private final Executor runExec = Executors.newSingleThreadExecutor();
private BlockingQueue<MessageToSend> messages = new LinkedBlockingQueue<MessageToSend>();
public void stop() {
sendMessage = false;
}
public void start() {
log.info("Redis message publisher starting!");
try {
sendMessage = true;
Runnable messageSender = new Runnable() {
public void run() {
while (sendMessage) {
try {
MessageToSend msg = messages.take();
publish(msg.getChannel(), msg.getMessage());
} catch (InterruptedException e) {
log.warn("Failed to get message from queue.");
}
}
}
};
msgSenderExec.execute(messageSender);
} catch (Exception e) {
log.error("Error subscribing to channels: " + e.getMessage());
}
}
public void send(String channel, String message) {
MessageToSend msg = new MessageToSend(channel, message);
messages.add(msg);
}
private void publish(final String channel, final String message) {
Runnable task = new Runnable() {
public void run() {
Jedis jedis = redisPool.getResource();
try {
jedis.publish(channel, message);
} catch(Exception e){
log.warn("Cannot publish the message to redis", e);
} finally {
redisPool.returnResource(jedis);
}
}
};
runExec.execute(task);
}
public void setRedisPool(JedisPool redisPool){
this.redisPool = redisPool;
}
}

View File

@ -1,19 +0,0 @@
package org.bigbluebutton.freeswitch.pubsub.redis;
public class MessageToSend {
private final String channel;
private final String message;
public MessageToSend(String channel, String message) {
this.channel = channel;
this.message = message;
}
public String getChannel() {
return channel;
}
public String getMessage() {
return message;
}
}

View File

@ -1,28 +0,0 @@
package org.bigbluebutton.freeswitch.pubsub.redis;
public class ReceivedMessage {
private final String pattern;
private final String channel;
private final String message;
public ReceivedMessage(String pattern, String channel, String message) {
this.pattern = pattern;
this.channel = channel;
this.message = message;
}
public String getPattern() {
return pattern;
}
public String getChannel() {
return channel;
}
public String getMessage() {
return message;
}
}

View File

@ -1,72 +0,0 @@
package org.bigbluebutton.freeswitch.pubsub.redis;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
public class ReceivedMessageHandler {
private static Logger log = Red5LoggerFactory.getLogger(ReceivedMessageHandler.class, "bigbluebutton");
private BlockingQueue<ReceivedMessage> receivedMessages = new LinkedBlockingQueue<ReceivedMessage>();
private volatile boolean processMessage = false;
private final Executor msgProcessorExec = Executors.newSingleThreadExecutor();
private final Executor runExec = Executors.newSingleThreadExecutor();
private MessageDistributor handler;
public void stop() {
processMessage = false;
}
public void start() {
log.info("Ready to handle messages from Redis pubsub!");
try {
processMessage = true;
Runnable messageProcessor = new Runnable() {
public void run() {
while (processMessage) {
try {
ReceivedMessage msg = receivedMessages.take();
processMessage(msg);
} catch (InterruptedException e) {
log.warn("Error while taking received message from queue.");
}
}
}
};
msgProcessorExec.execute(messageProcessor);
} catch (Exception e) {
log.error("Error subscribing to channels: " + e.getMessage());
}
}
private void processMessage(final ReceivedMessage msg) {
Runnable task = new Runnable() {
public void run() {
if (handler != null) {
handler.notifyListeners(msg.getPattern(), msg.getChannel(), msg.getMessage());
} else {
log.info("No listeners interested in messages from Redis!");
}
}
};
runExec.execute(task);
}
public void handleMessage(String pattern, String channel, String message) {
ReceivedMessage rm = new ReceivedMessage(pattern, channel, message);
receivedMessages.add(rm);
}
public void setMessageDistributor(MessageDistributor h) {
this.handler = h;
}
}

View File

@ -1,46 +0,0 @@
package org.bigbluebutton.freeswitch.pubsub.redis;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.bigbluebutton.conference.meeting.messaging.red5.ConnectionInvokerService;
import org.bigbluebutton.red5.client.MeetingClientMessageSender;
import org.bigbluebutton.red5.client.PresentationClientMessageSender;
import org.bigbluebutton.red5.client.UserClientMessageSender;
import org.bigbluebutton.red5.client.ChatClientMessageSender;
import org.bigbluebutton.red5.client.WhiteboardClientMessageSender;
public class RedisPubSubMessageHandler implements MessageHandler {
private ConnectionInvokerService service;
private UserClientMessageSender userMessageSender;
private MeetingClientMessageSender meetingMessageSender;
private ChatClientMessageSender chatMessageSender;
private PresentationClientMessageSender presentationMessageSender;
private WhiteboardClientMessageSender whiteboardMessageSender;
public void setConnectionInvokerService(ConnectionInvokerService s) {
this.service = s;
userMessageSender = new UserClientMessageSender(service);
meetingMessageSender = new MeetingClientMessageSender(service);
chatMessageSender = new ChatClientMessageSender(service);
presentationMessageSender = new PresentationClientMessageSender(service);
whiteboardMessageSender = new WhiteboardClientMessageSender(service);
}
@Override
public void handleMessage(String pattern, String channel, String message) {
if (channel.equalsIgnoreCase(MessagingConstants.FROM_CHAT_CHANNEL)) {
chatMessageSender.handleChatMessage(message);
} else if (channel.equalsIgnoreCase(MessagingConstants.FROM_PRESENTATION_CHANNEL)) {
presentationMessageSender.handlePresentationMessage(message);
} else if (channel.equalsIgnoreCase(MessagingConstants.FROM_MEETING_CHANNEL)) {
meetingMessageSender.handleMeetingMessage(message);
} else if (channel.equalsIgnoreCase(MessagingConstants.FROM_USERS_CHANNEL)) {
userMessageSender.handleUsersMessage(message);
} else if (channel.equalsIgnoreCase(MessagingConstants.FROM_WHITEBOARD_CHANNEL)) {
System.out.println("the message FROM_WHITEBOARD_CHANNEL is:"+message);
whiteboardMessageSender.handleWhiteboardMessage(message);
}
}
}

View File

@ -16,16 +16,15 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference;
package org.bigbluebutton.red5;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import org.bigbluebutton.conference.meeting.messaging.red5.ConnectionInvokerService;
import org.bigbluebutton.conference.service.recorder.RecorderApplication;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import org.bigbluebutton.red5.client.messaging.ConnectionInvokerService;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.adapter.IApplication;
import org.red5.server.adapter.MultiThreadedApplicationAdapter;
@ -40,7 +39,6 @@ import com.google.gson.Gson;
public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
private static Logger log = Red5LoggerFactory.getLogger(BigBlueButtonApplication.class, "bigbluebutton");
private RecorderApplication recorderApplication;
private ConnectionInvokerService connInvokerService;
private IBigBlueButtonInGW red5InGW;
@ -96,7 +94,6 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
@Override
public void roomStop(IScope room) {
recorderApplication.destroyRecordSession(room.getName());
super.roomStop(room);
}
@ -126,11 +123,7 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
lsMap = new HashMap<String, Boolean>();
}
}
if (record == true) {
recorderApplication.createRecordSession(room);
}
String userId = internalUserID;
String sessionId = CONN + userId;
BigBlueButtonSession bbbSession = new BigBlueButtonSession(room, internalUserID, username, role,
@ -253,11 +246,7 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
log.info("User validate token bbb-apps: data={}", logStr);
red5InGW.validateAuthToken(meetingId, userId, token, meetingId + "/" + userId, sessionId);
}
public void setRecorderApplication(RecorderApplication a) {
recorderApplication = a;
}
public void setApplicationListeners(Set<IApplication> listeners) {
Iterator<IApplication> iter = listeners.iterator();
while (iter.hasNext()) {

View File

@ -17,7 +17,7 @@
*
*/
package org.bigbluebutton.conference;
package org.bigbluebutton.red5;
public class BigBlueButtonSession {
private final String username;

View File

@ -17,7 +17,7 @@
*
*/
package org.bigbluebutton.conference;
package org.bigbluebutton.red5;
public class Constants{

View File

@ -6,9 +6,9 @@ import java.util.Map;
import org.bigbluebutton.common.messages.GetChatHistoryReplyMessage;
import org.bigbluebutton.common.messages.SendPrivateChatMessage;
import org.bigbluebutton.common.messages.SendPublicChatMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.BroadcastClientMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.ConnectionInvokerService;
import org.bigbluebutton.conference.service.chat.ChatKeyUtil;
import org.bigbluebutton.red5.client.messaging.BroadcastClientMessage;
import org.bigbluebutton.red5.client.messaging.ConnectionInvokerService;
import org.bigbluebutton.red5.service.ChatKeyUtil;
import com.google.gson.Gson;
import com.google.gson.JsonObject;

View File

@ -12,11 +12,11 @@ import org.bigbluebutton.common.messages.MeetingMutedMessage;
import org.bigbluebutton.common.messages.MeetingStateMessage;
import org.bigbluebutton.common.messages.NewPermissionsSettingMessage;
import org.bigbluebutton.common.messages.UserLockedMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.BroadcastClientMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.ConnectionInvokerService;
import org.bigbluebutton.conference.meeting.messaging.red5.DirectClientMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.DisconnectAllClientsMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.DisconnectClientMessage;
import org.bigbluebutton.red5.client.messaging.BroadcastClientMessage;
import org.bigbluebutton.red5.client.messaging.ConnectionInvokerService;
import org.bigbluebutton.red5.client.messaging.DirectClientMessage;
import org.bigbluebutton.red5.client.messaging.DisconnectAllClientsMessage;
import org.bigbluebutton.red5.client.messaging.DisconnectClientMessage;
import com.google.gson.Gson;
import com.google.gson.JsonObject;

View File

@ -6,9 +6,9 @@ import java.util.Map;
import org.bigbluebutton.common.messages.GetPresentationInfoReplyMessage;
import org.bigbluebutton.common.messages.GoToSlideMessage;
import org.bigbluebutton.common.messages.PresentationRemovedMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.BroadcastClientMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.ConnectionInvokerService;
import org.bigbluebutton.conference.meeting.messaging.red5.DirectClientMessage;
import org.bigbluebutton.red5.client.messaging.BroadcastClientMessage;
import org.bigbluebutton.red5.client.messaging.ConnectionInvokerService;
import org.bigbluebutton.red5.client.messaging.DirectClientMessage;
import com.google.gson.Gson;
import com.google.gson.JsonObject;

View File

@ -25,9 +25,9 @@ import org.bigbluebutton.common.messages.UserVoiceMutedMessage;
import org.bigbluebutton.common.messages.UserVoiceTalkingMessage;
import org.bigbluebutton.common.messages.ValidateAuthTokenReplyMessage;
import org.bigbluebutton.common.messages.ValidateAuthTokenTimeoutMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.BroadcastClientMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.ConnectionInvokerService;
import org.bigbluebutton.conference.meeting.messaging.red5.DirectClientMessage;
import org.bigbluebutton.red5.client.messaging.BroadcastClientMessage;
import org.bigbluebutton.red5.client.messaging.ConnectionInvokerService;
import org.bigbluebutton.red5.client.messaging.DirectClientMessage;
import com.google.gson.Gson;
import com.google.gson.JsonObject;

View File

@ -9,9 +9,9 @@ import org.bigbluebutton.common.messages.GetWhiteboardShapesReplyMessage;
import org.bigbluebutton.common.messages.IsWhiteboardEnabledReplyMessage;
import org.bigbluebutton.common.messages.SendWhiteboardAnnotationReplyMessage;
import org.bigbluebutton.common.messages.UndoWhiteboardReplyMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.BroadcastClientMessage;
import org.bigbluebutton.conference.meeting.messaging.red5.ConnectionInvokerService;
import org.bigbluebutton.conference.meeting.messaging.red5.DirectClientMessage;
import org.bigbluebutton.red5.client.messaging.BroadcastClientMessage;
import org.bigbluebutton.red5.client.messaging.ConnectionInvokerService;
import org.bigbluebutton.red5.client.messaging.DirectClientMessage;
import com.google.gson.Gson;
import com.google.gson.JsonObject;

View File

@ -16,7 +16,7 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.meeting.messaging.red5;
package org.bigbluebutton.red5.client.messaging;
import java.util.Map;

View File

@ -16,7 +16,7 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.meeting.messaging.red5;
package org.bigbluebutton.red5.client.messaging;
public interface ClientMessage {

View File

@ -16,7 +16,7 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.meeting.messaging.red5;
package org.bigbluebutton.red5.client.messaging;
import java.util.Set;
import java.util.ArrayList;

View File

@ -16,7 +16,7 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.meeting.messaging.red5;
package org.bigbluebutton.red5.client.messaging;
import java.util.Map;

View File

@ -1,4 +1,4 @@
package org.bigbluebutton.conference.meeting.messaging.red5;
package org.bigbluebutton.red5.client.messaging;
public class DisconnectAllClientsMessage implements ClientMessage {

View File

@ -1,4 +1,4 @@
package org.bigbluebutton.conference.meeting.messaging.red5;
package org.bigbluebutton.red5.client.messaging;
public class DisconnectClientMessage implements ClientMessage {

View File

@ -16,7 +16,7 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.meeting.messaging.red5;
package org.bigbluebutton.red5.client.messaging;
import java.util.ArrayList;

View File

@ -16,7 +16,7 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.recorder;
package org.bigbluebutton.red5.pubsub.redis;
import org.apache.commons.pool.impl.GenericObjectPool;

View File

@ -1,12 +1,12 @@
package org.bigbluebutton.red5.pubsub.redis;
import org.bigbluebutton.common.messages.MessagingConstants;
import org.bigbluebutton.conference.meeting.messaging.red5.ConnectionInvokerService;
import org.bigbluebutton.red5.client.MeetingClientMessageSender;
import org.bigbluebutton.red5.client.PresentationClientMessageSender;
import org.bigbluebutton.red5.client.UserClientMessageSender;
import org.bigbluebutton.red5.client.ChatClientMessageSender;
import org.bigbluebutton.red5.client.WhiteboardClientMessageSender;
import org.bigbluebutton.red5.client.messaging.ConnectionInvokerService;
public class RedisPubSubMessageHandler implements MessageHandler {

View File

@ -1,4 +1,4 @@
package org.bigbluebutton.conference.service.chat;
package org.bigbluebutton.red5.service;
public class ChatKeyUtil {
public static final String CHAT_TYPE = "chatType";

View File

@ -16,15 +16,15 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.chat;
package org.bigbluebutton.red5.service;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger;
import org.bigbluebutton.conference.BigBlueButtonSession;
import org.bigbluebutton.conference.Constants;
import org.bigbluebutton.core.api.Red5BBBInGw;
import org.bigbluebutton.red5.BigBlueButtonSession;
import org.bigbluebutton.red5.Constants;
import org.red5.logging.Red5LoggerFactory; import org.red5.server.api.Red5;
public class ChatService {

View File

@ -16,13 +16,13 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
* Author: Felipe Cecagno <felipe@mconf.org>
*/
package org.bigbluebutton.conference.service.layout;
package org.bigbluebutton.red5.service;
import java.util.Map;
import org.bigbluebutton.conference.BigBlueButtonSession;
import org.bigbluebutton.conference.Constants;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import org.bigbluebutton.red5.BigBlueButtonSession;
import org.bigbluebutton.red5.Constants;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.api.Red5;
import org.slf4j.Logger;

View File

@ -16,14 +16,14 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.lock;
package org.bigbluebutton.red5.service;
import java.util.ArrayList;
import java.util.Map;
import org.bigbluebutton.conference.BigBlueButtonSession;
import org.bigbluebutton.conference.Constants;
import org.bigbluebutton.core.api.Red5BBBInGw;
import org.bigbluebutton.red5.BigBlueButtonSession;
import org.bigbluebutton.red5.Constants;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.api.Red5;
import org.slf4j.Logger;

View File

@ -17,7 +17,7 @@
*
*/
package org.bigbluebutton.conference.service.participants;
package org.bigbluebutton.red5.service;
import org.slf4j.Logger;
import org.red5.logging.Red5LoggerFactory;
@ -26,9 +26,9 @@ import org.red5.server.api.scope.IScope;
import java.util.Map;
import org.bigbluebutton.conference.BigBlueButtonSession;
import org.bigbluebutton.conference.Constants;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import org.bigbluebutton.red5.BigBlueButtonSession;
import org.bigbluebutton.red5.Constants;
public class ParticipantsService {

View File

@ -16,7 +16,7 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.presentation;
package org.bigbluebutton.red5.service;
import org.slf4j.Logger;
import org.bigbluebutton.core.api.Red5BBBInGw;

View File

@ -16,7 +16,7 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.presentation;
package org.bigbluebutton.red5.service;
import java.util.Map;
@ -24,8 +24,8 @@ import org.slf4j.Logger;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.api.Red5;
import org.red5.server.api.scope.IScope;
import org.bigbluebutton.conference.BigBlueButtonSession;
import org.bigbluebutton.conference.Constants;
import org.bigbluebutton.red5.BigBlueButtonSession;
import org.bigbluebutton.red5.Constants;
public class PresentationService {
private static Logger log = Red5LoggerFactory.getLogger( PresentationService.class, "bigbluebutton" );

View File

@ -1,4 +1,4 @@
package org.bigbluebutton.conference.service.voice;
package org.bigbluebutton.red5.service;
public class VoiceKeyUtil {
public static final String MUTE = "mute";

View File

@ -16,12 +16,12 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.voice;
package org.bigbluebutton.red5.service;
import java.util.Map;
import org.bigbluebutton.conference.BigBlueButtonSession;
import org.bigbluebutton.conference.Constants;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import org.bigbluebutton.red5.BigBlueButtonSession;
import org.bigbluebutton.red5.Constants;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.api.Red5;
import org.slf4j.Logger;

View File

@ -16,7 +16,7 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.whiteboard;
package org.bigbluebutton.red5.service;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.adapter.IApplication;

View File

@ -1,4 +1,4 @@
package org.bigbluebutton.conference.service.whiteboard;
package org.bigbluebutton.red5.service;
public class WhiteboardKeyUtil {

View File

@ -16,12 +16,12 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.conference.service.whiteboard;
package org.bigbluebutton.red5.service;
import java.util.Map;
import org.bigbluebutton.conference.BigBlueButtonSession;
import org.bigbluebutton.conference.Constants;
import org.bigbluebutton.red5.BigBlueButtonSession;
import org.bigbluebutton.red5.Constants;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.api.Red5;
import org.slf4j.Logger;

Some files were not shown because too many files have changed in this diff Show More