lock settings to redis

This commit is contained in:
Anton Georgiev 2015-05-22 16:12:01 -04:00
parent 40a45bb09d
commit a79c5f4122
15 changed files with 545 additions and 211 deletions

View File

@ -0,0 +1,48 @@
package org.bigbluebutton.conference.service.lock;
import org.bigbluebutton.conference.service.messaging.MessagingConstants;
import org.bigbluebutton.conference.service.messaging.GetLockSettings;
import org.bigbluebutton.conference.service.messaging.LockUser;
import org.bigbluebutton.conference.service.messaging.SendLockSettings;
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 (GetLockSettings.GET_LOCK_SETTINGS.equals(messageName)) {
GetLockSettings msg = GetLockSettings.fromJson(message);
bbbGW.getLockSettings(msg.meetingId, msg.userId);
} else if(LockUser.LOCK_USER.equals(messageName)) {
LockUser msg = LockUser.fromJson(message);
bbbGW.lockUser(msg.meetingId, msg.requesterId, msg.lock, msg.internalUserId);
} else if(SendLockSettings.SEND_LOCK_SETTINGS.equals(messageName)) {
SendLockSettings msg = SendLockSettings.fromJson(message);
System.out.println("\n\n(("+message);
bbbGW.sendLockSettings(msg.meetingId, msg.userId, msg.newSettings);
}
}
}
}
}
}

View File

@ -23,15 +23,15 @@ import java.util.Map;
import org.bigbluebutton.conference.BigBlueButtonSession;
import org.bigbluebutton.conference.Constants;
import org.bigbluebutton.core.api.IBigBlueButtonInGW;
import org.bigbluebutton.core.api.Red5BBBInGw;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.api.Red5;
import org.slf4j.Logger;
public class LockService {
private static Logger log = Red5LoggerFactory.getLogger( LockService.class, "bigbluebutton" );
private IBigBlueButtonInGW bbbInGW;
private Red5BBBInGw red5BBBInGW;
/**
* Internal function used to get the session
@ -39,20 +39,21 @@ public class LockService {
private BigBlueButtonSession getBbbSession() {
return (BigBlueButtonSession) Red5.getConnectionLocal().getAttribute(Constants.SESSION);
}
public void setBigBlueButtonInGW(IBigBlueButtonInGW inGW) {
bbbInGW = inGW;
public void setRed5BBBInGW(Red5BBBInGw inGW) {
red5BBBInGW = inGW;
}
/**
* Called from client to get lock settings for this room.
* */
public void getLockSettings(){
String meetingId = getBbbSession().getRoom();
String userId = getMyUserId();
bbbInGW.getLockSettings(meetingId, userId);
red5BBBInGW.getLockSettings(meetingId, userId);
}
/**
* Called from client to get lock settings for this room.
*
@ -64,9 +65,9 @@ public class LockService {
public void setLockSettings(Map<String, Boolean> newSettings){
String meetingId = getBbbSession().getRoom();
String userId = getMyUserId();
bbbInGW.sendLockSettings(meetingId, userId, newSettings);
red5BBBInGW.sendLockSettings(meetingId, userId, newSettings);
}
/**
* This method locks (or unlocks), based on lock parameter
* all users but the users listed in array dontLockTheseUsers
@ -75,7 +76,7 @@ public class LockService {
log.debug("setAllUsersLock ({}, {})", new Object[] { lock, dontLockTheseUsers });
}
/**
* This method locks or unlocks a specific user
* */
@ -87,9 +88,9 @@ public class LockService {
String userId = (String) msg.get("userId");
log.info("setUserLock ({}, {})", new Object[] { lock, userId });
bbbInGW.lockUser(meetingID, requesterID, lock, userId);
red5BBBInGW.lockUser(meetingID, requesterID, lock, userId);
}
public String getMyUserId() {
BigBlueButtonSession bbbSession = (BigBlueButtonSession) Red5.getConnectionLocal().getAttribute(Constants.SESSION);
assert bbbSession != null;

View File

@ -94,4 +94,11 @@ public class Constants {
public static final String CREATE_TIME = "create_time";
public static final String CREATE_DATE = "create_date";
public static final String PRESENTATION_BASE_URL = "presentation_base_url";
public static final String DISABLE_CAMERA = "disable_camera";
public static final String LOCK_ON_JOIN_CONFIGURABLE = "lock_on_join_configurable";
public static final String DISABLE_MICROPHONE = "disable_microphone";
public static final String DISABLE_PRIVATE_CHAT = "disable_private_chat";
public static final String DISABLE_PUBLIC_CHAT = "disable_public_chat";
public static final String LOCK_ON_JOIN = "lock_on_join";
public static final String LOCKED_LAYOUT = "locked_layout";
}

View File

@ -0,0 +1,54 @@
package org.bigbluebutton.conference.service.messaging;
import java.util.HashMap;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
public class GetLockSettings implements IMessage {
public static final String GET_LOCK_SETTINGS = "get_lock_settings";
public static final String VERSION = "0.0.1";
public final String meetingId;
public final String userId;
public GetLockSettings(String meetingId, String userId) {
this.meetingId = meetingId;
this.userId = userId;
}
public String toJson() {
HashMap<String, Object> payload = new HashMap<String, Object>();
payload.put(Constants.MEETING_ID, meetingId);
payload.put(Constants.USER_ID, userId);
System.out.println("GetLockSettings toJson");
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(GET_LOCK_SETTINGS, VERSION, null);
return MessageBuilder.buildJson(header, payload);
}
public static GetLockSettings fromJson(String 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();
if (GET_LOCK_SETTINGS.equals(messageName)) {
if (payload.has(Constants.MEETING_ID)
&& payload.has(Constants.USER_ID)) {
String meetingId = payload.get(Constants.MEETING_ID).getAsString();
String userId = payload.get(Constants.USER_ID).getAsString();
System.out.println("GetLockSettings fromJson");
return new GetLockSettings(meetingId, userId);
}
}
}
}
return null;
}
}

View File

@ -0,0 +1,65 @@
package org.bigbluebutton.conference.service.messaging;
import java.util.HashMap;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
public class LockUser implements IMessage {
public static final String LOCK_USER = "lock_user";
public static final String VERSION = "0.0.1";
public final String meetingId;
public final String requesterId;
public final boolean lock;
public final String internalUserId;
public LockUser(String meetingId, String requesterId, boolean lock, String internalUserId) {
this.meetingId = meetingId;
this.requesterId = requesterId;
this.lock = lock;
this.internalUserId = internalUserId;
}
public String toJson() {
HashMap<String, Object> payload = new HashMap<String, Object>();
payload.put(Constants.MEETING_ID, meetingId);
payload.put(Constants.REQUESTER_ID, requesterId);
payload.put(Constants.LOCK, lock);
payload.put(Constants.INTERNAL_USER_ID, internalUserId);
System.out.println("LockUser toJson");
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(LOCK_USER, VERSION, null);
return MessageBuilder.buildJson(header, payload);
}
public static LockUser fromJson(String 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();
if (LOCK_USER.equals(messageName)) {
if (payload.has(Constants.MEETING_ID)
&& payload.has(Constants.REQUESTER_ID)
&& payload.has(Constants.LOCK)
&& payload.has(Constants.INTERNAL_USER_ID)) {
String meetingId = payload.get(Constants.MEETING_ID).getAsString();
String requesterId = payload.get(Constants.REQUESTER_ID).getAsString();
boolean lock = payload.get(Constants.LOCK).getAsBoolean();
String internalUserId = payload.get(Constants.INTERNAL_USER_ID).getAsString();
System.out.println("LockUser fromJson");
return new LockUser(meetingId, requesterId, lock, internalUserId);
}
}
}
}
return null;
}
}

View File

@ -26,7 +26,7 @@ public class SendCursorUpdate implements IMessage {
payload.put(Constants.Y_PERCENT, yPercent);
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(SEND_CURSOR_UPDATE, VERSION, null);
System.out.println("SendCursorUpdate toJson");
return MessageBuilder.buildJson(header, payload);
}
@ -48,7 +48,6 @@ public class SendCursorUpdate implements IMessage {
double xPercent = payload.get(Constants.X_PERCENT).getAsDouble();
double yPercent = payload.get(Constants.Y_PERCENT).getAsDouble();
System.out.println("SendCursorUpdate fromJson");
return new SendCursorUpdate(meetingId, xPercent, yPercent);
}
}

View File

@ -0,0 +1,120 @@
package org.bigbluebutton.conference.service.messaging;
import java.util.HashMap;
import java.util.Map;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
public class SendLockSettings implements IMessage {
public static final String SEND_LOCK_SETTINGS = "send_lock_settings";
public static final String VERSION = "0.0.1";
public final String meetingId;
public final String userId;
public final Map<String, Boolean> newSettings;
public SendLockSettings(String meetingId, String userId, Map<String, Boolean> newSettings) {
this.meetingId = meetingId;
this.userId = userId;
this.newSettings = newSettings;
}
public String toJson() {
HashMap<String, Object> payload = new HashMap<String, Object>();
Map<String, Boolean> settingsMap = new HashMap<String, Boolean>();
settingsMap.put(Constants.DISABLE_CAMERA, newSettings.get("disableCam"));
settingsMap.put(Constants.DISABLE_MICROPHONE, newSettings.get("disableMic"));
settingsMap.put(Constants.DISABLE_PRIVATE_CHAT, newSettings.get("disablePrivateChat"));
settingsMap.put(Constants.DISABLE_PUBLIC_CHAT, newSettings.get("disablePublicChat"));
settingsMap.put(Constants.LOCKED_LAYOUT, newSettings.get("lockedLayout"));
settingsMap.put(Constants.LOCK_ON_JOIN, newSettings.get("lockOnJoin"));
settingsMap.put(Constants.LOCK_ON_JOIN_CONFIGURABLE, newSettings.get("lockOnJoinConfigurable"));
// System.out.println("\n\n" + newSettings.toString() + "\n\n");
// settingsMap.put(Constants.DISABLE_CAMERA, newSettings.get(Constants.DISABLE_CAMERA));
// settingsMap.put(Constants.DISABLE_MICROPHONE, newSettings.get(Constants.DISABLE_MICROPHONE));
// settingsMap.put(Constants.DISABLE_PRIVATE_CHAT, newSettings.get(Constants.DISABLE_PRIVATE_CHAT));
// settingsMap.put(Constants.DISABLE_PUBLIC_CHAT, newSettings.get(Constants.DISABLE_PUBLIC_CHAT));
// settingsMap.put(Constants.LOCKED_LAYOUT, newSettings.get(Constants.LOCKED_LAYOUT));
// settingsMap.put(Constants.LOCK_ON_JOIN, newSettings.get(Constants.LOCK_ON_JOIN));
// settingsMap.put(Constants.LOCK_ON_JOIN_CONFIGURABLE, newSettings.get(Constants.LOCK_ON_JOIN_CONFIGURABLE));
payload.put(Constants.MEETING_ID, meetingId);
payload.put(Constants.USER_ID, userId);
payload.put(Constants.SETTINGS, settingsMap);
System.out.println("SendLockSettings toJson");
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(SEND_LOCK_SETTINGS, VERSION, null);
return MessageBuilder.buildJson(header, payload);
}
public static SendLockSettings fromJson(String 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();
if (SEND_LOCK_SETTINGS.equals(messageName)) {
if (payload.has(Constants.MEETING_ID)
&& payload.has(Constants.USER_ID)
&& payload.has(Constants.SETTINGS)) {
JsonObject settingsObj = (JsonObject) payload.get(Constants.SETTINGS).getAsJsonObject();
if (settingsObj.has(Constants.DISABLE_CAMERA)
&& settingsObj.has(Constants.DISABLE_CAMERA)
&& settingsObj.has(Constants.DISABLE_MICROPHONE)
&& settingsObj.has(Constants.DISABLE_PRIVATE_CHAT)
&& settingsObj.has(Constants.DISABLE_PUBLIC_CHAT)
&& settingsObj.has(Constants.LOCKED_LAYOUT)
&& settingsObj.has(Constants.LOCK_ON_JOIN)
&& settingsObj.has(Constants.LOCK_ON_JOIN_CONFIGURABLE)) {
Map<String, Boolean> settingsMap = new HashMap<String, Boolean>();
// settingsMap.put(Constants.DISABLE_CAMERA, settingsObj.get(Constants.DISABLE_CAMERA).getAsBoolean());
// settingsMap.put(Constants.DISABLE_MICROPHONE, settingsObj.get(Constants.DISABLE_MICROPHONE).getAsBoolean());
// settingsMap.put(Constants.DISABLE_PRIVATE_CHAT, settingsObj.get(Constants.DISABLE_PRIVATE_CHAT).getAsBoolean());
// settingsMap.put(Constants.DISABLE_PUBLIC_CHAT, settingsObj.get(Constants.DISABLE_PUBLIC_CHAT).getAsBoolean());
// settingsMap.put(Constants.LOCKED_LAYOUT, settingsObj.get(Constants.LOCKED_LAYOUT).getAsBoolean());
// settingsMap.put(Constants.LOCK_ON_JOIN, settingsObj.get(Constants.LOCK_ON_JOIN).getAsBoolean());
// settingsMap.put(Constants.LOCK_ON_JOIN_CONFIGURABLE, settingsObj.get(Constants.LOCK_ON_JOIN_CONFIGURABLE).getAsBoolean());
// settingsMap.put("disableCam", settingsObj.get(Constants.DISABLE_CAMERA).getAsBoolean());
// settingsMap.put("disableMic", settingsObj.get(Constants.DISABLE_MICROPHONE).getAsBoolean());
// settingsMap.put("disablePrivateChat", settingsObj.get(Constants.DISABLE_PRIVATE_CHAT).getAsBoolean());
// settingsMap.put("disablePublicChat", settingsObj.get(Constants.DISABLE_PUBLIC_CHAT).getAsBoolean());
// settingsMap.put("lockedLayout", settingsObj.get(Constants.LOCKED_LAYOUT).getAsBoolean());
// settingsMap.put("lockOnJoin", settingsObj.get(Constants.LOCK_ON_JOIN).getAsBoolean());
// settingsMap.put("lockOnJoinConfigurable", settingsObj.get(Constants.LOCK_ON_JOIN_CONFIGURABLE).getAsBoolean());
System.out.println("AAAAAAAAAAAA:"+settingsObj.toString());
settingsMap.put("disableCam", settingsObj.get(Constants.DISABLE_CAMERA).getAsBoolean());
settingsMap.put("disableMic", settingsObj.get(Constants.DISABLE_MICROPHONE).getAsBoolean());
settingsMap.put("disablePrivateChat", settingsObj.get(Constants.DISABLE_PRIVATE_CHAT).getAsBoolean());
settingsMap.put("disablePublicChat", settingsObj.get(Constants.DISABLE_PUBLIC_CHAT).getAsBoolean());
settingsMap.put("lockedLayout", settingsObj.get(Constants.LOCKED_LAYOUT).getAsBoolean());
settingsMap.put("lockOnJoin", settingsObj.get(Constants.LOCK_ON_JOIN).getAsBoolean());
settingsMap.put("lockOnJoinConfigurable", settingsObj.get(Constants.LOCK_ON_JOIN_CONFIGURABLE).getAsBoolean());
String meetingId = payload.get(Constants.MEETING_ID).getAsString();
String userId = payload.get(Constants.USER_ID).getAsString();
System.out.println("SendLockSettings fromJson");
return new SendLockSettings(meetingId, userId, settingsMap);
}
}
}
}
}
return null;
}
}

View File

@ -36,7 +36,7 @@ public class PresentationApplication {
public void sendConversionUpdate(String messageKey, String meetingId,
String code, String presentationId, String presName) {
System.out.println("-----sendConversionUpdate---");
red5BBBInGW.sendConversionUpdate(messageKey, meetingId, code,
presentationId, presName);
}
@ -44,7 +44,7 @@ public class PresentationApplication {
public void sendPageCountError(String messageKey, String meetingId,
String code, String presentationId, int numberOfPages,
int maxNumberPages, String presName) {
System.out.println("-----sendPageCountError---");
red5BBBInGW.sendPageCountError(messageKey, meetingId, code,
presentationId, numberOfPages, maxNumberPages, presName);
}
@ -52,7 +52,7 @@ public class PresentationApplication {
public void sendSlideGenerated(String messageKey, String meetingId,
String code, String presentationId, int numberOfPages,
int pagesCompleted, String presName) {
System.out.println("-----sendSlideGenerated---");
red5BBBInGW.sendSlideGenerated(messageKey, meetingId, code,
presentationId, numberOfPages, pagesCompleted, presName);
}
@ -60,46 +60,46 @@ public class PresentationApplication {
public void sendConversionCompleted(String messageKey, String meetingId,
String code, String presentation, int numberOfPages,
String presName, String presBaseUrl) {
System.out.println("-----sendConversionCompleted---");
red5BBBInGW.sendConversionCompleted(messageKey, meetingId,
code, presentation, numberOfPages, presName, presBaseUrl);
}
public void removePresentation(String meetingID, String presentationID){
System.out.println("----removePresentation----");
red5BBBInGW.removePresentation(meetingID, presentationID);
}
public void getPresentationInfo(String meetingID, String requesterID) {
// Just hardcode as we don't really need it for flash client. (ralam may 7, 2014)
String replyTo = meetingID + "/" + requesterID;
System.out.println("----getPresentationInfo----");
red5BBBInGW.getPresentationInfo(meetingID, requesterID, replyTo);
}
public void sendCursorUpdate(String meetingID, Double xPercent, Double yPercent) {
System.out.println("----sendCursorUpdate----");
red5BBBInGW.sendCursorUpdate(meetingID, xPercent, yPercent);
}
public void resizeAndMoveSlide(String meetingID, Double xOffset, Double yOffset, Double widthRatio, Double heightRatio) {
System.out.println("-----resizeAndMoveSlide---");
red5BBBInGW.resizeAndMoveSlide(meetingID, xOffset, yOffset, widthRatio, heightRatio);
}
public void gotoSlide(String meetingID, String pageId){
System.out.println("----gotoSlide----");
red5BBBInGW.gotoSlide(meetingID, pageId);
}
public void sharePresentation(String meetingID, String presentationID, Boolean share){
System.out.println("-----sharePresentation---");
red5BBBInGW.sharePresentation(meetingID, presentationID, share);
}
public void getSlideInfo(String meetingID, String requesterID) {
// Just hardcode as we don't really need it for flash client. (ralam may 7, 2014)
System.out.println("----getSlideInfo----");
String replyTo = meetingID + "/" + requesterID;
red5BBBInGW.getSlideInfo(meetingID, requesterID, replyTo);
}

View File

@ -139,7 +139,6 @@ public class PresentationMessageListener implements MessageHandler {
bbbInGW.removePresentation(msg.meetingId, msg.presentationId);
} else if (SendCursorUpdate.SEND_CURSOR_UPDATE.equals(messageName)) {
System.out.println("in messageHandler - sendCursorUpdate");
SendCursorUpdate msg = SendCursorUpdate.fromJson(message);
bbbInGW.sendCursorUpdate(msg.meetingId, msg.xPercent, msg.yPercent);

View File

@ -18,6 +18,9 @@ import org.bigbluebutton.conference.service.messaging.SharePresentation;
import org.bigbluebutton.conference.service.messaging.SendPrivateChatMessage;
import org.bigbluebutton.conference.service.messaging.SendPublicChatMessage;
import org.bigbluebutton.conference.service.messaging.GetChatHistory;
import org.bigbluebutton.conference.service.messaging.GetLockSettings;
import org.bigbluebutton.conference.service.messaging.LockUser;
import org.bigbluebutton.conference.service.messaging.SendLockSettings;
import org.bigbluebutton.conference.service.messaging.redis.MessageSender;
import com.google.gson.Gson;
@ -93,21 +96,27 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void sendLockSettings(String meetingID, String userId,
Map<String, Boolean> settings) {
// TODO Auto-generated method stub
SendLockSettings msg = new SendLockSettings(meetingID, userId, settings);
System.out.println("~~~sendLockSettings in Red5BBBInGw");
sender.send(MessagingConstants.TO_MEETING_CHANNEL, msg.toJson());
}
@Override
public void getLockSettings(String meetingId, String userId) {
// TODO Auto-generated method stub
GetLockSettings msg = new GetLockSettings(meetingId, userId);
System.out.println("~~~GetLockSettings in Red5BBBInGw");
sender.send(MessagingConstants.TO_MEETING_CHANNEL, msg.toJson());
}
@Override
public void lockUser(String meetingId, String requesterID, boolean lock,
String internalUserID) {
// TODO Auto-generated method stub
LockUser msg = new LockUser(meetingId, requesterID, lock, internalUserID);
System.out.println("~~~LockUser in Red5BBBInGw");
sender.send(MessagingConstants.TO_MEETING_CHANNEL, msg.toJson());
}
@Override
@ -335,7 +344,7 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
double yPercent) {
SendCursorUpdate msg = new SendCursorUpdate(meetingID,
xPercent, yPercent);
System.out.println("~~SendCursorUpdate in Red5BBBInGw");
sender.send(MessagingConstants.TO_PRESENTATION_CHANNEL, msg.toJson());
}

View File

@ -85,7 +85,7 @@ object UsersMessageToJsonConverter {
payload.put("disablePubChat", msg.permissions.disablePubChat)
payload.put("lockedLayout", msg.permissions.lockedLayout)
payload.put("lockOnJoin", msg.permissions.lockOnJoin)
payload.put("lockOnJoinConfigurable", msg.permissions.lockOnJoin)
payload.put("lockOnJoinConfigurable", msg.permissions.lockOnJoinConfigurable)
val users = new java.util.ArrayList[java.util.Map[String, Any]]
msg.applyTo.foreach(uvo => {

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
Copyright (c) 2015 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/>.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.0.xsd
">
<bean id="lock.service" class="org.bigbluebutton.conference.service.lock.LockService">
<property name="red5BBBInGW"><ref bean="red5BbbInGW"/></property>
</bean>
<bean id="lockMessageListener" class="org.bigbluebutton.conference.service.lock.LockMessageListener">
<property name="bigBlueButtonInGW"> <ref bean="bbbInGW"/></property>
</bean>
</beans>

View File

@ -30,7 +30,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<bean id="presentationApplication" class="org.bigbluebutton.conference.service.presentation.PresentationApplication">
<property name="red5BBBInGW"><ref bean="red5BbbInGW"/></property>
</bean>
<bean id="presentation.service" class="org.bigbluebutton.conference.service.presentation.PresentationService">
<property name="presentationApplication"> <ref local="presentationApplication"/></property>
</bean>
@ -41,6 +41,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<bean id="presentationMessageListener" class="org.bigbluebutton.conference.service.presentation.PresentationMessageListener">
<property name="conversionUpdatesProcessor" ref="conversionUpdatesProcessor" />
<property name="bigBlueButtonInGW"> <ref bean="bbbInGW"/></property>
</bean>
<property name="bigBlueButtonInGW"> <ref bean="bbbInGW"/></property>
</bean>
</beans>

View File

@ -54,7 +54,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<ref bean="participantsListener" />
<ref bean="voiceMessageListener" />
<ref bean="whiteboardListener" />
<ref bean="redisPubSubMessageHandler" />
<ref bean="lockMessageListener" />
<ref bean="redisPubSubMessageHandler" />
</set>
</property>
</bean>

View File

@ -3,7 +3,7 @@
BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
Copyright (c) 2014 BigBlueButton Inc. and by respective authors (see below).
Copyright (c) 2015 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
@ -19,25 +19,25 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang
http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/lang
http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>/WEB-INF/red5-web.properties</value>
<value>/WEB-INF/bigbluebutton.properties</value>
</list>
</property>
<property name="locations">
<list>
<value>/WEB-INF/red5-web.properties</value>
<value>/WEB-INF/bigbluebutton.properties</value>
</list>
</property>
</bean>
<bean id="web.context" class="org.red5.server.Context" autowire="byType" />
<bean id="web.scope" class="org.red5.server.scope.WebScope"
init-method="register">
<property name="server" ref="red5.server" />
@ -50,183 +50,177 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<bean id="web.handler" class="org.bigbluebutton.conference.BigBlueButtonApplication">
<property name="applicationListeners">
<set>
<set>
<ref bean="participantsHandler" />
<ref bean="whiteboardApplication" />
</set>
</property>
<property name="recorderApplication">
<ref bean="recorderApplication"/>
</property>
<property name="connInvokerService">
<ref bean="connInvokerService"/>
</property>
<property name="bigBlueButtonInGW">
<ref bean="bbbInGW"/>
</property>
<property name="red5InGW">
<ref bean="red5BbbInGW"/>
</property>
</set>
</property>
<property name="recorderApplication">
<ref bean="recorderApplication"/>
</property>
<property name="connInvokerService">
<ref bean="connInvokerService"/>
</property>
<property name="bigBlueButtonInGW">
<ref bean="bbbInGW"/>
</property>
<property name="red5InGW">
<ref bean="red5BbbInGW"/>
</property>
</bean>
<bean id="connInvokerService" class="org.bigbluebutton.conference.meeting.messaging.red5.ConnectionInvokerService"
init-method="start" destroy-method="stop"/>
<bean id="bbbInGW" class="org.bigbluebutton.core.BigBlueButtonInGW">
<constructor-arg index="0" ref="bbbGW"/>
<constructor-arg index="1" ref="preuploadedPresentationsUtil"/>
</bean>
<bean id="red5BbbInGW" class="org.bigbluebutton.core.api.Red5BBBInGw">
<property name="messageSender" ref="redisMessageSender"/>
</bean>
<bean id="preuploadedPresentationsUtil" class="org.bigbluebutton.conference.service.presentation.PreuploadedPresentationsUtil">
<property name="bigBlueButtonDirectory" value="${default.BigBlueButtonDirectory}"/>
</bean>
<bean id="bbbGW" class="org.bigbluebutton.core.BigBlueButtonGateway">
<constructor-arg index="0" ref="outMsgGW"/>
</bean>
<bean id="collectorGW" class="org.bigbluebutton.core.CollectorGateway">
<constructor-arg index="0" ref="collDispatcher"/>
</bean>
<bean id="collDispatcher" class="org.bigbluebutton.core.api.ConsoleDispatcher"/>
<bean id="redisLpushDispatcher" class="org.bigbluebutton.core.api.RedisLpushDispatcher"
init-method="start" destroy-method="stop">
<property name="redisPool"><ref bean="redisPool" /> </property>
</bean>
<bean id="outMsgGW" class="org.bigbluebutton.core.api.MessageOutGateway">
<property name="listeners">
<set>
<ref bean="presentationRed5ClientSender" />
<ref bean="presentationRedisRecorder" />
<ref bean="presentationRedisPublisher" />
<ref bean="usersRed5ClientSender" />
<ref bean="usersRedisRecorder" />
<ref bean="usersRedisPublisher" />
<ref bean="meetingEventRedisPublisher" />
<ref bean="layoutRed5ClientSender" />
<ref bean="pollRed5ClientSender" />
<ref bean="pollRedisRecorder" />
<ref bean="pollRedisPublisher"/>
<ref bean="whiteboardRed5ClientSender"/>
<ref bean="whiteboardRedisRecorder"/>
<ref bean="whiteboardEventRedisPublisher"/>
<ref bean="chatRed5ClientSender"/>
<ref bean="chatRedisRecorder"/>
<ref bean="chatRedisPublisher"/>
<ref bean="fsConfService"/>
<ref bean="whiteboardEventRedisPublisher"/>
</set>
</property>
</bean>
<bean id="presentationRed5ClientSender" class="org.bigbluebutton.core.apps.presentation.red5.PresentationClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="presentationRedisRecorder" class="org.bigbluebutton.core.apps.presentation.redis.PresentationEventRedisRecorder">
<constructor-arg index="0" ref="recorderApplication"/>
</bean>
<bean id="presentationRedisPublisher" class="org.bigbluebutton.core.apps.presentation.redis.PresentationEventRedisPublisher">
<constructor-arg ref="redisMessageSender" />
</bean>
<bean id="usersRedisRecorder" class="org.bigbluebutton.core.apps.users.redis.UsersEventRedisRecorder">
<constructor-arg index="0" ref="recorderApplication"/>
</bean>
<bean id="usersRed5ClientSender" class="org.bigbluebutton.core.apps.users.red5.UsersClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="usersRedisPublisher" class="org.bigbluebutton.core.apps.users.redis.UsersEventRedisPublisher">
<constructor-arg ref="redisMessageSender" />
</bean>
<bean id="pollRed5ClientSender" class="org.bigbluebutton.core.apps.poll.red5.PollClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="layoutRed5ClientSender" class="org.bigbluebutton.core.apps.layout.red5.LayoutClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="whiteboardRed5ClientSender" class="org.bigbluebutton.core.apps.whiteboard.red5.WhiteboardClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="whiteboardRedisRecorder" class="org.bigbluebutton.core.apps.whiteboard.redis.WhiteboardEventRedisRecorder">
<constructor-arg index="0" ref="recorderApplication"/>
</bean>
<bean id="whiteboardEventRedisPublisher" class="org.bigbluebutton.core.apps.whiteboard.redis.WhiteboardEventRedisPublisher">
<constructor-arg ref="redisMessageSender"/>
</bean>
<bean id="connInvokerService" class="org.bigbluebutton.conference.meeting.messaging.red5.ConnectionInvokerService"
init-method="start" destroy-method="stop"/>
<bean id="chatRed5ClientSender" class="org.bigbluebutton.core.apps.chat.red5.ChatClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="chatRedisRecorder" class="org.bigbluebutton.core.apps.chat.redis.ChatEventRedisRecorder">
<constructor-arg index="0" ref="recorderApplication"/>
</bean>
<bean id="lock.service" class="org.bigbluebutton.conference.service.lock.LockService">
<property name="bigBlueButtonInGW"> <ref bean="bbbInGW"/></property>
</bean>
<bean id="bbbInGW" class="org.bigbluebutton.core.BigBlueButtonInGW">
<constructor-arg index="0" ref="bbbGW"/>
<constructor-arg index="1" ref="preuploadedPresentationsUtil"/>
</bean>
<bean id="chatRedisPublisher" class="org.bigbluebutton.core.apps.chat.redis.ChatEventRedisPublisher">
<constructor-arg ref="redisMessageSender"/>
</bean>
<bean id="red5BbbInGW" class="org.bigbluebutton.core.api.Red5BBBInGw">
<property name="messageSender" ref="redisMessageSender"/>
</bean>
<bean id="preuploadedPresentationsUtil" class="org.bigbluebutton.conference.service.presentation.PreuploadedPresentationsUtil">
<property name="bigBlueButtonDirectory" value="${default.BigBlueButtonDirectory}"/>
</bean>
<bean id="bbbGW" class="org.bigbluebutton.core.BigBlueButtonGateway">
<constructor-arg index="0" ref="outMsgGW"/>
</bean>
<bean id="collectorGW" class="org.bigbluebutton.core.CollectorGateway">
<constructor-arg index="0" ref="collDispatcher"/>
</bean>
<bean id="collDispatcher" class="org.bigbluebutton.core.api.ConsoleDispatcher"/>
<bean id="meetingEventRedisPublisher" class="org.bigbluebutton.core.meeting.MeetingEventRedisPublisher">
<constructor-arg ref="redisMessageSender" />
</bean>
<bean id="redisLpushDispatcher" class="org.bigbluebutton.core.api.RedisLpushDispatcher"
init-method="start" destroy-method="stop">
<property name="redisPool"><ref bean="redisPool" /> </property>
</bean>
<bean id="pollRedisPublisher" class="org.bigbluebutton.core.apps.poll.redis.PollEventRedisPublisher">
<constructor-arg index="0" ref="redisMessageSender"/>
</bean>
<bean id="pollRedisRecorder" class="org.bigbluebutton.core.apps.poll.redis.PollEventRedisRecorder">
<constructor-arg index="0" ref="recorderApplication"/>
</bean>
<bean id="outMsgGW" class="org.bigbluebutton.core.api.MessageOutGateway">
<property name="listeners">
<set>
<ref bean="presentationRed5ClientSender" />
<ref bean="presentationRedisRecorder" />
<ref bean="presentationRedisPublisher" />
<ref bean="usersRed5ClientSender" />
<ref bean="usersRedisRecorder" />
<ref bean="usersRedisPublisher" />
<ref bean="meetingEventRedisPublisher" />
<ref bean="layoutRed5ClientSender" />
<ref bean="pollRed5ClientSender" />
<ref bean="pollRedisRecorder" />
<ref bean="pollRedisPublisher"/>
<ref bean="whiteboardRed5ClientSender"/>
<ref bean="whiteboardRedisRecorder"/>
<ref bean="whiteboardEventRedisPublisher"/>
<ref bean="chatRed5ClientSender"/>
<ref bean="chatRedisRecorder"/>
<ref bean="chatRedisPublisher"/>
<ref bean="fsConfService"/>
<ref bean="whiteboardEventRedisPublisher"/>
</set>
</property>
</bean>
<bean id="pollMessageHandler" class="org.bigbluebutton.conference.service.poll.messaging.redis.PollRedisMessageHandler">
<property name="bigBlueButtonInGW"> <ref bean="bbbInGW"/></property>
</bean>
<bean id="presentationRed5ClientSender" class="org.bigbluebutton.core.apps.presentation.red5.PresentationClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="presentationRedisRecorder" class="org.bigbluebutton.core.apps.presentation.redis.PresentationEventRedisRecorder">
<constructor-arg index="0" ref="recorderApplication"/>
</bean>
<bean id="meetingMessageHandler" class="org.bigbluebutton.conference.meeting.messaging.redis.MeetingMessageHandler">
<property name="bigBlueButtonInGW"> <ref bean="bbbInGW"/></property>
</bean>
<bean id="presentationRedisPublisher" class="org.bigbluebutton.core.apps.presentation.redis.PresentationEventRedisPublisher">
<constructor-arg ref="redisMessageSender" />
</bean>
<bean id="usersRedisRecorder" class="org.bigbluebutton.core.apps.users.redis.UsersEventRedisRecorder">
<constructor-arg index="0" ref="recorderApplication"/>
</bean>
<bean id="usersRed5ClientSender" class="org.bigbluebutton.core.apps.users.red5.UsersClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="redisPubSubMessageHandler" class="org.bigbluebutton.conference.service.messaging.redis.RedisPubSubMessageHandler">
<property name="connectionInvokerService"> <ref bean="connInvokerService"/></property>
</bean>
<bean id="usersRedisPublisher" class="org.bigbluebutton.core.apps.users.redis.UsersEventRedisPublisher">
<constructor-arg ref="redisMessageSender" />
</bean>
<bean id="pollRed5ClientSender" class="org.bigbluebutton.core.apps.poll.red5.PollClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="layoutRed5ClientSender" class="org.bigbluebutton.core.apps.layout.red5.LayoutClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="whiteboardRed5ClientSender" class="org.bigbluebutton.core.apps.whiteboard.red5.WhiteboardClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="whiteboardRedisRecorder" class="org.bigbluebutton.core.apps.whiteboard.redis.WhiteboardEventRedisRecorder">
<constructor-arg index="0" ref="recorderApplication"/>
</bean>
<bean id="whiteboardEventRedisPublisher" class="org.bigbluebutton.core.apps.whiteboard.redis.WhiteboardEventRedisPublisher">
<constructor-arg ref="redisMessageSender"/>
</bean>
<bean id="chatRed5ClientSender" class="org.bigbluebutton.core.apps.chat.red5.ChatClientMessageSender">
<constructor-arg index="0" ref="connInvokerService"/>
</bean>
<bean id="chatRedisRecorder" class="org.bigbluebutton.core.apps.chat.redis.ChatEventRedisRecorder">
<constructor-arg index="0" ref="recorderApplication"/>
</bean>
<bean id="chatRedisPublisher" class="org.bigbluebutton.core.apps.chat.redis.ChatEventRedisPublisher">
<constructor-arg ref="redisMessageSender"/>
</bean>
<bean id="meetingEventRedisPublisher" class="org.bigbluebutton.core.meeting.MeetingEventRedisPublisher">
<constructor-arg ref="redisMessageSender" />
</bean>
<bean id="pollRedisPublisher" class="org.bigbluebutton.core.apps.poll.redis.PollEventRedisPublisher">
<constructor-arg index="0" ref="redisMessageSender"/>
</bean>
<bean id="pollRedisRecorder" class="org.bigbluebutton.core.apps.poll.redis.PollEventRedisRecorder">
<constructor-arg index="0" ref="recorderApplication"/>
</bean>
<bean id="pollMessageHandler" class="org.bigbluebutton.conference.service.poll.messaging.redis.PollRedisMessageHandler">
<property name="bigBlueButtonInGW"> <ref bean="bbbInGW"/></property>
</bean>
<bean id="meetingMessageHandler" class="org.bigbluebutton.conference.meeting.messaging.redis.MeetingMessageHandler">
<property name="bigBlueButtonInGW"> <ref bean="bbbInGW"/></property>
</bean>
<bean id="redisPubSubMessageHandler" class="org.bigbluebutton.conference.service.messaging.redis.RedisPubSubMessageHandler">
<property name="connectionInvokerService"> <ref bean="connInvokerService"/></property>
</bean>
<import resource="bbb-redis-pool.xml"/>
<import resource="bbb-redis-recorder.xml"/>
<import resource="bbb-app-lock.xml" />
<import resource="bbb-app-chat.xml" />
<import resource="bbb-app-layout.xml" />
<import resource="bbb-app-poll.xml" />
<import resource="bbb-app-presentation.xml" />
<import resource="bbb-app-whiteboard.xml" />
<import resource="bbb-app-users.xml" />
<import resource="bbb-voice-app.xml" />
<import resource="bbb-voice-freeswitch.xml" />
<import resource="bbb-redis-messaging.xml"/>
<!--
<import resource="spring/applicationContext-redis.xml"/>
-->
<import resource="bbb-voice-freeswitch.xml" />
<import resource="bbb-redis-messaging.xml"/>
<!--
<import resource="spring/applicationContext-redis.xml"/>
-->
</beans>