- wire up new message path
This commit is contained in:
parent
2e0f6d8610
commit
8ca0d6c9fe
@ -9,12 +9,25 @@ import org.bigbluebutton.common2.domain.DefaultProps
|
|||||||
body: CreateMeetingReqMsgBody) extends BbbCoreMsg
|
body: CreateMeetingReqMsgBody) extends BbbCoreMsg
|
||||||
case class CreateMeetingReqMsgBody(props: DefaultProps)
|
case class CreateMeetingReqMsgBody(props: DefaultProps)
|
||||||
|
|
||||||
|
object DestroyMeetingSysCmdMsg { val NAME = "DestroyMeetingSysCmdMsg" }
|
||||||
|
case class DestroyMeetingSysCmdMsg(header: BbbCoreBaseHeader,
|
||||||
|
body: DestroyMeetingSysCmdMsgBody) extends BbbCoreMsg
|
||||||
|
case class DestroyMeetingSysCmdMsgBody(meetingId: String)
|
||||||
|
|
||||||
|
object EndMeetingSysCmdMsg { val NAME = "DestroyMeetingReqMsg" }
|
||||||
|
case class EndMeetingSysCmdMsg(header: BbbCoreBaseHeader,
|
||||||
|
body: EndMeetingSysCmdMsgBody) extends BbbCoreMsg
|
||||||
|
case class EndMeetingSysCmdMsgBody(meetingId: String)
|
||||||
|
|
||||||
object GetAllMeetingsReqMsg { val NAME = "GetAllMeetingsReqMsg" }
|
object GetAllMeetingsReqMsg { val NAME = "GetAllMeetingsReqMsg" }
|
||||||
case class GetAllMeetingsReqMsg(header: BbbCoreBaseHeader,
|
case class GetAllMeetingsReqMsg(header: BbbCoreBaseHeader,
|
||||||
body: GetAllMeetingsReqMsgBody) extends BbbCoreMsg
|
body: GetAllMeetingsReqMsgBody) extends BbbCoreMsg
|
||||||
case class GetAllMeetingsReqMsgBody(requesterId: String)
|
case class GetAllMeetingsReqMsgBody(requesterId: String)
|
||||||
|
|
||||||
|
object PubSubPingSysReqMsg { val NAME = "PubSubPingSysReqMsg" }
|
||||||
|
case class PubSubPingSysReqMsg(header: BbbCoreBaseHeader,
|
||||||
|
body: PubSubPingSysReqMsgBody) extends BbbCoreMsg
|
||||||
|
case class PubSubPingSysReqMsgBody(system: String, timestamp: Long)
|
||||||
|
|
||||||
/** Response Messages **/
|
/** Response Messages **/
|
||||||
object MeetingCreatedEvtMsg { val NAME = "MeetingCreatedEvtMsg"}
|
object MeetingCreatedEvtMsg { val NAME = "MeetingCreatedEvtMsg"}
|
||||||
@ -22,12 +35,27 @@ import org.bigbluebutton.common2.domain.DefaultProps
|
|||||||
body: MeetingCreatedEvtBody) extends BbbCoreMsg
|
body: MeetingCreatedEvtBody) extends BbbCoreMsg
|
||||||
case class MeetingCreatedEvtBody(props: DefaultProps)
|
case class MeetingCreatedEvtBody(props: DefaultProps)
|
||||||
|
|
||||||
|
object MeetingEndedEvtMsg { val NAME = "MeetingEndedEvtMsg"}
|
||||||
|
case class MeetingEndedEvtMsg(header: BbbCoreBaseHeader,
|
||||||
|
body: MeetingEndedEvtMsgBody) extends BbbCoreMsg
|
||||||
|
case class MeetingEndedEvtMsgBody(meetingId: String)
|
||||||
|
|
||||||
object SyncGetMeetingInfoRespMsg { val NAME = "SyncGetMeetingInfoRespMsg"}
|
object MeetingDestroyedEvtMsg { val NAME = "MeetingDestroyedEvtMsg"}
|
||||||
|
case class MeetingDestroyedEvtMsg(header: BbbCoreBaseHeader,
|
||||||
|
body: MeetingDestroyedEvtMsgBody) extends BbbCoreMsg
|
||||||
|
case class MeetingDestroyedEvtMsgBody(meetingId: String)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
object SyncGetMeetingInfoRespMsg { val NAME = "SyncGetMeetingInfoRespMsg"}
|
||||||
case class SyncGetMeetingInfoRespMsg(header: BbbCoreBaseHeader,
|
case class SyncGetMeetingInfoRespMsg(header: BbbCoreBaseHeader,
|
||||||
body: SyncGetMeetingInfoRespMsgBody) extends BbbCoreMsg
|
body: SyncGetMeetingInfoRespMsgBody) extends BbbCoreMsg
|
||||||
case class SyncGetMeetingInfoRespMsgBody(props: DefaultProps)
|
case class SyncGetMeetingInfoRespMsgBody(props: DefaultProps)
|
||||||
|
|
||||||
|
object PubSubPongSysRespMsg { val NAME = "PubSubPongSysRespMsg" }
|
||||||
|
case class PubSubPongSysRespMsg(header: BbbCoreBaseHeader,
|
||||||
|
body: PubSubPongSysRespMsgBody) extends BbbCoreMsg
|
||||||
|
case class PubSubPongSysRespMsgBody(system: String, timestamp: Long)
|
||||||
|
|
||||||
/** System Messages **/
|
/** System Messages **/
|
||||||
case class AkkaAppsCheckAliveReqBody(timestamp: Long)
|
case class AkkaAppsCheckAliveReqBody(timestamp: Long)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package org.bigbluebutton.api;
|
package org.bigbluebutton.api;
|
||||||
|
|
||||||
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
|
|
||||||
public interface IReceivedOldMessageHandler {
|
public interface IReceivedOldMessageHandler {
|
||||||
void handleMessage(String pattern, String channel, String message);
|
void handleMessage(IMessage msg);
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -42,167 +42,80 @@ public class MeetingMessageHandler implements MessageHandler {
|
|||||||
this.listeners = listeners;
|
this.listeners = listeners;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleMessage(String pattern, String channel, String message) {
|
public void handleMessage(IMessage message) {
|
||||||
JsonParser parser = new JsonParser();
|
/*
|
||||||
JsonObject obj = (JsonObject) parser.parse(message);
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new MeetingStarted(meetingId));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new MeetingEnded(meetingId));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new MeetingDestroyed(meetingId));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new CreateBreakoutRoom(
|
||||||
|
msg.payload.breakoutMeetingId,
|
||||||
|
msg.payload.parentMeetingId,
|
||||||
|
msg.payload.name,
|
||||||
|
msg.payload.sequence,
|
||||||
|
msg.payload.voiceConfId,
|
||||||
|
msg.payload.viewerPassword,
|
||||||
|
msg.payload.moderatorPassword,
|
||||||
|
msg.payload.durationInMinutes,
|
||||||
|
msg.payload.sourcePresentationId,
|
||||||
|
msg.payload.sourcePresentationSlide,
|
||||||
|
msg.payload.record
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new EndBreakoutRoom(msg.payload.meetingId));
|
||||||
|
}
|
||||||
|
IMessage rxMsg = null;
|
||||||
|
if (PubSubPongMessage.PUBSUB_PONG.equals(messageName)) {
|
||||||
|
IBigBlueButtonMessage msg = decoder.decodeMessage(message);
|
||||||
|
if (msg != null) {
|
||||||
|
PubSubPongMessage m = (PubSubPongMessage) msg;
|
||||||
|
rxMsg = new KeepAliveReply(m.payload.system, m.payload.timestamp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rxMsg != null) {
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(rxMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserJoined(meetingId, userid, externuserid, username, role, avatarURL, guest, waitingForAcceptance));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserStatusChanged(meetingId, userid, status, value));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserLeft(meetingId, userid));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserJoinedVoice(meetingId, userid));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserLeftVoice(meetingId, userid));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserListeningOnly(meetingId, userid, listenOnly));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserSharedWebcam(meetingId, userid, stream));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserUnsharedWebcam(meetingId, userid, stream));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserRoleChanged(meetingId, userid, role));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new StunTurnInfoRequested(meetingId, requesterId));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (channel.equalsIgnoreCase(MessagingConstants.FROM_MEETING_CHANNEL)) {
|
|
||||||
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(MessagingConstants.MEETING_STARTED_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new MeetingStarted(meetingId));
|
|
||||||
}
|
|
||||||
} else if(MessagingConstants.MEETING_ENDED_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new MeetingEnded(meetingId));
|
|
||||||
}
|
|
||||||
} else if (MessagingConstants.MEETING_DESTROYED_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
log.info("Received a meeting destroyed message for meeting id=[{}]", meetingId);
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new MeetingDestroyed(meetingId));
|
|
||||||
}
|
|
||||||
} else if (CreateBreakoutRoomRequest.NAME.equals(messageName)) {
|
|
||||||
CreateBreakoutRoomRequest msg = new Gson().fromJson(message, CreateBreakoutRoomRequest.class);
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new CreateBreakoutRoom(
|
|
||||||
msg.payload.breakoutMeetingId,
|
|
||||||
msg.payload.parentMeetingId,
|
|
||||||
msg.payload.name,
|
|
||||||
msg.payload.sequence,
|
|
||||||
msg.payload.voiceConfId,
|
|
||||||
msg.payload.viewerPassword,
|
|
||||||
msg.payload.moderatorPassword,
|
|
||||||
msg.payload.durationInMinutes,
|
|
||||||
msg.payload.sourcePresentationId,
|
|
||||||
msg.payload.sourcePresentationSlide,
|
|
||||||
msg.payload.record
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (EndBreakoutRoomRequest.NAME.equals(messageName)) {
|
|
||||||
EndBreakoutRoomRequest msg = new Gson().fromJson(message, EndBreakoutRoomRequest.class);
|
|
||||||
log.info("Received end breakout room request message for breakout meeting id=[{}]", msg.payload.meetingId);
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new EndBreakoutRoom(msg.payload.meetingId));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (channel.equalsIgnoreCase(MessagingConstants.FROM_SYSTEM_CHANNEL)) {
|
|
||||||
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();
|
|
||||||
IMessage rxMsg = null;
|
|
||||||
if (PubSubPongMessage.PUBSUB_PONG.equals(messageName)) {
|
|
||||||
IBigBlueButtonMessage msg = decoder.decodeMessage(message);
|
|
||||||
if (msg != null) {
|
|
||||||
PubSubPongMessage m = (PubSubPongMessage) msg;
|
|
||||||
rxMsg = new KeepAliveReply(m.payload.system, m.payload.timestamp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (rxMsg != null) {
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(rxMsg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (channel.equalsIgnoreCase(MessagingConstants.FROM_USERS_CHANNEL)) {
|
|
||||||
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 (MessagingConstants.USER_JOINED_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
JsonObject user = (JsonObject) payload.get("user");
|
|
||||||
String userid = user.get("userid").getAsString();
|
|
||||||
String externuserid = user.get("extern_userid").getAsString();
|
|
||||||
String username = user.get("name").getAsString();
|
|
||||||
String role = user.get("role").getAsString();
|
|
||||||
String avatarURL = user.get("avatarURL").getAsString();
|
|
||||||
Boolean guest = user.get("guest").getAsBoolean();
|
|
||||||
Boolean waitingForAcceptance = user.get("waiting_for_acceptance").getAsBoolean();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new UserJoined(meetingId, userid, externuserid, username, role, avatarURL, guest, waitingForAcceptance));
|
|
||||||
}
|
|
||||||
} else if(MessagingConstants.USER_STATUS_CHANGE_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
String userid = payload.get("userid").getAsString();
|
|
||||||
String status = payload.get("status").getAsString();
|
|
||||||
String value = payload.get("value").getAsString();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new UserStatusChanged(meetingId, userid, status, value));
|
|
||||||
}
|
|
||||||
} else if (MessagingConstants.USER_LEFT_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
JsonObject user = (JsonObject) payload.get("user");
|
|
||||||
String userid = user.get("userid").getAsString();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new UserLeft(meetingId, userid));
|
|
||||||
}
|
|
||||||
} else if (MessagingConstants.USER_JOINED_VOICE_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
JsonObject user = (JsonObject) payload.get("user");
|
|
||||||
String userid = user.get("userid").getAsString();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new UserJoinedVoice(meetingId, userid));
|
|
||||||
}
|
|
||||||
} else if (MessagingConstants.USER_LEFT_VOICE_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
JsonObject user = (JsonObject) payload.get("user");
|
|
||||||
String userid = user.get("userid").getAsString();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new UserLeftVoice(meetingId, userid));
|
|
||||||
}
|
|
||||||
} else if (MessagingConstants.USER_LISTEN_ONLY_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
String userid = payload.get("userid").getAsString();
|
|
||||||
Boolean listenOnly = payload.get("listen_only").getAsBoolean();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new UserListeningOnly(meetingId, userid, listenOnly));
|
|
||||||
}
|
|
||||||
} else if (MessagingConstants.USER_SHARE_WEBCAM_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
String userid = payload.get("userid").getAsString();
|
|
||||||
String stream = payload.get("stream").getAsString();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new UserSharedWebcam(meetingId, userid, stream));
|
|
||||||
}
|
|
||||||
} else if (MessagingConstants.USER_UNSHARE_WEBCAM_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
String userid = payload.get("userid").getAsString();
|
|
||||||
String stream = payload.get("stream").getAsString();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new UserUnsharedWebcam(meetingId, userid, stream));
|
|
||||||
}
|
|
||||||
} else if (MessagingConstants.USER_ROLE_CHANGE_EVENT.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get("meeting_id").getAsString();
|
|
||||||
String userid = payload.get("userid").getAsString();
|
|
||||||
String role = payload.get("role").getAsString();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new UserRoleChanged(meetingId, userid, role));
|
|
||||||
}
|
|
||||||
} else if (SendStunTurnInfoRequestMessage.SEND_STUN_TURN_INFO_REQUEST_MESSAGE.equalsIgnoreCase(messageName)) {
|
|
||||||
String meetingId = payload.get(Constants.MEETING_ID).getAsString();
|
|
||||||
String requesterId = payload.get(Constants.REQUESTER_ID).getAsString();
|
|
||||||
for (MessageListener listener : listeners) {
|
|
||||||
listener.handle(new StunTurnInfoRequested(meetingId, requesterId));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,27 @@
|
|||||||
package org.bigbluebutton.api.messaging;
|
package org.bigbluebutton.api.messaging;
|
||||||
|
|
||||||
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class MessageDistributor {
|
public class MessageDistributor {
|
||||||
private ReceivedMessageHandler handler;
|
private ReceivedMessageHandler handler;
|
||||||
private Set<MessageHandler> listeners;
|
private Set<MessageListener> listeners;
|
||||||
|
|
||||||
public void setMessageListeners(Set<MessageHandler> listeners) {
|
public void setMessageListeners(Set<MessageListener> listeners) {
|
||||||
this.listeners = listeners;
|
this.listeners = listeners;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMessageHandler(ReceivedMessageHandler handler) {
|
public void setMessageHandler(ReceivedMessageHandler handler) {
|
||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
if (handler != null) {
|
if (handler != null) {
|
||||||
handler.setMessageDistributor(this);
|
handler.setMessageDistributor(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void notifyListeners(String pattern, String channel, String message) {
|
public void notifyListeners(IMessage message) {
|
||||||
for (MessageHandler listener : listeners) {
|
for (MessageListener listener : listeners) {
|
||||||
listener.handleMessage(pattern, channel, message);
|
listener.handle(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,24 @@
|
|||||||
/**
|
/**
|
||||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||||
*
|
* <p>
|
||||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||||
*
|
* <p>
|
||||||
* This program is free software; you can redistribute it and/or modify it under the
|
* 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
|
* 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
|
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||||
* version.
|
* version.
|
||||||
*
|
* <p>
|
||||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
* 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
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
*
|
* <p>
|
||||||
* You should have received a copy of the GNU Lesser General Public License along
|
* You should have received a copy of the GNU Lesser General Public License along
|
||||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*/
|
||||||
*/
|
|
||||||
package org.bigbluebutton.api.messaging;
|
package org.bigbluebutton.api.messaging;
|
||||||
|
|
||||||
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
|
|
||||||
public interface MessageHandler {
|
public interface MessageHandler {
|
||||||
void handleMessage(String pattern, String channel, String message);
|
void handleMessage(IMessage message);
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,25 @@
|
|||||||
/**
|
/**
|
||||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||||
*
|
* <p>
|
||||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||||
*
|
* <p>
|
||||||
* This program is free software; you can redistribute it and/or modify it under the
|
* 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
|
* 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
|
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||||
* version.
|
* version.
|
||||||
*
|
* <p>
|
||||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
* 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
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
*
|
* <p>
|
||||||
* You should have received a copy of the GNU Lesser General Public License along
|
* You should have received a copy of the GNU Lesser General Public License along
|
||||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
package org.bigbluebutton.api.messaging;
|
package org.bigbluebutton.api.messaging;
|
||||||
|
|
||||||
import org.bigbluebutton.api.messaging.messages.IMessage;
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
|
|
||||||
public interface MessageListener {
|
public interface MessageListener {
|
||||||
void handle(IMessage message);
|
void handle(IMessage message);
|
||||||
}
|
}
|
||||||
|
@ -1,115 +0,0 @@
|
|||||||
package org.bigbluebutton.api.messaging;
|
|
||||||
|
|
||||||
import java.util.concurrent.Executor;
|
|
||||||
import java.util.concurrent.Executors;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import redis.clients.jedis.Jedis;
|
|
||||||
import redis.clients.jedis.JedisPubSub;
|
|
||||||
import redis.clients.jedis.exceptions.JedisConnectionException;
|
|
||||||
|
|
||||||
public class MessageReceiver {
|
|
||||||
private static Logger log = LoggerFactory.getLogger(MessageReceiver.class);
|
|
||||||
|
|
||||||
private ReceivedMessageHandler handler;
|
|
||||||
|
|
||||||
private Jedis jedis;
|
|
||||||
private volatile boolean receiveMessage = false;
|
|
||||||
|
|
||||||
private final Executor msgReceiverExec = Executors.newSingleThreadExecutor();
|
|
||||||
private final Executor runExec = Executors.newSingleThreadExecutor();
|
|
||||||
|
|
||||||
private String host;
|
|
||||||
private int port;
|
|
||||||
|
|
||||||
public void stop() {
|
|
||||||
receiveMessage = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void start() {
|
|
||||||
log.info("Ready to receive messages from Redis pubsub.");
|
|
||||||
try {
|
|
||||||
receiveMessage = true;
|
|
||||||
jedis = new Jedis(host, port);
|
|
||||||
// Set the name of this client to be able to distinguish when doing
|
|
||||||
// CLIENT LIST on redis-cli
|
|
||||||
jedis.clientSetname("BbbWebSub");
|
|
||||||
|
|
||||||
Runnable messageReceiver = new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
if (receiveMessage) {
|
|
||||||
try {
|
|
||||||
jedis.psubscribe(new PubSubListener(), MessagingConstants.FROM_BBB_APPS_PATTERN);
|
|
||||||
} catch(JedisConnectionException ex) {
|
|
||||||
log.warn("Exception on Jedis connection. Resubscribing to pubsub.");
|
|
||||||
start();
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("Error resubscribing to channels: " + e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
msgReceiverExec.execute(messageReceiver);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("Error subscribing to channels: " + e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHost(String host){
|
|
||||||
this.host = host;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPort(int port) {
|
|
||||||
this.port = port;
|
|
||||||
}
|
|
||||||
|
|
||||||
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(final String pattern, final String channel, final String message) {
|
|
||||||
Runnable task = new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
handler.handleMessage(pattern, channel, message);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
runExec.execute(task);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +1,63 @@
|
|||||||
/**
|
/**
|
||||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||||
*
|
* <p>
|
||||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||||
*
|
* <p>
|
||||||
* This program is free software; you can redistribute it and/or modify it under the
|
* 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
|
* 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
|
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||||
* version.
|
* version.
|
||||||
*
|
* <p>
|
||||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
* 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
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
*
|
* <p>
|
||||||
* You should have received a copy of the GNU Lesser General Public License along
|
* You should have received a copy of the GNU Lesser General Public License along
|
||||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
package org.bigbluebutton.api.messaging;
|
package org.bigbluebutton.api.messaging;
|
||||||
|
|
||||||
|
|
||||||
|
import org.bigbluebutton.presentation.messages.IDocConversionMsg;
|
||||||
import org.bigbluebutton.web.services.turn.StunServer;
|
import org.bigbluebutton.web.services.turn.StunServer;
|
||||||
import org.bigbluebutton.web.services.turn.TurnEntry;
|
import org.bigbluebutton.web.services.turn.TurnEntry;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public interface MessagingService {
|
public interface MessagingService {
|
||||||
void recordMeetingInfo(String meetingId, Map<String, String> info);
|
void recordMeetingInfo(String meetingId, Map<String, String> info);
|
||||||
void recordBreakoutInfo(String meetingId, Map<String, String> breakoutInfo);
|
|
||||||
void addBreakoutRoom(String parentId, String breakoutId);
|
void recordBreakoutInfo(String meetingId, Map<String, String> breakoutInfo);
|
||||||
void send(String channel, String message);
|
|
||||||
void publishRecording(String recordId, String meetingId, String externalMeetingId, String format, boolean publish);
|
void addBreakoutRoom(String parentId, String breakoutId);
|
||||||
void deleteRecording(String recordId, String meetingId, String externalMeetingId, String format);
|
/*
|
||||||
void createMeeting(String meetingID, String externalMeetingID,
|
void send(String channel, String message);
|
||||||
String parentMeetingID, String meetingName, Boolean recorded,
|
|
||||||
String voiceBridge, Integer duration, Boolean autoStartRecording,
|
void publishRecording(String recordId, String meetingId, String externalMeetingId, String format, boolean publish);
|
||||||
Boolean allowStartStopRecording, Boolean webcamsOnlyForModerator,
|
|
||||||
String moderatorPass, String viewerPass, Long createTime,
|
void deleteRecording(String recordId, String meetingId, String externalMeetingId, String format);
|
||||||
String createDate, Boolean isBreakout, Integer sequence,
|
|
||||||
Map<String, String> metadata, String guestPolicy);
|
void createMeeting(String meetingID, String externalMeetingID,
|
||||||
void registerUser(String meetingID, String internalUserId, String fullname, String role,
|
String parentMeetingID, String meetingName, Boolean recorded,
|
||||||
String externUserID, String authToken, String avatarURL, Boolean guest, Boolean authed);
|
String voiceBridge, Integer duration, Boolean autoStartRecording,
|
||||||
void destroyMeeting(String meetingID);
|
Boolean allowStartStopRecording, Boolean webcamsOnlyForModerator,
|
||||||
void endMeeting(String meetingId);
|
String moderatorPass, String viewerPass, Long createTime,
|
||||||
void sendKeepAlive(String system, Long timestamp);
|
String createDate, Boolean isBreakout, Integer sequence,
|
||||||
void sendStunTurnInfo(String meetingId, String internalUserId, Set<StunServer> stuns, Set<TurnEntry> turns);
|
Map<String, String> metadata, String guestPolicy);
|
||||||
|
|
||||||
|
void registerUser(String meetingID, String internalUserId, String fullname, String role,
|
||||||
|
String externUserID, String authToken, String avatarURL, Boolean guest, Boolean authed);
|
||||||
|
|
||||||
|
void destroyMeeting(String meetingID);
|
||||||
|
|
||||||
|
void endMeeting(String meetingId);
|
||||||
|
|
||||||
|
void sendKeepAlive(String system, Long timestamp);
|
||||||
|
|
||||||
|
void sendStunTurnInfo(String meetingId, String internalUserId, Set<StunServer> stuns, Set<TurnEntry> turns);
|
||||||
|
|
||||||
|
void sendDocConversionMsg(IDocConversionMsg msg);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,16 @@
|
|||||||
package org.bigbluebutton.api.messaging;
|
package org.bigbluebutton.api.messaging;
|
||||||
|
|
||||||
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
|
|
||||||
public class ReceivedMessage {
|
public class ReceivedMessage {
|
||||||
private final String pattern;
|
private final IMessage message;
|
||||||
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() {
|
public ReceivedMessage(IMessage message) {
|
||||||
return pattern;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getChannel() {
|
this.message = message;
|
||||||
return channel;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public String getMessage() {
|
public IMessage getMessage() {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,76 +1,76 @@
|
|||||||
package org.bigbluebutton.api.messaging;
|
package org.bigbluebutton.api.messaging;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
import java.util.concurrent.BlockingQueue;
|
import java.util.concurrent.BlockingQueue;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
|
|
||||||
import org.bigbluebutton.api.IReceivedOldMessageHandler;
|
import org.bigbluebutton.api.IReceivedOldMessageHandler;
|
||||||
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
|
import org.bigbluebutton.api2.bus.OldMessageReceivedGW;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class ReceivedMessageHandler implements IReceivedOldMessageHandler {
|
public class ReceivedMessageHandler implements IReceivedOldMessageHandler {
|
||||||
private static Logger log = LoggerFactory.getLogger(ReceivedMessageHandler.class);
|
private static Logger log = LoggerFactory.getLogger(ReceivedMessageHandler.class);
|
||||||
|
|
||||||
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 {
|
private BlockingQueue<ReceivedMessage> receivedMessages = new LinkedBlockingQueue<ReceivedMessage>();
|
||||||
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) {
|
|
||||||
// log.debug("Let's process this message: " + msg.getMessage());
|
|
||||||
|
|
||||||
handler.notifyListeners(msg.getPattern(), msg.getChannel(), msg.getMessage());
|
private volatile boolean processMessage = false;
|
||||||
} else {
|
|
||||||
log.warn("No listeners interested in messages from Redis!");
|
private final Executor msgProcessorExec = Executors.newSingleThreadExecutor();
|
||||||
}
|
private final Executor runExec = Executors.newSingleThreadExecutor();
|
||||||
}
|
|
||||||
};
|
private MessageDistributor outGW;
|
||||||
|
|
||||||
runExec.execute(task);
|
public void stop() {
|
||||||
}
|
processMessage = false;
|
||||||
|
}
|
||||||
public void handleMessage(String pattern, String channel, String message) {
|
|
||||||
ReceivedMessage rm = new ReceivedMessage(pattern, channel, message);
|
public void start() {
|
||||||
receivedMessages.add(rm);
|
log.info("Ready to handle messages from Redis pubsub!");
|
||||||
}
|
|
||||||
|
try {
|
||||||
public void setMessageDistributor(MessageDistributor h) {
|
processMessage = true;
|
||||||
this.handler = h;
|
|
||||||
}
|
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 notifyListeners(IMessage message) {
|
||||||
|
outGW.notifyListeners(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void processMessage(final ReceivedMessage msg) {
|
||||||
|
Runnable task = new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
notifyListeners(msg.getMessage());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
runExec.execute(task);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void handleMessage(IMessage message) {
|
||||||
|
ReceivedMessage rm = new ReceivedMessage(message);
|
||||||
|
receivedMessages.add(rm);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessageDistributor(MessageDistributor outGW) {
|
||||||
|
this.outGW = outGW;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
/**
|
/**
|
||||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||||
*
|
* <p>
|
||||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||||
*
|
* <p>
|
||||||
* This program is free software; you can redistribute it and/or modify it under the
|
* 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
|
* 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
|
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||||
* version.
|
* version.
|
||||||
*
|
* <p>
|
||||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
* 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
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
*
|
* <p>
|
||||||
* You should have received a copy of the GNU Lesser General Public License along
|
* You should have received a copy of the GNU Lesser General Public License along
|
||||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
package org.bigbluebutton.api.messaging;
|
package org.bigbluebutton.api.messaging;
|
||||||
|
|
||||||
@ -31,6 +30,7 @@ import org.bigbluebutton.api.messaging.converters.messages.DestroyMeetingMessage
|
|||||||
import org.bigbluebutton.api.messaging.converters.messages.EndMeetingMessage;
|
import org.bigbluebutton.api.messaging.converters.messages.EndMeetingMessage;
|
||||||
import org.bigbluebutton.api.messaging.converters.messages.PublishRecordingMessage;
|
import org.bigbluebutton.api.messaging.converters.messages.PublishRecordingMessage;
|
||||||
import org.bigbluebutton.api.messaging.converters.messages.UnpublishRecordingMessage;
|
import org.bigbluebutton.api.messaging.converters.messages.UnpublishRecordingMessage;
|
||||||
|
import org.bigbluebutton.api2.IBbbWebApiGWApp;
|
||||||
import org.bigbluebutton.common.converters.ToJsonEncoder;
|
import org.bigbluebutton.common.converters.ToJsonEncoder;
|
||||||
import org.bigbluebutton.common.messages.Constants;
|
import org.bigbluebutton.common.messages.Constants;
|
||||||
import org.bigbluebutton.common.messages.MessagingConstants;
|
import org.bigbluebutton.common.messages.MessagingConstants;
|
||||||
@ -39,6 +39,7 @@ import org.bigbluebutton.messages.CreateMeetingRequest;
|
|||||||
import org.bigbluebutton.messages.CreateMeetingRequestPayload;
|
import org.bigbluebutton.messages.CreateMeetingRequestPayload;
|
||||||
import org.bigbluebutton.messages.RegisterUserMessage;
|
import org.bigbluebutton.messages.RegisterUserMessage;
|
||||||
import org.bigbluebutton.messages.RegisterUserMessagePayload;
|
import org.bigbluebutton.messages.RegisterUserMessagePayload;
|
||||||
|
import org.bigbluebutton.presentation.messages.IDocConversionMsg;
|
||||||
import org.bigbluebutton.web.services.turn.StunServer;
|
import org.bigbluebutton.web.services.turn.StunServer;
|
||||||
import org.bigbluebutton.web.services.turn.TurnEntry;
|
import org.bigbluebutton.web.services.turn.TurnEntry;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -46,162 +47,113 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
public class RedisMessagingService implements MessagingService {
|
public class RedisMessagingService {
|
||||||
private static Logger log = LoggerFactory.getLogger(RedisMessagingService.class);
|
private static Logger log = LoggerFactory.getLogger(RedisMessagingService.class);
|
||||||
|
|
||||||
private RedisStorageService storeService;
|
|
||||||
private MessageSender sender;
|
|
||||||
private ToJsonEncoder encoder = new ToJsonEncoder();
|
|
||||||
|
|
||||||
public void recordMeetingInfo(String meetingId, Map<String, String> info) {
|
|
||||||
storeService.recordMeetingInfo(meetingId, info);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void recordBreakoutInfo(String meetingId, Map<String, String> breakoutInfo) {
|
|
||||||
storeService.recordBreakoutInfo(meetingId, breakoutInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addBreakoutRoom(String parentId, String breakoutId) {
|
public void destroyMeeting(String meetingID) {
|
||||||
storeService.addBreakoutRoom(parentId, breakoutId);
|
DestroyMeetingMessage msg = new DestroyMeetingMessage(meetingID);
|
||||||
}
|
|
||||||
|
|
||||||
public void destroyMeeting(String meetingID) {
|
}
|
||||||
DestroyMeetingMessage msg = new DestroyMeetingMessage(meetingID);
|
|
||||||
String json = MessageToJson.destroyMeetingMessageToJson(msg);
|
|
||||||
log.info("Sending destroy meeting message to bbb-apps:[{}]", json);
|
|
||||||
sender.send(MessagingConstants.TO_MEETING_CHANNEL, json);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void registerUser(String meetingID, String internalUserId, String fullname, String role,
|
|
||||||
String externUserID, String authToken, String avatarURL, Boolean guest, Boolean authed) {
|
|
||||||
RegisterUserMessagePayload payload = new RegisterUserMessagePayload(meetingID, internalUserId, fullname, role, externUserID,
|
|
||||||
authToken, avatarURL, guest, authed);
|
|
||||||
RegisterUserMessage msg = new RegisterUserMessage(payload);
|
|
||||||
|
|
||||||
Gson gson = new Gson();
|
public void registerUser(String meetingID, String internalUserId, String fullname, String role,
|
||||||
String json = gson.toJson(msg);
|
String externUserID, String authToken, String avatarURL, Boolean guest, Boolean authed) {
|
||||||
log.info("*****Sending register user message to bbb-apps:[{}]", json);
|
RegisterUserMessagePayload payload = new RegisterUserMessagePayload(meetingID, internalUserId, fullname, role, externUserID,
|
||||||
sender.send(MessagingConstants.TO_MEETING_CHANNEL, json);
|
authToken, avatarURL, guest, authed);
|
||||||
}
|
RegisterUserMessage msg = new RegisterUserMessage(payload);
|
||||||
|
|
||||||
public void createMeeting(String meetingID, String externalMeetingID,
|
|
||||||
String parentMeetingID, String meetingName, Boolean recorded,
|
|
||||||
String voiceBridge, Integer duration, Boolean autoStartRecording,
|
|
||||||
Boolean allowStartStopRecording, Boolean webcamsOnlyForModerator,
|
|
||||||
String moderatorPass, String viewerPass, Long createTime,
|
|
||||||
String createDate, Boolean isBreakout, Integer sequence, Map<String, String> metadata,
|
|
||||||
String guestPolicy) {
|
|
||||||
CreateMeetingRequestPayload payload = new CreateMeetingRequestPayload(
|
|
||||||
meetingID, externalMeetingID, parentMeetingID, meetingName,
|
|
||||||
recorded, voiceBridge, duration, autoStartRecording,
|
|
||||||
allowStartStopRecording, webcamsOnlyForModerator,
|
|
||||||
moderatorPass, viewerPass, createTime, createDate, isBreakout,
|
|
||||||
sequence, metadata, guestPolicy);
|
|
||||||
CreateMeetingRequest msg = new CreateMeetingRequest(payload);
|
|
||||||
|
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
String json = gson.toJson(msg);
|
String json = gson.toJson(msg);
|
||||||
log.info("Sending create meeting message to bbb-apps:[{}]", json);
|
log.info("*****Sending register user message to bbb-apps:[{}]", json);
|
||||||
sender.send(MessagingConstants.TO_MEETING_CHANNEL, json);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void endMeeting(String meetingId) {
|
public void createMeeting(String meetingID, String externalMeetingID,
|
||||||
EndMeetingMessage msg = new EndMeetingMessage(meetingId);
|
String parentMeetingID, String meetingName, Boolean recorded,
|
||||||
String json = MessageToJson.endMeetingMessageToJson(msg);
|
String voiceBridge, Integer duration, Boolean autoStartRecording,
|
||||||
log.info("Sending end meeting message to bbb-apps:[{}]", json);
|
Boolean allowStartStopRecording, Boolean webcamsOnlyForModerator,
|
||||||
sender.send(MessagingConstants.TO_MEETING_CHANNEL, json);
|
String moderatorPass, String viewerPass, Long createTime,
|
||||||
}
|
String createDate, Boolean isBreakout, Integer sequence, Map<String, String> metadata,
|
||||||
|
String guestPolicy) {
|
||||||
|
CreateMeetingRequestPayload payload = new CreateMeetingRequestPayload(
|
||||||
|
meetingID, externalMeetingID, parentMeetingID, meetingName,
|
||||||
|
recorded, voiceBridge, duration, autoStartRecording,
|
||||||
|
allowStartStopRecording, webcamsOnlyForModerator,
|
||||||
|
moderatorPass, viewerPass, createTime, createDate, isBreakout,
|
||||||
|
sequence, metadata, guestPolicy);
|
||||||
|
CreateMeetingRequest msg = new CreateMeetingRequest(payload);
|
||||||
|
|
||||||
|
Gson gson = new Gson();
|
||||||
|
String json = gson.toJson(msg);
|
||||||
|
log.info("Sending create meeting message to bbb-apps:[{}]", json);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void endMeeting(String meetingId) {
|
||||||
|
EndMeetingMessage msg = new EndMeetingMessage(meetingId);
|
||||||
|
String json = MessageToJson.endMeetingMessageToJson(msg);
|
||||||
|
log.info("Sending end meeting message to bbb-apps:[{}]", json);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void sendKeepAlive(String system, Long timestamp) {
|
public void sendKeepAlive(String system, Long timestamp) {
|
||||||
String json = encoder.encodePubSubPingMessage("BbbWeb", System.currentTimeMillis());
|
|
||||||
sender.send(MessagingConstants.TO_SYSTEM_CHANNEL, json);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void send(String channel, String message) {
|
public void send(String channel, String message) {
|
||||||
sender.send(channel, message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendPolls(String meetingId, String title, String question, String questionType, List<String> answers){
|
|
||||||
Gson gson = new Gson();
|
|
||||||
|
|
||||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
public void sendPolls(String meetingId, String title, String question, String questionType, List<String> answers) {
|
||||||
map.put("messageId", MessagingConstants.SEND_POLLS_EVENT);
|
Gson gson = new Gson();
|
||||||
map.put("meetingId", meetingId);
|
|
||||||
map.put("title", title);
|
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||||
map.put("question", question);
|
map.put("messageId", MessagingConstants.SEND_POLLS_EVENT);
|
||||||
map.put("questionType", questionType);
|
map.put("meetingId", meetingId);
|
||||||
map.put("answers", answers);
|
map.put("title", title);
|
||||||
|
map.put("question", question);
|
||||||
sender.send(MessagingConstants.TO_POLLING_CHANNEL, gson.toJson(map));
|
map.put("questionType", questionType);
|
||||||
}
|
map.put("answers", answers);
|
||||||
|
|
||||||
public void setMessageSender(MessageSender sender) {
|
|
||||||
this.sender = sender;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRedisStorageService(RedisStorageService storeService) {
|
|
||||||
this.storeService = storeService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeMeeting(String meetingId){
|
|
||||||
storeService.removeMeeting(meetingId);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void publishRecording(String recordId, String meetingId, String externalMeetingId, String format) {
|
|
||||||
PublishRecordingMessage msg = new PublishRecordingMessage(recordId, meetingId, externalMeetingId, format);
|
|
||||||
String json = MessageToJson.publishRecordingMessageToJson(msg);
|
|
||||||
sender.send(MessagingConstants.FROM_BBB_RECORDING_CHANNEL, json);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void unpublishRecording(String recordId, String meetingId, String externalMeetingId, String format) {
|
public void publishRecording(PublishRecordingMessage msg) {
|
||||||
UnpublishRecordingMessage msg = new UnpublishRecordingMessage(recordId, meetingId, externalMeetingId, format);
|
|
||||||
String json = MessageToJson.unpublishRecordingMessageToJson(msg);
|
|
||||||
sender.send(MessagingConstants.FROM_BBB_RECORDING_CHANNEL, json);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void publishRecording(String recordId, String meetingId, String externalMeetingId, String format, boolean publish) {
|
String json = MessageToJson.publishRecordingMessageToJson(msg);
|
||||||
if (publish) {
|
|
||||||
publishRecording(recordId, meetingId, externalMeetingId, format);
|
|
||||||
} else {
|
|
||||||
unpublishRecording(recordId, meetingId, externalMeetingId, format);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void deleteRecording(String recordId, String meetingId, String externalMeetingId, String format) {
|
}
|
||||||
DeleteRecordingMessage msg = new DeleteRecordingMessage(recordId, meetingId, externalMeetingId, format);
|
|
||||||
String json = MessageToJson.deleteRecordingMessageToJson(msg);
|
|
||||||
sender.send(MessagingConstants.FROM_BBB_RECORDING_CHANNEL, json);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendStunTurnInfo(String meetingId, String internalUserId, Set<StunServer> stuns, Set<TurnEntry> turns) {
|
public void unpublishRecording(UnpublishRecordingMessage msg) {
|
||||||
ArrayList<String> stunsArrayList = new ArrayList<String>();
|
|
||||||
Iterator<StunServer> stunsIter = stuns.iterator();
|
|
||||||
|
|
||||||
while (stunsIter.hasNext()) {
|
String json = MessageToJson.unpublishRecordingMessageToJson(msg);
|
||||||
StunServer aStun = (StunServer) stunsIter.next();
|
|
||||||
if (aStun != null) {
|
|
||||||
stunsArrayList.add(aStun.url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<Map<String, Object>> turnsArrayList = new ArrayList<Map<String, Object>>();
|
}
|
||||||
Iterator<TurnEntry> turnsIter = turns.iterator();
|
|
||||||
while (turnsIter.hasNext()) {
|
|
||||||
TurnEntry te = (TurnEntry) turnsIter.next();
|
|
||||||
if (null != te) {
|
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
|
||||||
map.put(Constants.USERNAME, te.username);
|
|
||||||
map.put(Constants.URL, te.url);
|
|
||||||
map.put(Constants.TTL, te.ttl);
|
|
||||||
map.put(Constants.PASSWORD, te.password);
|
|
||||||
|
|
||||||
turnsArrayList.add(map);
|
public void publishRecording(String recordId, String meetingId, String externalMeetingId, String format, boolean publish) {
|
||||||
}
|
if (publish) {
|
||||||
}
|
PublishRecordingMessage msg = new PublishRecordingMessage(recordId, meetingId, externalMeetingId, format);
|
||||||
|
publishRecording(msg);
|
||||||
|
} else {
|
||||||
|
UnpublishRecordingMessage msg = new UnpublishRecordingMessage(recordId, meetingId, externalMeetingId, format);
|
||||||
|
unpublishRecording(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SendStunTurnInfoReplyMessage msg = new SendStunTurnInfoReplyMessage(meetingId, internalUserId,
|
public void deleteRecording(String recordId, String meetingId, String externalMeetingId, String format) {
|
||||||
stunsArrayList, turnsArrayList);
|
DeleteRecordingMessage msg = new DeleteRecordingMessage(recordId, meetingId, externalMeetingId, format);
|
||||||
|
String json = MessageToJson.deleteRecordingMessageToJson(msg);
|
||||||
|
|
||||||
sender.send(MessagingConstants.TO_BBB_HTML5_CHANNEL, msg.toJson());
|
}
|
||||||
}
|
|
||||||
|
public void sendStunTurnInfo(String meetingId, String internalUserId, Set<StunServer> stuns, Set<TurnEntry> turns) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendDocConversionMsg(IDocConversionMsg msg) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,79 +11,79 @@ import redis.clients.jedis.JedisPool;
|
|||||||
import redis.clients.jedis.Protocol;
|
import redis.clients.jedis.Protocol;
|
||||||
|
|
||||||
public class RedisStorageService {
|
public class RedisStorageService {
|
||||||
private static Logger log = LoggerFactory.getLogger(RedisStorageService.class);
|
private static Logger log = LoggerFactory.getLogger(RedisStorageService.class);
|
||||||
|
|
||||||
private JedisPool redisPool;
|
|
||||||
private String host;
|
|
||||||
private int port;
|
|
||||||
|
|
||||||
public void stop() {
|
|
||||||
|
|
||||||
}
|
private JedisPool redisPool;
|
||||||
|
private String host;
|
||||||
public void start() {
|
private int port;
|
||||||
// Set the name of this client to be able to distinguish when doing
|
|
||||||
// CLIENT LIST on redis-cli
|
|
||||||
redisPool = new JedisPool(new GenericObjectPoolConfig(), host, port, Protocol.DEFAULT_TIMEOUT, null,
|
|
||||||
Protocol.DEFAULT_DATABASE, "BbbRed5AppsPub");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void recordMeetingInfo(String meetingId, Map<String, String> info) {
|
|
||||||
Jedis jedis = redisPool.getResource();
|
|
||||||
try {
|
|
||||||
for (String key : info.keySet()) {
|
|
||||||
log.debug("Storing metadata {} = {}", key, info.get(key));
|
|
||||||
}
|
|
||||||
|
|
||||||
log.debug("Saving metadata in {}", meetingId);
|
public void stop() {
|
||||||
jedis.hmset("meeting:info:" + meetingId, info);
|
|
||||||
} catch (Exception e) {
|
}
|
||||||
log.warn("Cannot record the info meeting:" + meetingId, e);
|
|
||||||
} finally {
|
public void start() {
|
||||||
jedis.close();
|
// Set the name of this client to be able to distinguish when doing
|
||||||
}
|
// CLIENT LIST on redis-cli
|
||||||
|
redisPool = new JedisPool(new GenericObjectPoolConfig(), host, port, Protocol.DEFAULT_TIMEOUT, null,
|
||||||
|
Protocol.DEFAULT_DATABASE, "BbbRed5AppsPub");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void recordMeetingInfo(String meetingId, Map<String, String> info) {
|
||||||
|
Jedis jedis = redisPool.getResource();
|
||||||
|
try {
|
||||||
|
for (String key : info.keySet()) {
|
||||||
|
log.debug("Storing metadata {} = {}", key, info.get(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
log.debug("Saving metadata in {}", meetingId);
|
||||||
|
jedis.hmset("meeting:info:" + meetingId, info);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("Cannot record the info meeting:" + meetingId, e);
|
||||||
|
} finally {
|
||||||
|
jedis.close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void recordBreakoutInfo(String meetingId, Map<String, String> breakoutInfo) {
|
public void recordBreakoutInfo(String meetingId, Map<String, String> breakoutInfo) {
|
||||||
Jedis jedis = redisPool.getResource();
|
Jedis jedis = redisPool.getResource();
|
||||||
try {
|
try {
|
||||||
log.debug("Saving breakout metadata in {}", meetingId);
|
log.debug("Saving breakout metadata in {}", meetingId);
|
||||||
jedis.hmset("meeting:breakout:" + meetingId, breakoutInfo);
|
jedis.hmset("meeting:breakout:" + meetingId, breakoutInfo);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn("Cannot record the info meeting:" + meetingId, e);
|
log.warn("Cannot record the info meeting:" + meetingId, e);
|
||||||
} finally {
|
} finally {
|
||||||
jedis.close();
|
jedis.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addBreakoutRoom(String parentId, String breakoutId) {
|
public void addBreakoutRoom(String parentId, String breakoutId) {
|
||||||
Jedis jedis = redisPool.getResource();
|
Jedis jedis = redisPool.getResource();
|
||||||
try {
|
try {
|
||||||
|
|
||||||
log.debug("Saving breakout room for meeting {}", parentId);
|
log.debug("Saving breakout room for meeting {}", parentId);
|
||||||
jedis.sadd("meeting:breakout:rooms:" + parentId, breakoutId);
|
jedis.sadd("meeting:breakout:rooms:" + parentId, breakoutId);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn("Cannot record the info meeting:" + parentId, e);
|
log.warn("Cannot record the info meeting:" + parentId, e);
|
||||||
} finally {
|
} finally {
|
||||||
jedis.close();
|
jedis.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeMeeting(String meetingId){
|
public void removeMeeting(String meetingId) {
|
||||||
Jedis jedis = redisPool.getResource();
|
Jedis jedis = redisPool.getResource();
|
||||||
try {
|
try {
|
||||||
jedis.del("meeting-" + meetingId);
|
jedis.del("meeting-" + meetingId);
|
||||||
jedis.srem("meetings", meetingId);
|
jedis.srem("meetings", meetingId);
|
||||||
} finally {
|
} finally {
|
||||||
jedis.close();
|
jedis.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHost(String host){
|
public void setHost(String host) {
|
||||||
this.host = host;
|
this.host = host;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPort(int port) {
|
public void setPort(int port) {
|
||||||
this.port = port;
|
this.port = port;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package org.bigbluebutton.api.messaging.converters.messages;
|
package org.bigbluebutton.api.messaging.converters.messages;
|
||||||
|
|
||||||
public class DestroyMeetingMessage {
|
public class DestroyMeetingMessage {
|
||||||
public static final String DESTROY_MEETING_REQUEST_EVENT = "destroy_meeting_request_event";
|
public static final String DESTROY_MEETING_REQUEST_EVENT = "destroy_meeting_request_event";
|
||||||
public static final String VERSION = "0.0.1";
|
public static final String VERSION = "0.0.1";
|
||||||
|
|
||||||
public final String meetingId;
|
public final String meetingId;
|
||||||
|
|
||||||
public DestroyMeetingMessage(String meetingId) {
|
public DestroyMeetingMessage(String meetingId) {
|
||||||
this.meetingId = meetingId;
|
this.meetingId = meetingId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package org.bigbluebutton.api.messaging.converters.messages;
|
package org.bigbluebutton.api.messaging.converters.messages;
|
||||||
|
|
||||||
public class EndMeetingMessage {
|
public class EndMeetingMessage {
|
||||||
public static final String END_MEETING_REQUEST_EVENT = "end_meeting_request_event";
|
public static final String END_MEETING_REQUEST_EVENT = "end_meeting_request_event";
|
||||||
public static final String VERSION = "0.0.1";
|
public static final String VERSION = "0.0.1";
|
||||||
|
|
||||||
public final String meetingId;
|
public final String meetingId;
|
||||||
|
|
||||||
public EndMeetingMessage(String meetingId) {
|
public EndMeetingMessage(String meetingId) {
|
||||||
this.meetingId = meetingId;
|
this.meetingId = meetingId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package org.bigbluebutton.api2;
|
package org.bigbluebutton.api2;
|
||||||
|
|
||||||
|
|
||||||
|
import org.bigbluebutton.api.messaging.converters.messages.*;
|
||||||
|
import org.bigbluebutton.common.messages.SendStunTurnInfoReplyMessage;
|
||||||
|
import org.bigbluebutton.presentation.messages.IDocConversionMsg;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public interface IBbbWebApiGWApp {
|
public interface IBbbWebApiGWApp {
|
||||||
@ -15,4 +19,13 @@ public interface IBbbWebApiGWApp {
|
|||||||
String dialNumber, Integer maxUsers);
|
String dialNumber, Integer maxUsers);
|
||||||
void registerUser(String meetingID, String internalUserId, String fullname, String role,
|
void registerUser(String meetingID, String internalUserId, String fullname, String role,
|
||||||
String externUserID, String authToken, String avatarURL, Boolean guest, Boolean authed);
|
String externUserID, String authToken, String avatarURL, Boolean guest, Boolean authed);
|
||||||
|
|
||||||
|
void destroyMeeting(DestroyMeetingMessage msg);
|
||||||
|
void endMeeting(EndMeetingMessage msg);
|
||||||
|
void sendKeepAlive(String system, Long timestamp);
|
||||||
|
void publishRecording(PublishRecordingMessage msg);
|
||||||
|
void unpublishRecording(UnpublishRecordingMessage msg);
|
||||||
|
void deleteRecording(DeleteRecordingMessage msg);
|
||||||
|
void sendStunTurnInfoReply(SendStunTurnInfoReplyMessage msg);
|
||||||
|
void sendDocConversionMsg(IDocConversionMsg msg);
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package org.bigbluebutton.presentation;
|
package org.bigbluebutton.presentation;
|
||||||
|
|
||||||
import org.bigbluebutton.api.messaging.MessagingService;
|
import org.bigbluebutton.api.messaging.MessagingService;
|
||||||
|
import org.bigbluebutton.api2.IBbbWebApiGWApp;
|
||||||
import org.bigbluebutton.presentation.imp.ImageToSwfSlidesGenerationService;
|
import org.bigbluebutton.presentation.imp.ImageToSwfSlidesGenerationService;
|
||||||
import org.bigbluebutton.presentation.imp.OfficeToPdfConversionService;
|
import org.bigbluebutton.presentation.imp.OfficeToPdfConversionService;
|
||||||
import org.bigbluebutton.presentation.imp.PdfToSwfSlidesGenerationService;
|
import org.bigbluebutton.presentation.imp.PdfToSwfSlidesGenerationService;
|
||||||
@ -30,13 +31,13 @@ public class DocumentConversionServiceImp implements DocumentConversionService {
|
|||||||
private static Logger log = LoggerFactory
|
private static Logger log = LoggerFactory
|
||||||
.getLogger(DocumentConversionServiceImp.class);
|
.getLogger(DocumentConversionServiceImp.class);
|
||||||
|
|
||||||
private MessagingService messagingService;
|
private IBbbWebApiGWApp gw;
|
||||||
private OfficeToPdfConversionService officeToPdfConversionService;
|
private OfficeToPdfConversionService officeToPdfConversionService;
|
||||||
private PdfToSwfSlidesGenerationService pdfToSwfSlidesGenerationService;
|
private PdfToSwfSlidesGenerationService pdfToSwfSlidesGenerationService;
|
||||||
private ImageToSwfSlidesGenerationService imageToSwfSlidesGenerationService;
|
private ImageToSwfSlidesGenerationService imageToSwfSlidesGenerationService;
|
||||||
|
|
||||||
public void processDocument(UploadedPresentation pres) {
|
public void processDocument(UploadedPresentation pres) {
|
||||||
SupportedDocumentFilter sdf = new SupportedDocumentFilter(messagingService);
|
SupportedDocumentFilter sdf = new SupportedDocumentFilter(gw);
|
||||||
log.info("Start presentation conversion. meetingId=" + pres.getMeetingId()
|
log.info("Start presentation conversion. meetingId=" + pres.getMeetingId()
|
||||||
+ " presId=" + pres.getId() + " name=" + pres.getName());
|
+ " presId=" + pres.getId() + " name=" + pres.getName());
|
||||||
|
|
||||||
@ -45,8 +46,7 @@ public class DocumentConversionServiceImp implements DocumentConversionService {
|
|||||||
|
|
||||||
if (SupportedFileTypes.isOfficeFile(fileType)) {
|
if (SupportedFileTypes.isOfficeFile(fileType)) {
|
||||||
pres = officeToPdfConversionService.convertOfficeToPdf(pres);
|
pres = officeToPdfConversionService.convertOfficeToPdf(pres);
|
||||||
OfficeToPdfConversionSuccessFilter ocsf = new OfficeToPdfConversionSuccessFilter(
|
OfficeToPdfConversionSuccessFilter ocsf = new OfficeToPdfConversionSuccessFilter(gw);
|
||||||
messagingService);
|
|
||||||
if (ocsf.didConversionSucceed(pres)) {
|
if (ocsf.didConversionSucceed(pres)) {
|
||||||
// Successfully converted to pdf. Call the process again, this time it
|
// Successfully converted to pdf. Call the process again, this time it
|
||||||
// should be handled by
|
// should be handled by
|
||||||
@ -70,8 +70,8 @@ public class DocumentConversionServiceImp implements DocumentConversionService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMessagingService(MessagingService m) {
|
public void setBbbWebApiGWApp(IBbbWebApiGWApp m) {
|
||||||
messagingService = m;
|
gw = m;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOfficeToPdfConversionService(OfficeToPdfConversionService s) {
|
public void setOfficeToPdfConversionService(OfficeToPdfConversionService s) {
|
||||||
|
@ -24,21 +24,22 @@ import java.util.Map;
|
|||||||
|
|
||||||
import org.bigbluebutton.api.messaging.MessagingConstants;
|
import org.bigbluebutton.api.messaging.MessagingConstants;
|
||||||
import org.bigbluebutton.api.messaging.MessagingService;
|
import org.bigbluebutton.api.messaging.MessagingService;
|
||||||
|
import org.bigbluebutton.api2.IBbbWebApiGWApp;
|
||||||
|
import org.bigbluebutton.presentation.messages.OfficeDocConversionProgress;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
public class OfficeToPdfConversionSuccessFilter {
|
public class OfficeToPdfConversionSuccessFilter {
|
||||||
private static Logger log = LoggerFactory
|
private static Logger log = LoggerFactory.getLogger(OfficeToPdfConversionSuccessFilter.class);
|
||||||
.getLogger(OfficeToPdfConversionSuccessFilter.class);
|
|
||||||
|
|
||||||
private final MessagingService messagingService;
|
private final IBbbWebApiGWApp gw;
|
||||||
|
|
||||||
private static Map<String, String> conversionMessagesMap;
|
private static Map<String, String> conversionMessagesMap;
|
||||||
|
|
||||||
public OfficeToPdfConversionSuccessFilter(MessagingService m) {
|
public OfficeToPdfConversionSuccessFilter(IBbbWebApiGWApp m) {
|
||||||
messagingService = m;
|
gw = m;
|
||||||
conversionMessagesMap = new HashMap<String, String>();
|
conversionMessagesMap = new HashMap<String, String>();
|
||||||
conversionMessagesMap.put(
|
conversionMessagesMap.put(
|
||||||
ConversionMessageConstants.OFFICE_DOC_CONVERSION_SUCCESS_KEY,
|
ConversionMessageConstants.OFFICE_DOC_CONVERSION_SUCCESS_KEY,
|
||||||
@ -70,18 +71,16 @@ public class OfficeToPdfConversionSuccessFilter {
|
|||||||
|
|
||||||
log.info("Notifying of " + pres.getConversionStatus() + " for "
|
log.info("Notifying of " + pres.getConversionStatus() + " for "
|
||||||
+ pres.getUploadedFile().getAbsolutePath());
|
+ pres.getUploadedFile().getAbsolutePath());
|
||||||
sendNotification(msg);
|
sendProgress(pres);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendNotification(Map<String, Object> msg) {
|
|
||||||
if (messagingService != null) {
|
public void sendProgress(UploadedPresentation pres) {
|
||||||
Gson gson = new Gson();
|
OfficeDocConversionProgress progress = new OfficeDocConversionProgress(pres.getMeetingId(),
|
||||||
String updateMsg = gson.toJson(msg);
|
pres.getId(), pres.getId(),
|
||||||
log.debug("sending: " + updateMsg);
|
pres.getName(), "notUsedYet", "notUsedYet",
|
||||||
messagingService.send(MessagingConstants.TO_PRESENTATION_CHANNEL,
|
pres.isDownloadable(), pres.getConversionStatus());
|
||||||
updateMsg);
|
gw.sendDocConversionMsg(progress);
|
||||||
} else {
|
|
||||||
log.warn("MessagingService has not been set!.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
/**
|
/**
|
||||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||||
*
|
* <p>
|
||||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||||
*
|
* <p>
|
||||||
* This program is free software; you can redistribute it and/or modify it under the
|
* 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
|
* 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
|
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||||
* version.
|
* version.
|
||||||
*
|
* <p>
|
||||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
* 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
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
*
|
* <p>
|
||||||
* You should have received a copy of the GNU Lesser General Public License along
|
* You should have received a copy of the GNU Lesser General Public License along
|
||||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
package org.bigbluebutton.presentation;
|
package org.bigbluebutton.presentation;
|
||||||
|
|
||||||
@ -24,54 +23,60 @@ import java.io.File;
|
|||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
import org.bigbluebutton.api.messaging.MessagingConstants;
|
import org.bigbluebutton.api.messaging.MessagingConstants;
|
||||||
import org.bigbluebutton.api.messaging.MessagingService;
|
import org.bigbluebutton.api.messaging.MessagingService;
|
||||||
|
import org.bigbluebutton.api2.IBbbWebApiGWApp;
|
||||||
import org.bigbluebutton.presentation.ConversionUpdateMessage.MessageBuilder;
|
import org.bigbluebutton.presentation.ConversionUpdateMessage.MessageBuilder;
|
||||||
|
import org.bigbluebutton.presentation.messages.OfficeDocConversionProgress;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
public class SupportedDocumentFilter {
|
public class SupportedDocumentFilter {
|
||||||
private static Logger log = LoggerFactory.getLogger(SupportedDocumentFilter.class);
|
private static Logger log = LoggerFactory.getLogger(SupportedDocumentFilter.class);
|
||||||
|
|
||||||
private final MessagingService messagingService;
|
private final IBbbWebApiGWApp gw;
|
||||||
|
|
||||||
public SupportedDocumentFilter(MessagingService m) {
|
public SupportedDocumentFilter(IBbbWebApiGWApp m) {
|
||||||
messagingService = m;
|
gw = m;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSupported(UploadedPresentation pres) {
|
public boolean isSupported(UploadedPresentation pres) {
|
||||||
File presentationFile = pres.getUploadedFile();
|
File presentationFile = pres.getUploadedFile();
|
||||||
|
|
||||||
/* Get file extension - Perhaps try to rely on a more accurate method than an extension type ? */
|
/* Get file extension - Perhaps try to rely on a more accurate method than an extension type ? */
|
||||||
String extension = FilenameUtils.getExtension(presentationFile.getName());
|
String extension = FilenameUtils.getExtension(presentationFile.getName());
|
||||||
boolean supported = SupportedFileTypes.isFileSupported(extension);
|
boolean supported = SupportedFileTypes.isFileSupported(extension);
|
||||||
notifyProgressListener(supported, pres);
|
notifyProgressListener(supported, pres);
|
||||||
if (supported) {
|
if (supported) {
|
||||||
log.info("Received supported file {}", pres.getUploadedFile().getAbsolutePath());
|
log.info("Received supported file {}", pres.getUploadedFile().getAbsolutePath());
|
||||||
pres.setFileType(extension);
|
pres.setFileType(extension);
|
||||||
}
|
} else {
|
||||||
else {
|
log.warn("Received not supported file {}", pres.getUploadedFile().getAbsolutePath());
|
||||||
log.warn("Received not supported file {}", pres.getUploadedFile().getAbsolutePath());
|
}
|
||||||
}
|
return supported;
|
||||||
return supported;
|
}
|
||||||
}
|
|
||||||
|
private void notifyProgressListener(boolean supported, UploadedPresentation pres) {
|
||||||
private void notifyProgressListener(boolean supported, UploadedPresentation pres) {
|
MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
|
||||||
MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
|
|
||||||
|
String msgKey = ConversionMessageConstants.SUPPORTED_DOCUMENT_KEY;
|
||||||
if (supported) {
|
|
||||||
builder.messageKey(ConversionMessageConstants.SUPPORTED_DOCUMENT_KEY);
|
if (supported) {
|
||||||
} else {
|
msgKey = ConversionMessageConstants.SUPPORTED_DOCUMENT_KEY;
|
||||||
builder.messageKey(ConversionMessageConstants.UNSUPPORTED_DOCUMENT_KEY);
|
} else {
|
||||||
}
|
msgKey = ConversionMessageConstants.UNSUPPORTED_DOCUMENT_KEY;
|
||||||
|
}
|
||||||
if(messagingService !=null){
|
|
||||||
Gson gson= new Gson();
|
if (gw != null) {
|
||||||
String updateMsg=gson.toJson(builder.build().getMessage());
|
OfficeDocConversionProgress progress = new OfficeDocConversionProgress(pres.getMeetingId(),
|
||||||
log.debug("sending: "+updateMsg);
|
pres.getId(), pres.getId(),
|
||||||
messagingService.send(MessagingConstants.TO_PRESENTATION_CHANNEL, updateMsg);
|
pres.getName(), "notUsedYet", "notUsedYet",
|
||||||
} else {
|
pres.isDownloadable(), msgKey);
|
||||||
log.warn("MessagingService has not been set!");
|
|
||||||
}
|
gw.sendDocConversionMsg(progress);
|
||||||
}
|
|
||||||
|
} else {
|
||||||
|
log.warn("MessagingService has not been set!");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,7 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class OfficeToPdfConversionService {
|
public class OfficeToPdfConversionService {
|
||||||
private static Logger log = LoggerFactory
|
private static Logger log = LoggerFactory.getLogger(OfficeToPdfConversionService.class);
|
||||||
.getLogger(OfficeToPdfConversionService.class);
|
|
||||||
|
|
||||||
private OfficeDocumentValidator officeDocumentValidator;
|
private OfficeDocumentValidator officeDocumentValidator;
|
||||||
|
|
||||||
|
@ -42,14 +42,15 @@ import org.bigbluebutton.presentation.SvgImageCreator;
|
|||||||
import org.bigbluebutton.presentation.TextFileCreator;
|
import org.bigbluebutton.presentation.TextFileCreator;
|
||||||
import org.bigbluebutton.presentation.ThumbnailCreator;
|
import org.bigbluebutton.presentation.ThumbnailCreator;
|
||||||
import org.bigbluebutton.presentation.UploadedPresentation;
|
import org.bigbluebutton.presentation.UploadedPresentation;
|
||||||
|
import org.bigbluebutton.presentation.messages.DocPageCountExceeded;
|
||||||
|
import org.bigbluebutton.presentation.messages.DocPageCountFailed;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
public class PdfToSwfSlidesGenerationService {
|
public class PdfToSwfSlidesGenerationService {
|
||||||
private static Logger log = LoggerFactory
|
private static Logger log = LoggerFactory.getLogger(PdfToSwfSlidesGenerationService.class);
|
||||||
.getLogger(PdfToSwfSlidesGenerationService.class);
|
|
||||||
|
|
||||||
private SwfSlidesGenerationProgressNotifier notifier;
|
private SwfSlidesGenerationProgressNotifier notifier;
|
||||||
private PageCounterService counterService;
|
private PageCounterService counterService;
|
||||||
@ -94,20 +95,33 @@ public class PdfToSwfSlidesGenerationService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendFailedToCountPageMessage(CountingPageException e,
|
private void sendFailedToCountPageMessage(CountingPageException e, UploadedPresentation pres) {
|
||||||
UploadedPresentation pres) {
|
|
||||||
MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
|
MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
|
||||||
|
|
||||||
if (e
|
if (e.getExceptionType() == CountingPageException.ExceptionType.PAGE_COUNT_EXCEPTION) {
|
||||||
.getExceptionType() == CountingPageException.ExceptionType.PAGE_COUNT_EXCEPTION) {
|
|
||||||
builder.messageKey(ConversionMessageConstants.PAGE_COUNT_FAILED_KEY);
|
builder.messageKey(ConversionMessageConstants.PAGE_COUNT_FAILED_KEY);
|
||||||
} else if (e
|
|
||||||
.getExceptionType() == CountingPageException.ExceptionType.PAGE_EXCEEDED_EXCEPTION) {
|
DocPageCountFailed progress = new DocPageCountFailed(pres.getMeetingId(),
|
||||||
|
pres.getId(), pres.getId(),
|
||||||
|
pres.getName(), "notUsedYet", "notUsedYet",
|
||||||
|
pres.isDownloadable(), ConversionMessageConstants.PAGE_COUNT_FAILED_KEY);
|
||||||
|
|
||||||
|
notifier.sendDocConversionProgress(progress);
|
||||||
|
|
||||||
|
} else if (e.getExceptionType() == CountingPageException.ExceptionType.PAGE_EXCEEDED_EXCEPTION) {
|
||||||
builder.numberOfPages(e.getPageCount());
|
builder.numberOfPages(e.getPageCount());
|
||||||
builder.maxNumberPages(e.getMaxNumberOfPages());
|
builder.maxNumberPages(e.getMaxNumberOfPages());
|
||||||
builder.messageKey(ConversionMessageConstants.PAGE_COUNT_EXCEEDED_KEY);
|
builder.messageKey(ConversionMessageConstants.PAGE_COUNT_EXCEEDED_KEY);
|
||||||
|
|
||||||
|
DocPageCountExceeded progress = new DocPageCountExceeded(pres.getMeetingId(),
|
||||||
|
pres.getId(), pres.getId(),
|
||||||
|
pres.getName(), "notUsedYet", "notUsedYet",
|
||||||
|
pres.isDownloadable(), ConversionMessageConstants.PAGE_COUNT_EXCEEDED_KEY,
|
||||||
|
e.getPageCount(), e.getMaxNumberOfPages());
|
||||||
|
|
||||||
|
notifier.sendDocConversionProgress(progress);
|
||||||
}
|
}
|
||||||
notifier.sendConversionUpdateMessage(builder.build().getMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createThumbnails(UploadedPresentation pres) {
|
private void createThumbnails(UploadedPresentation pres) {
|
||||||
|
@ -1,103 +1,103 @@
|
|||||||
/**
|
/**
|
||||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||||
*
|
* <p>
|
||||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||||
*
|
* <p>
|
||||||
* This program is free software; you can redistribute it and/or modify it under the
|
* 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
|
* 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
|
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||||
* version.
|
* version.
|
||||||
*
|
* <p>
|
||||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
* 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
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
*
|
* <p>
|
||||||
* You should have received a copy of the GNU Lesser General Public License along
|
* You should have received a copy of the GNU Lesser General Public License along
|
||||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
package org.bigbluebutton.presentation.imp;
|
package org.bigbluebutton.presentation.imp;
|
||||||
|
|
||||||
import java.util.Map;
|
import org.bigbluebutton.api2.IBbbWebApiGWApp;
|
||||||
|
|
||||||
import org.bigbluebutton.api.messaging.MessagingConstants;
|
|
||||||
import org.bigbluebutton.api.messaging.MessagingService;
|
|
||||||
import org.bigbluebutton.presentation.ConversionMessageConstants;
|
import org.bigbluebutton.presentation.ConversionMessageConstants;
|
||||||
import org.bigbluebutton.presentation.ConversionUpdateMessage;
|
|
||||||
import org.bigbluebutton.presentation.ConversionUpdateMessage.MessageBuilder;
|
|
||||||
import org.bigbluebutton.presentation.GeneratedSlidesInfoHelper;
|
import org.bigbluebutton.presentation.GeneratedSlidesInfoHelper;
|
||||||
import org.bigbluebutton.presentation.UploadedPresentation;
|
import org.bigbluebutton.presentation.UploadedPresentation;
|
||||||
|
import org.bigbluebutton.presentation.messages.DocPageCompletedProgress;
|
||||||
|
import org.bigbluebutton.presentation.messages.DocPageGeneratedProgress;
|
||||||
|
import org.bigbluebutton.presentation.messages.IDocConversionMsg;
|
||||||
|
import org.bigbluebutton.presentation.messages.OfficeDocConversionProgress;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
|
|
||||||
public class SwfSlidesGenerationProgressNotifier {
|
public class SwfSlidesGenerationProgressNotifier {
|
||||||
private static Logger log = LoggerFactory.getLogger(SwfSlidesGenerationProgressNotifier.class);
|
private static Logger log = LoggerFactory.getLogger(SwfSlidesGenerationProgressNotifier.class);
|
||||||
|
|
||||||
private MessagingService messagingService;
|
private IBbbWebApiGWApp messagingService;
|
||||||
|
|
||||||
private GeneratedSlidesInfoHelper generatedSlidesInfoHelper;
|
|
||||||
|
|
||||||
private void notifyProgressListener(Map<String, Object> msg) {
|
|
||||||
if(messagingService != null){
|
|
||||||
Gson gson= new Gson();
|
|
||||||
String updateMsg = gson.toJson(msg);
|
|
||||||
messagingService.send(MessagingConstants.TO_PRESENTATION_CHANNEL, updateMsg);
|
|
||||||
} else {
|
|
||||||
log.warn("MessagingService has not been set");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendConversionUpdateMessage(Map<String, Object> message) {
|
private GeneratedSlidesInfoHelper generatedSlidesInfoHelper;
|
||||||
notifyProgressListener(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendConversionUpdateMessage(int slidesCompleted, UploadedPresentation pres) {
|
|
||||||
MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
|
|
||||||
builder.messageKey(ConversionMessageConstants.GENERATED_SLIDE_KEY);
|
|
||||||
builder.numberOfPages(pres.getNumberOfPages());
|
|
||||||
builder.pagesCompleted(slidesCompleted);
|
|
||||||
notifyProgressListener(builder.build().getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendCreatingThumbnailsUpdateMessage(UploadedPresentation pres) {
|
|
||||||
MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
|
|
||||||
builder.messageKey(ConversionMessageConstants.GENERATING_THUMBNAIL_KEY);
|
|
||||||
notifyProgressListener(builder.build().getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendConversionCompletedMessage(UploadedPresentation pres) {
|
|
||||||
if (generatedSlidesInfoHelper == null) {
|
|
||||||
log.error("GeneratedSlidesInfoHelper was not set. Could not notify interested listeners.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
|
|
||||||
builder.messageKey(ConversionMessageConstants.CONVERSION_COMPLETED_KEY);
|
|
||||||
builder.numberOfPages(pres.getNumberOfPages());
|
|
||||||
builder.presBaseUrl(pres);
|
|
||||||
notifyProgressListener(builder.build().getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMessagingService(MessagingService m) {
|
|
||||||
messagingService = m;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGeneratedSlidesInfoHelper(GeneratedSlidesInfoHelper helper) {
|
|
||||||
generatedSlidesInfoHelper = helper;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendCreatingTextFilesUpdateMessage(UploadedPresentation pres) {
|
|
||||||
MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
|
|
||||||
builder.messageKey(ConversionMessageConstants.GENERATING_TEXTFILES_KEY);
|
|
||||||
notifyProgressListener(builder.build().getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendCreatingSvgImagesUpdateMessage(UploadedPresentation pres) {
|
public void sendDocConversionProgress(IDocConversionMsg msg) {
|
||||||
MessageBuilder builder = new ConversionUpdateMessage.MessageBuilder(pres);
|
messagingService.sendDocConversionMsg(msg);
|
||||||
builder.messageKey(ConversionMessageConstants.GENERATING_SVGIMAGES_KEY);
|
}
|
||||||
notifyProgressListener(builder.build().getMessage());
|
|
||||||
}
|
|
||||||
|
public void sendConversionUpdateMessage(int slidesCompleted, UploadedPresentation pres) {
|
||||||
|
DocPageGeneratedProgress progress = new DocPageGeneratedProgress(pres.getMeetingId(),
|
||||||
|
pres.getId(), pres.getId(),
|
||||||
|
pres.getName(), "notUsedYet", "notUsedYet",
|
||||||
|
pres.isDownloadable(), ConversionMessageConstants.GENERATED_SLIDE_KEY,
|
||||||
|
pres.getNumberOfPages(), slidesCompleted);
|
||||||
|
messagingService.sendDocConversionMsg(progress);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendCreatingThumbnailsUpdateMessage(UploadedPresentation pres) {
|
||||||
|
OfficeDocConversionProgress progress = new OfficeDocConversionProgress(pres.getMeetingId(),
|
||||||
|
pres.getId(), pres.getId(),
|
||||||
|
pres.getName(), "notUsedYet", "notUsedYet",
|
||||||
|
pres.isDownloadable(), ConversionMessageConstants.GENERATING_THUMBNAIL_KEY);
|
||||||
|
messagingService.sendDocConversionMsg(progress);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendConversionCompletedMessage(UploadedPresentation pres) {
|
||||||
|
if (generatedSlidesInfoHelper == null) {
|
||||||
|
log.error("GeneratedSlidesInfoHelper was not set. Could not notify interested listeners.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DocPageCompletedProgress progress = new DocPageCompletedProgress(pres.getMeetingId(),
|
||||||
|
pres.getId(), pres.getId(),
|
||||||
|
pres.getName(), "notUsedYet", "notUsedYet",
|
||||||
|
pres.isDownloadable(), ConversionMessageConstants.CONVERSION_COMPLETED_KEY,
|
||||||
|
pres.getNumberOfPages(), generateBasePresUrl(pres));
|
||||||
|
messagingService.sendDocConversionMsg(progress);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String generateBasePresUrl(UploadedPresentation pres) {
|
||||||
|
return pres.getBaseUrl() + "/" + pres.getMeetingId() + "/" + pres.getMeetingId() + "/" + pres.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessagingService(IBbbWebApiGWApp m) {
|
||||||
|
messagingService = m;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGeneratedSlidesInfoHelper(GeneratedSlidesInfoHelper helper) {
|
||||||
|
generatedSlidesInfoHelper = helper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendCreatingTextFilesUpdateMessage(UploadedPresentation pres) {
|
||||||
|
OfficeDocConversionProgress progress = new OfficeDocConversionProgress(pres.getMeetingId(),
|
||||||
|
pres.getId(), pres.getId(),
|
||||||
|
pres.getName(), "notUsedYet", "notUsedYet",
|
||||||
|
pres.isDownloadable(), ConversionMessageConstants.GENERATING_TEXTFILES_KEY);
|
||||||
|
messagingService.sendDocConversionMsg(progress);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendCreatingSvgImagesUpdateMessage(UploadedPresentation pres) {
|
||||||
|
OfficeDocConversionProgress progress = new OfficeDocConversionProgress(pres.getMeetingId(),
|
||||||
|
pres.getId(), pres.getId(),
|
||||||
|
pres.getName(), "notUsedYet", "notUsedYet",
|
||||||
|
pres.isDownloadable(), ConversionMessageConstants.GENERATING_SVGIMAGES_KEY);
|
||||||
|
messagingService.sendDocConversionMsg(progress);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
package org.bigbluebutton.presentation.messages;
|
||||||
|
|
||||||
|
public class DocPageCompletedProgress implements IDocConversionMsg {
|
||||||
|
public final String meetingId;
|
||||||
|
public final String presId;
|
||||||
|
public final String presInstance;
|
||||||
|
public final String filename;
|
||||||
|
public final String uploaderId;
|
||||||
|
public final String authzToken;
|
||||||
|
public final Boolean downloadable;
|
||||||
|
public final String key;
|
||||||
|
public final Integer numPages;
|
||||||
|
public final String presBaseUrl;
|
||||||
|
|
||||||
|
public DocPageCompletedProgress(String meetingId, String presId, String presInstance,
|
||||||
|
String filename, String uploaderId, String authzToken,
|
||||||
|
Boolean downloadable, String key,
|
||||||
|
Integer numPages, String presBaseUrl) {
|
||||||
|
this.meetingId = meetingId;
|
||||||
|
this.presId = presId;
|
||||||
|
this.presInstance = presInstance;
|
||||||
|
this.filename = filename;
|
||||||
|
this.uploaderId = uploaderId;
|
||||||
|
this.authzToken = authzToken;
|
||||||
|
this.downloadable = downloadable;
|
||||||
|
this.key = key;
|
||||||
|
this.numPages = numPages;
|
||||||
|
this.presBaseUrl = presBaseUrl;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package org.bigbluebutton.presentation.messages;
|
||||||
|
|
||||||
|
public class DocPageCountExceeded implements IDocConversionMsg {
|
||||||
|
public final String meetingId;
|
||||||
|
public final String presId;
|
||||||
|
public final String presInstance;
|
||||||
|
public final String filename;
|
||||||
|
public final String uploaderId;
|
||||||
|
public final String authzToken;
|
||||||
|
public final Boolean downloadable;
|
||||||
|
public final String key;
|
||||||
|
public final Integer numPages;
|
||||||
|
public final Integer maxNumPages;
|
||||||
|
|
||||||
|
public DocPageCountExceeded(String meetingId, String presId, String presInstance,
|
||||||
|
String filename, String uploaderId, String authzToken,
|
||||||
|
Boolean downloadable, String key,
|
||||||
|
Integer numPages, Integer maxNumPages) {
|
||||||
|
this.meetingId = meetingId;
|
||||||
|
this.presId = presId;
|
||||||
|
this.presInstance = presInstance;
|
||||||
|
this.filename = filename;
|
||||||
|
this.uploaderId = uploaderId;
|
||||||
|
this.authzToken = authzToken;
|
||||||
|
this.downloadable = downloadable;
|
||||||
|
this.key = key;
|
||||||
|
this.numPages = numPages;
|
||||||
|
this.maxNumPages = maxNumPages;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package org.bigbluebutton.presentation.messages;
|
||||||
|
|
||||||
|
public class DocPageCountFailed implements IDocConversionMsg {
|
||||||
|
public final String meetingId;
|
||||||
|
public final String presId;
|
||||||
|
public final String presInstance;
|
||||||
|
public final String filename;
|
||||||
|
public final String uploaderId;
|
||||||
|
public final String authzToken;
|
||||||
|
public final Boolean downloadable;
|
||||||
|
public final String key;
|
||||||
|
|
||||||
|
public DocPageCountFailed(String meetingId, String presId, String presInstance,
|
||||||
|
String filename, String uploaderId, String authzToken,
|
||||||
|
Boolean downloadable, String key) {
|
||||||
|
this.meetingId = meetingId;
|
||||||
|
this.presId = presId;
|
||||||
|
this.presInstance = presInstance;
|
||||||
|
this.filename = filename;
|
||||||
|
this.uploaderId = uploaderId;
|
||||||
|
this.authzToken = authzToken;
|
||||||
|
this.downloadable = downloadable;
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package org.bigbluebutton.presentation.messages;
|
||||||
|
|
||||||
|
public class DocPageGeneratedProgress implements IDocConversionMsg {
|
||||||
|
public final String meetingId;
|
||||||
|
public final String presId;
|
||||||
|
public final String presInstance;
|
||||||
|
public final String filename;
|
||||||
|
public final String uploaderId;
|
||||||
|
public final String authzToken;
|
||||||
|
public final Boolean downloadable;
|
||||||
|
public final String key;
|
||||||
|
public final Integer numPages;
|
||||||
|
public final Integer pagesCompleted;
|
||||||
|
|
||||||
|
public DocPageGeneratedProgress(String meetingId, String presId, String presInstance,
|
||||||
|
String filename, String uploaderId, String authzToken,
|
||||||
|
Boolean downloadable, String key,
|
||||||
|
Integer numPages, Integer pagesCompleted) {
|
||||||
|
this.meetingId = meetingId;
|
||||||
|
this.presId = presId;
|
||||||
|
this.presInstance = presInstance;
|
||||||
|
this.filename = filename;
|
||||||
|
this.uploaderId = uploaderId;
|
||||||
|
this.authzToken = authzToken;
|
||||||
|
this.downloadable = downloadable;
|
||||||
|
this.key = key;
|
||||||
|
this.numPages = numPages;
|
||||||
|
this.pagesCompleted = pagesCompleted;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
package org.bigbluebutton.presentation.messages;
|
||||||
|
|
||||||
|
|
||||||
|
public interface IDocConversionMsg {
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package org.bigbluebutton.presentation.messages;
|
||||||
|
|
||||||
|
|
||||||
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
|
|
||||||
|
public class OfficeDocConversionInvalid implements IMessage{
|
||||||
|
public final String meetingId;
|
||||||
|
public final String presId;
|
||||||
|
public final String presInstance;
|
||||||
|
public final String filename;
|
||||||
|
public final String uploaderId;
|
||||||
|
public final String authzToken;
|
||||||
|
public final Boolean downloadable;
|
||||||
|
|
||||||
|
public OfficeDocConversionInvalid(String meetingId, String presId, String presInstance,
|
||||||
|
String filename, String uploaderId, String authzToken,
|
||||||
|
Boolean downloadable) {
|
||||||
|
this.meetingId = meetingId;
|
||||||
|
this.presId = presId;
|
||||||
|
this.presInstance = presInstance;
|
||||||
|
this.filename = filename;
|
||||||
|
this.uploaderId = uploaderId;
|
||||||
|
this.authzToken = authzToken;
|
||||||
|
this.downloadable = downloadable;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package org.bigbluebutton.presentation.messages;
|
||||||
|
|
||||||
|
|
||||||
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
|
|
||||||
|
public class OfficeDocConversionProgress implements IDocConversionMsg {
|
||||||
|
public final String meetingId;
|
||||||
|
public final String presId;
|
||||||
|
public final String presInstance;
|
||||||
|
public final String filename;
|
||||||
|
public final String uploaderId;
|
||||||
|
public final String authzToken;
|
||||||
|
public final Boolean downloadable;
|
||||||
|
public final String key;
|
||||||
|
|
||||||
|
public OfficeDocConversionProgress(String meetingId, String presId, String presInstance,
|
||||||
|
String filename, String uploaderId, String authzToken,
|
||||||
|
Boolean downloadable, String key) {
|
||||||
|
this.meetingId = meetingId;
|
||||||
|
this.presId = presId;
|
||||||
|
this.presInstance = presInstance;
|
||||||
|
this.filename = filename;
|
||||||
|
this.uploaderId = uploaderId;
|
||||||
|
this.authzToken = authzToken;
|
||||||
|
this.downloadable = downloadable;
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package org.bigbluebutton.presentation.messages;
|
||||||
|
|
||||||
|
|
||||||
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
|
|
||||||
|
public class OfficeDocConversionSuccess implements IMessage{
|
||||||
|
public final String meetingId;
|
||||||
|
public final String presId;
|
||||||
|
public final String presInstance;
|
||||||
|
public final String filename;
|
||||||
|
public final String uploaderId;
|
||||||
|
public final String authzToken;
|
||||||
|
public final Boolean downloadable;
|
||||||
|
|
||||||
|
public OfficeDocConversionSuccess(String meetingId, String presId, String presInstance,
|
||||||
|
String filename, String uploaderId, String authzToken,
|
||||||
|
Boolean downloadable) {
|
||||||
|
this.meetingId = meetingId;
|
||||||
|
this.presId = presId;
|
||||||
|
this.presInstance = presInstance;
|
||||||
|
this.filename = filename;
|
||||||
|
this.uploaderId = uploaderId;
|
||||||
|
this.authzToken = authzToken;
|
||||||
|
this.downloadable = downloadable;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package org.bigbluebutton.presentation.messages;
|
||||||
|
|
||||||
|
|
||||||
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
|
|
||||||
|
public class OfficeDocConversionSupported implements IMessage{
|
||||||
|
public final String meetingId;
|
||||||
|
public final String presId;
|
||||||
|
public final String presInstance;
|
||||||
|
public final String filename;
|
||||||
|
public final String uploaderId;
|
||||||
|
public final String authzToken;
|
||||||
|
public final Boolean downloadable;
|
||||||
|
|
||||||
|
public OfficeDocConversionSupported(String meetingId, String presId, String presInstance,
|
||||||
|
String filename, String uploaderId, String authzToken,
|
||||||
|
Boolean downloadable) {
|
||||||
|
this.meetingId = meetingId;
|
||||||
|
this.presId = presId;
|
||||||
|
this.presInstance = presInstance;
|
||||||
|
this.filename = filename;
|
||||||
|
this.uploaderId = uploaderId;
|
||||||
|
this.authzToken = authzToken;
|
||||||
|
this.downloadable = downloadable;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package org.bigbluebutton.presentation.messages;
|
||||||
|
|
||||||
|
|
||||||
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
|
|
||||||
|
public class OfficeDocConversionUnsupported implements IMessage{
|
||||||
|
public final String meetingId;
|
||||||
|
public final String presId;
|
||||||
|
public final String presInstance;
|
||||||
|
public final String filename;
|
||||||
|
public final String uploaderId;
|
||||||
|
public final String authzToken;
|
||||||
|
public final Boolean downloadable;
|
||||||
|
|
||||||
|
public OfficeDocConversionUnsupported(String meetingId, String presId, String presInstance,
|
||||||
|
String filename, String uploaderId, String authzToken,
|
||||||
|
Boolean downloadable) {
|
||||||
|
this.meetingId = meetingId;
|
||||||
|
this.presId = presId;
|
||||||
|
this.presInstance = presInstance;
|
||||||
|
this.filename = filename;
|
||||||
|
this.uploaderId = uploaderId;
|
||||||
|
this.authzToken = authzToken;
|
||||||
|
this.downloadable = downloadable;
|
||||||
|
}
|
||||||
|
}
|
@ -1,21 +1,20 @@
|
|||||||
/**
|
/**
|
||||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||||
*
|
* <p>
|
||||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||||
*
|
* <p>
|
||||||
* This program is free software; you can redistribute it and/or modify it under the
|
* 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
|
* 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
|
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||||
* version.
|
* version.
|
||||||
*
|
* <p>
|
||||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
* 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
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
*
|
* <p>
|
||||||
* You should have received a copy of the GNU Lesser General Public License along
|
* You should have received a copy of the GNU Lesser General Public License along
|
||||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
package org.bigbluebutton.web.services;
|
package org.bigbluebutton.web.services;
|
||||||
|
|
||||||
@ -25,141 +24,138 @@ import java.util.concurrent.Executors;
|
|||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.bigbluebutton.api.messaging.MessageListener;
|
import org.bigbluebutton.api.messaging.MessageListener;
|
||||||
import org.bigbluebutton.api.messaging.MessagingService;
|
|
||||||
import org.bigbluebutton.api.messaging.messages.IMessage;
|
import org.bigbluebutton.api.messaging.messages.IMessage;
|
||||||
import org.bigbluebutton.api.messaging.messages.KeepAliveReply;
|
import org.bigbluebutton.api.messaging.messages.KeepAliveReply;
|
||||||
import org.bigbluebutton.api.pub.IPublisherService;
|
import org.bigbluebutton.api2.IBbbWebApiGWApp;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class KeepAliveService implements MessageListener {
|
public class KeepAliveService implements MessageListener {
|
||||||
private static Logger log = LoggerFactory.getLogger(KeepAliveService.class);
|
private static Logger log = LoggerFactory.getLogger(KeepAliveService.class);
|
||||||
private final String KEEP_ALIVE_REQUEST = "KEEP_ALIVE_REQUEST";
|
private final String KEEP_ALIVE_REQUEST = "KEEP_ALIVE_REQUEST";
|
||||||
private MessagingService service;
|
private IBbbWebApiGWApp gw;
|
||||||
private long runEvery = 10000;
|
private long runEvery = 10000;
|
||||||
private int maxLives = 5;
|
private int maxLives = 5;
|
||||||
private KeepAliveTask task = new KeepAliveTask();
|
private KeepAliveTask task = new KeepAliveTask();
|
||||||
private volatile boolean processMessages = false;
|
private volatile boolean processMessages = false;
|
||||||
|
|
||||||
volatile boolean available = true;
|
volatile boolean available = true;
|
||||||
|
|
||||||
private static final Executor msgSenderExec = Executors.newFixedThreadPool(1);
|
|
||||||
private static final Executor runExec = Executors.newFixedThreadPool(1);
|
|
||||||
|
|
||||||
private ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(1);
|
|
||||||
|
|
||||||
private BlockingQueue<KeepAliveMessage> messages = new LinkedBlockingQueue<KeepAliveMessage>();
|
|
||||||
|
|
||||||
private Long lastKeepAliveMessage = 0L;
|
|
||||||
|
|
||||||
private final String SYSTEM = "BbbWeb";
|
|
||||||
|
|
||||||
public void start() {
|
|
||||||
scheduledThreadPool.scheduleWithFixedDelay(task, 5000, runEvery, TimeUnit.MILLISECONDS);
|
|
||||||
processKeepAliveMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void stop() {
|
|
||||||
processMessages = false;
|
|
||||||
scheduledThreadPool.shutdownNow();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRunEvery(long v) {
|
|
||||||
runEvery = v * 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPublisherService(MessagingService service){
|
private static final Executor msgSenderExec = Executors.newFixedThreadPool(1);
|
||||||
this.service = service;
|
private static final Executor runExec = Executors.newFixedThreadPool(1);
|
||||||
}
|
|
||||||
|
private ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(1);
|
||||||
class KeepAliveTask implements Runnable {
|
|
||||||
|
private BlockingQueue<KeepAliveMessage> messages = new LinkedBlockingQueue<KeepAliveMessage>();
|
||||||
|
|
||||||
|
private Long lastKeepAliveMessage = 0L;
|
||||||
|
|
||||||
|
private final String SYSTEM = "BbbWeb";
|
||||||
|
|
||||||
|
public void start() {
|
||||||
|
scheduledThreadPool.scheduleWithFixedDelay(task, 5000, runEvery, TimeUnit.MILLISECONDS);
|
||||||
|
processKeepAliveMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void stop() {
|
||||||
|
processMessages = false;
|
||||||
|
scheduledThreadPool.shutdownNow();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRunEvery(long v) {
|
||||||
|
runEvery = v * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGw(IBbbWebApiGWApp gw) {
|
||||||
|
this.gw = gw;
|
||||||
|
}
|
||||||
|
|
||||||
|
class KeepAliveTask implements Runnable {
|
||||||
public void run() {
|
public void run() {
|
||||||
KeepAlivePing ping = new KeepAlivePing();
|
KeepAlivePing ping = new KeepAlivePing();
|
||||||
queueMessage(ping);
|
queueMessage(ping);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDown(){
|
public boolean isDown() {
|
||||||
//return !available;
|
//return !available;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void queueMessage(KeepAliveMessage msg) {
|
private void queueMessage(KeepAliveMessage msg) {
|
||||||
messages.add(msg);
|
messages.add(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processKeepAliveMessage() {
|
private void processKeepAliveMessage() {
|
||||||
processMessages = true;
|
processMessages = true;
|
||||||
Runnable sender = new Runnable() {
|
Runnable sender = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
while (processMessages) {
|
while (processMessages) {
|
||||||
KeepAliveMessage message;
|
KeepAliveMessage message;
|
||||||
try {
|
try {
|
||||||
message = messages.take();
|
message = messages.take();
|
||||||
processMessage(message);
|
processMessage(message);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Catching exception [{}]", e.toString());
|
log.error("Catching exception [{}]", e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msgSenderExec.execute(sender);
|
msgSenderExec.execute(sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processMessage(final KeepAliveMessage msg) {
|
private void processMessage(final KeepAliveMessage msg) {
|
||||||
Runnable task = new Runnable() {
|
Runnable task = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (msg instanceof KeepAlivePing) {
|
if (msg instanceof KeepAlivePing) {
|
||||||
// processPing((KeepAlivePing) msg);
|
processPing((KeepAlivePing) msg);
|
||||||
} else if (msg instanceof KeepAlivePong) {
|
} else if (msg instanceof KeepAlivePong) {
|
||||||
// processPong((KeepAlivePong) msg);
|
processPong((KeepAlivePong) msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
runExec.execute(task);
|
runExec.execute(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processPing(KeepAlivePing msg) {
|
private void processPing(KeepAlivePing msg) {
|
||||||
service.sendKeepAlive(SYSTEM, System.currentTimeMillis());
|
gw.sendKeepAlive(SYSTEM, System.currentTimeMillis());
|
||||||
Boolean akkaAppsIsAvailable = available;
|
Boolean akkaAppsIsAvailable = available;
|
||||||
|
|
||||||
if (lastKeepAliveMessage != 0 && (System.currentTimeMillis() - lastKeepAliveMessage > 30000)) {
|
if (lastKeepAliveMessage != 0 && (System.currentTimeMillis() - lastKeepAliveMessage > 30000)) {
|
||||||
if (akkaAppsIsAvailable) {
|
if (akkaAppsIsAvailable) {
|
||||||
log.error("BBB Web pubsub error!");
|
log.error("BBB Web pubsub error!");
|
||||||
// BBB-Apps has gone down. Mark it as unavailable. (ralam - april 29, 2014)
|
// BBB-Apps has gone down. Mark it as unavailable. (ralam - april 29, 2014)
|
||||||
available = false;
|
available = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processPong(KeepAlivePong msg) {
|
private void processPong(KeepAlivePong msg) {
|
||||||
if (lastKeepAliveMessage != 0 && !available) {
|
if (lastKeepAliveMessage != 0 && !available) {
|
||||||
log.error("BBB Web pubsub recovered!");
|
log.error("BBB Web pubsub recovered!");
|
||||||
}
|
}
|
||||||
|
|
||||||
lastKeepAliveMessage = System.currentTimeMillis();
|
|
||||||
available = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void handleKeepAliveReply(String system, Long timestamp) {
|
|
||||||
if (system.equals("BbbWeb")) {
|
|
||||||
KeepAlivePong pong = new KeepAlivePong(system, timestamp);
|
|
||||||
queueMessage(pong);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
lastKeepAliveMessage = System.currentTimeMillis();
|
||||||
|
available = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private void handleKeepAliveReply(String system, Long timestamp) {
|
||||||
|
if (system.equals("BbbWeb")) {
|
||||||
|
KeepAlivePong pong = new KeepAlivePong(system, timestamp);
|
||||||
|
queueMessage(pong);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void handle(IMessage message) {
|
public void handle(IMessage message) {
|
||||||
if (message instanceof KeepAliveReply) {
|
if (message instanceof KeepAliveReply) {
|
||||||
KeepAliveReply msg = (KeepAliveReply) message;
|
KeepAliveReply msg = (KeepAliveReply) message;
|
||||||
handleKeepAliveReply(msg.system, msg.timestamp);
|
handleKeepAliveReply(msg.system, msg.timestamp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,13 @@ package org.bigbluebutton.api2
|
|||||||
import scala.collection.JavaConverters._
|
import scala.collection.JavaConverters._
|
||||||
import akka.actor.ActorSystem
|
import akka.actor.ActorSystem
|
||||||
import akka.event.Logging
|
import akka.event.Logging
|
||||||
|
import org.bigbluebutton.api.messaging.converters.messages._
|
||||||
import org.bigbluebutton.api2.bus._
|
import org.bigbluebutton.api2.bus._
|
||||||
import org.bigbluebutton.api2.endpoint.redis.{AppsRedisSubscriberActor, MessageSender, RedisPublisher}
|
import org.bigbluebutton.api2.endpoint.redis.{AppsRedisSubscriberActor, MessageSender, RedisPublisher}
|
||||||
import org.bigbluebutton.api2.meeting.{CreateMeetingMsg, MeetingsManagerActor, RegisterUser}
|
import org.bigbluebutton.api2.meeting.{MeetingsManagerActor, OldMeetingMsgHdlrActor, RegisterUser}
|
||||||
|
import org.bigbluebutton.common.messages.SendStunTurnInfoReplyMessage
|
||||||
import org.bigbluebutton.common2.domain._
|
import org.bigbluebutton.common2.domain._
|
||||||
|
import org.bigbluebutton.presentation.messages.IDocConversionMsg
|
||||||
|
|
||||||
import scala.concurrent.duration._
|
import scala.concurrent.duration._
|
||||||
|
|
||||||
@ -24,8 +27,7 @@ class BbbWebApiGWApp(val oldMessageReceivedGW: OldMessageReceivedGW) extends IBb
|
|||||||
private val jsonMsgToAkkaAppsBus = new JsonMsgToAkkaAppsBus
|
private val jsonMsgToAkkaAppsBus = new JsonMsgToAkkaAppsBus
|
||||||
private val redisPublisher = new RedisPublisher(system)
|
private val redisPublisher = new RedisPublisher(system)
|
||||||
private val msgSender: MessageSender = new MessageSender(redisPublisher)
|
private val msgSender: MessageSender = new MessageSender(redisPublisher)
|
||||||
private val messageSenderActorRef = system.actorOf(
|
private val messageSenderActorRef = system.actorOf(MessageSenderActor.props(msgSender), "messageSenderActor")
|
||||||
MessageSenderActor.props(msgSender), "messageSenderActor")
|
|
||||||
|
|
||||||
jsonMsgToAkkaAppsBus.subscribe(messageSenderActorRef, toAkkaAppsJsonChannel)
|
jsonMsgToAkkaAppsBus.subscribe(messageSenderActorRef, toAkkaAppsJsonChannel)
|
||||||
|
|
||||||
@ -38,6 +40,11 @@ class BbbWebApiGWApp(val oldMessageReceivedGW: OldMessageReceivedGW) extends IBb
|
|||||||
MeetingsManagerActor.props(msgToAkkaAppsEventBus), "meetingManagerActor")
|
MeetingsManagerActor.props(msgToAkkaAppsEventBus), "meetingManagerActor")
|
||||||
msgFromAkkaAppsEventBus.subscribe(meetingManagerActorRef, fromAkkaAppsChannel)
|
msgFromAkkaAppsEventBus.subscribe(meetingManagerActorRef, fromAkkaAppsChannel)
|
||||||
|
|
||||||
|
private val oldMeetingMsgHdlrActor = system.actorOf(
|
||||||
|
OldMeetingMsgHdlrActor.props(oldMessageReceivedGW), "oldMeetingMsgHdlrActor"
|
||||||
|
)
|
||||||
|
msgFromAkkaAppsEventBus.subscribe(oldMeetingMsgHdlrActor, fromAkkaAppsChannel)
|
||||||
|
|
||||||
private val msgToAkkaAppsToJsonActor = system.actorOf(
|
private val msgToAkkaAppsToJsonActor = system.actorOf(
|
||||||
MsgToAkkaAppsToJsonActor.props(jsonMsgToAkkaAppsBus), "msgToAkkaAppsToJsonActor")
|
MsgToAkkaAppsToJsonActor.props(jsonMsgToAkkaAppsBus), "msgToAkkaAppsToJsonActor")
|
||||||
|
|
||||||
@ -94,14 +101,58 @@ class BbbWebApiGWApp(val oldMessageReceivedGW: OldMessageReceivedGW) extends IBb
|
|||||||
val defaultProps = DefaultProps(meetingProp, breakoutProps, durationProps, password, recordProp, welcomeProp, voiceProp,
|
val defaultProps = DefaultProps(meetingProp, breakoutProps, durationProps, password, recordProp, welcomeProp, voiceProp,
|
||||||
usersProp, metadataProp, screenshareProps)
|
usersProp, metadataProp, screenshareProps)
|
||||||
|
|
||||||
meetingManagerActorRef ! new CreateMeetingMsg(defaultProps)
|
//meetingManagerActorRef ! new CreateMeetingMsg(defaultProps)
|
||||||
|
|
||||||
|
val event = MsgBuilder.buildCreateMeetingRequestToAkkaApps(defaultProps)
|
||||||
|
msgToAkkaAppsEventBus.publish(MsgToAkkaApps(toAkkaAppsChannel, event))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def registerUser (meetingId: String, intUserId: String, name: String,
|
def registerUser (meetingId: String, intUserId: String, name: String,
|
||||||
role: String, extUserId: String, authToken: String, avatarURL: String,
|
role: String, extUserId: String, authToken: String, avatarURL: String,
|
||||||
guest: java.lang.Boolean, authed: java.lang.Boolean): Unit = {
|
guest: java.lang.Boolean, authed: java.lang.Boolean): Unit = {
|
||||||
meetingManagerActorRef ! new RegisterUser(meetingId = meetingId, intUserId = intUserId, name = name,
|
|
||||||
role = role, extUserId = extUserId, authToken = authToken, avatarURL = avatarURL,
|
// meetingManagerActorRef ! new RegisterUser(meetingId = meetingId, intUserId = intUserId, name = name,
|
||||||
guest = guest, authed = authed)
|
// role = role, extUserId = extUserId, authToken = authToken, avatarURL = avatarURL,
|
||||||
|
// guest = guest, authed = authed)
|
||||||
|
|
||||||
|
val regUser = new RegisterUser(meetingId = meetingId, intUserId = intUserId, name = name,
|
||||||
|
role = role, extUserId = extUserId, authToken = authToken, avatarURL = avatarURL,
|
||||||
|
guest = guest.booleanValue(), authed = authed.booleanValue())
|
||||||
|
|
||||||
|
val event = MsgBuilder.buildRegisterUserRequestToAkkaApps(regUser)
|
||||||
|
msgToAkkaAppsEventBus.publish(MsgToAkkaApps(toAkkaAppsChannel, event))
|
||||||
|
}
|
||||||
|
|
||||||
|
def destroyMeeting (msg: DestroyMeetingMessage): Unit = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
def endMeeting(msg: EndMeetingMessage): Unit = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
def sendKeepAlive(system: String, timestamp: java.lang.Long): Unit = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
def publishRecording(msg: PublishRecordingMessage): Unit = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
def unpublishRecording(msg: UnpublishRecordingMessage): Unit = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
def deleteRecording(msg: DeleteRecordingMessage): Unit = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
def sendStunTurnInfoReply(msg: SendStunTurnInfoReplyMessage): Unit = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
def sendDocConversionMsg(msg: IDocConversionMsg): Unit = {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
29
bbb-common-web/src/main/scala/org/bigbluebutton/api2/MsgBuilder.scala
Executable file
29
bbb-common-web/src/main/scala/org/bigbluebutton/api2/MsgBuilder.scala
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
package org.bigbluebutton.api2
|
||||||
|
|
||||||
|
import org.bigbluebutton.api2.meeting.RegisterUser
|
||||||
|
import org.bigbluebutton.common2.domain.DefaultProps
|
||||||
|
import org.bigbluebutton.common2.msgs._
|
||||||
|
|
||||||
|
|
||||||
|
object MsgBuilder {
|
||||||
|
def buildCreateMeetingRequestToAkkaApps(props: DefaultProps): BbbCommonEnvCoreMsg = {
|
||||||
|
val routing = collection.immutable.HashMap("sender" -> "bbb-web")
|
||||||
|
val envelope = BbbCoreEnvelope(CreateMeetingReqMsg.NAME, routing)
|
||||||
|
val header = BbbCoreBaseHeader(CreateMeetingReqMsg.NAME)
|
||||||
|
val body = CreateMeetingReqMsgBody(props)
|
||||||
|
val req = CreateMeetingReqMsg(header, body)
|
||||||
|
BbbCommonEnvCoreMsg(envelope, req)
|
||||||
|
}
|
||||||
|
|
||||||
|
def buildRegisterUserRequestToAkkaApps(msg: RegisterUser): BbbCommonEnvCoreMsg = {
|
||||||
|
val routing = collection.immutable.HashMap("sender" -> "bbb-web")
|
||||||
|
val envelope = BbbCoreEnvelope(RegisterUserReqMsg.NAME, routing)
|
||||||
|
val header = BbbCoreHeaderWithMeetingId(RegisterUserReqMsg.NAME, msg.meetingId)
|
||||||
|
val body = RegisterUserReqMsgBody(meetingId = msg.meetingId, intUserId = msg.intUserId,
|
||||||
|
name = msg.name, role = msg.role, extUserId = msg.extUserId, authToken = msg.authToken,
|
||||||
|
avatarURL = msg.avatarURL, guest = msg.guest, authed = msg.authed)
|
||||||
|
val req = RegisterUserReqMsg(header, body)
|
||||||
|
BbbCommonEnvCoreMsg(envelope, req)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -9,6 +9,6 @@ object OldMessageJsonReceiverActor{
|
|||||||
class OldMessageJsonReceiverActor(gw: OldMessageReceivedGW) extends Actor with ActorLogging {
|
class OldMessageJsonReceiverActor(gw: OldMessageReceivedGW) extends Actor with ActorLogging {
|
||||||
|
|
||||||
def receive = {
|
def receive = {
|
||||||
case msg: OldReceivedJsonMessage => gw.handle(msg.pattern, msg.channel, msg.msg)
|
case msg: OldReceivedJsonMessage => //gw.handle(msg.pattern, msg.channel, msg.msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
package org.bigbluebutton.api2.bus
|
package org.bigbluebutton.api2.bus
|
||||||
|
|
||||||
import org.bigbluebutton.api.IReceivedOldMessageHandler
|
import org.bigbluebutton.api.IReceivedOldMessageHandler
|
||||||
|
import org.bigbluebutton.api.messaging.messages.IMessage
|
||||||
|
|
||||||
|
|
||||||
class OldMessageReceivedGW(handler: IReceivedOldMessageHandler) {
|
class OldMessageReceivedGW(handler: IReceivedOldMessageHandler) {
|
||||||
|
|
||||||
def handle(pattern: String, channel: String, msg: String): Unit = {
|
def handle(msg: IMessage): Unit = {
|
||||||
handler.handleMessage(pattern, channel, msg)
|
handler.handleMessage(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,103 @@
|
|||||||
|
package org.bigbluebutton.api2.meeting
|
||||||
|
|
||||||
|
import akka.actor.{Actor, ActorLogging, Props}
|
||||||
|
import org.bigbluebutton.api2.bus.OldMessageReceivedGW
|
||||||
|
import org.bigbluebutton.common2.msgs._
|
||||||
|
|
||||||
|
|
||||||
|
object OldMeetingMsgHdlrActor {
|
||||||
|
def props(olgMsgGW: OldMessageReceivedGW): Props =
|
||||||
|
Props(classOf[OldMeetingMsgHdlrActor], olgMsgGW)
|
||||||
|
}
|
||||||
|
|
||||||
|
class OldMeetingMsgHdlrActor(val olgMsgGW: OldMessageReceivedGW)
|
||||||
|
extends Actor with ActorLogging {
|
||||||
|
|
||||||
|
|
||||||
|
def receive = {
|
||||||
|
case msg: BbbCommonEnvCoreMsg => handleBbbCommonEnvCoreMsg(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
private def handleBbbCommonEnvCoreMsg(msg: BbbCommonEnvCoreMsg): Unit = {
|
||||||
|
msg.core match {
|
||||||
|
case m: MeetingCreatedEvtMsg => handleMeetingCreatedEvtMsg(m)
|
||||||
|
case _ => log.error("***** Cannot handle " + msg.envelope.name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def handleMeetingCreatedEvtMsg(msg: MeetingCreatedEvtMsg): Unit = {
|
||||||
|
// listener.handle(new MeetingStarted(meetingId))
|
||||||
|
}
|
||||||
|
|
||||||
|
def handleMeetingEndedEvtMsg(msg: MeetingEndedEvtMsg): Unit = {
|
||||||
|
// listener.handle(new MeetingEnded(meetingId))
|
||||||
|
}
|
||||||
|
|
||||||
|
def handleMeetingDestroyedEvtMsg(msg: MeetingDestroyedEvtMsg): Unit = {
|
||||||
|
// listener.handle(new MeetingDestroyed(meetingId))
|
||||||
|
}
|
||||||
|
|
||||||
|
// def handleCreateBreakoutRoomSysCmdMsg(msg: CreateBreakoutRoomSysCmdMsg): Unit = {
|
||||||
|
/* listener.handle(new CreateBreakoutRoom(
|
||||||
|
msg.payload.breakoutMeetingId,
|
||||||
|
msg.payload.parentMeetingId,
|
||||||
|
msg.payload.name,
|
||||||
|
msg.payload.sequence,
|
||||||
|
msg.payload.voiceConfId,
|
||||||
|
msg.payload.viewerPassword,
|
||||||
|
msg.payload.moderatorPassword,
|
||||||
|
msg.payload.durationInMinutes,
|
||||||
|
msg.payload.sourcePresentationId,
|
||||||
|
msg.payload.sourcePresentationSlide,
|
||||||
|
msg.payload.record
|
||||||
|
)
|
||||||
|
);
|
||||||
|
*/
|
||||||
|
// }
|
||||||
|
|
||||||
|
// def handleEndBreakoutRoomSysCmdMsg(msg: EndBreakoutRoomSysCmdMsg): Unit = {
|
||||||
|
//listener.handle(new EndBreakoutRoom(msg.payload.meetingId))
|
||||||
|
// }
|
||||||
|
|
||||||
|
// def handlePubSubPongSysRespMsg(msg: PubSubPongSysRespMsg): Unit = {
|
||||||
|
// new KeepAliveReply(m.payload.system, m.payload.timestamp)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// def handleUserJoinedMeetingEvtMsg(msg: UserJoinedMeetingEvtMsg): Unit = {
|
||||||
|
// listener.handle(new UserJoined(meetingId, userid, externuserid, username, role, avatarURL, guest, waitingForAcceptance));
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// def handleUserStausChangedEvtMsg(msg: UserStatusChangedEvtMsg): Unit = {
|
||||||
|
//listener.handle(new UserStatusChanged(meetingId, userid, status, value))
|
||||||
|
// }
|
||||||
|
|
||||||
|
// def handleUserLeftMeetingEvtMsg(msg: UserLeftMeetingEvtMsg): Unit = {
|
||||||
|
// listener.handle(new UserLeft(meetingId, userid))
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserJoinedVoice(meetingId, userid));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserLeftVoice(meetingId, userid));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserListeningOnly(meetingId, userid, listenOnly));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserSharedWebcam(meetingId, userid, stream));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserUnsharedWebcam(meetingId, userid, stream));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new UserRoleChanged(meetingId, userid, role));
|
||||||
|
}
|
||||||
|
for (MessageListener listener : listeners) {
|
||||||
|
listener.handle(new StunTurnInfoRequested(meetingId, requesterId));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
@ -19,42 +19,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:util="http://www.springframework.org/schema/util"
|
xmlns:util="http://www.springframework.org/schema/util"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||||
http://www.springframework.org/schema/util
|
http://www.springframework.org/schema/util
|
||||||
http://www.springframework.org/schema/util/spring-util-2.0.xsd
|
http://www.springframework.org/schema/util/spring-util-2.0.xsd
|
||||||
">
|
">
|
||||||
|
|
||||||
<bean id="redisStorageService" class="org.bigbluebutton.api.messaging.RedisStorageService"
|
|
||||||
init-method="start" destroy-method="stop">
|
|
||||||
<property name="host" value="${redisHost}" />
|
|
||||||
<property name="port" value="${redisPort}" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
<bean id="redisMessageHandler" class="org.bigbluebutton.api.messaging.ReceivedMessageHandler"
|
|
||||||
init-method="start" destroy-method="stop">
|
|
||||||
<property name="messageDistributor"><ref bean="redisMessageDistributor" /></property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="redisMessageDistributor" class="org.bigbluebutton.api.messaging.MessageDistributor">
|
|
||||||
<property name="messageHandler"> <ref local="redisMessageHandler"/> </property>
|
|
||||||
<property name="messageListeners">
|
|
||||||
<set>
|
|
||||||
<ref bean="meetingMessageHandler" />
|
|
||||||
</set>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="meetingMessageHandler" class="org.bigbluebutton.api.messaging.MeetingMessageHandler">
|
|
||||||
<property name="messageListeners">
|
|
||||||
<set>
|
|
||||||
<ref bean="meetingService" />
|
|
||||||
<ref bean="keepAliveService" />
|
|
||||||
</set>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
@ -19,88 +19,91 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
|
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
|
||||||
|
|
||||||
<bean id="documentConversionService" class="org.bigbluebutton.presentation.DocumentConversionServiceImp">
|
|
||||||
<property name="messagingService" ref="messagingService"/>
|
|
||||||
<property name="officeToPdfConversionService" ref="officeToPdfConversionService"/>
|
|
||||||
<property name="pdfToSwfSlidesGenerationService" ref="pdfToSwfSlidesGenerationService"/>
|
|
||||||
<property name="imageToSwfSlidesGenerationService" ref="imageToSwfSlidesGenerationService"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="officeDocumentValidator" class="org.bigbluebutton.presentation.imp.OfficeDocumentValidator"/>
|
|
||||||
|
|
||||||
<bean id="officeToPdfConversionService" class="org.bigbluebutton.presentation.imp.OfficeToPdfConversionService">
|
|
||||||
<property name="officeDocumentValidator" ref="officeDocumentValidator"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="pageExtractor" class="org.bigbluebutton.presentation.imp.PageExtractorImp"/>
|
|
||||||
|
|
||||||
<bean id="png2SwfConverter" class="org.bigbluebutton.presentation.imp.Png2SwfPageConverter">
|
<bean id="documentConversionService" class="org.bigbluebutton.presentation.DocumentConversionServiceImp">
|
||||||
<property name="swfToolsDir" value="${swfToolsDir}"/>
|
<property name="bbbWebApiGWApp" ref="bbbWebApiGWApp"/>
|
||||||
</bean>
|
<property name="officeToPdfConversionService" ref="officeToPdfConversionService"/>
|
||||||
|
<property name="pdfToSwfSlidesGenerationService" ref="pdfToSwfSlidesGenerationService"/>
|
||||||
<bean id="jpg2SwfConverter" class="org.bigbluebutton.presentation.imp.Jpeg2SwfPageConverter">
|
<property name="imageToSwfSlidesGenerationService" ref="imageToSwfSlidesGenerationService"/>
|
||||||
<property name="swfToolsDir" value="${swfToolsDir}"/>
|
</bean>
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="pageCounter" class="org.bigbluebutton.presentation.imp.PdfPageCounter"/>
|
|
||||||
|
|
||||||
<bean id="pageCounterService" class="org.bigbluebutton.presentation.imp.PageCounterService">
|
|
||||||
<property name="pageCounter" ref="pageCounter"/>
|
|
||||||
<property name="maxNumPages" value="${maxNumPages}"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="pdf2SwfPageConverter" class="org.bigbluebutton.presentation.imp.Pdf2SwfPageConverter">
|
|
||||||
<property name="swfToolsDir" value="${swfToolsDir}"/>
|
|
||||||
<property name="fontsDir" value="${fontsDir}"/>
|
|
||||||
<property name="placementsThreshold" value="${placementsThreshold}"/>
|
|
||||||
<property name="defineTextThreshold" value="${defineTextThreshold}"/>
|
|
||||||
<property name="imageTagThreshold" value="${imageTagThreshold}"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="thumbCreator" class="org.bigbluebutton.presentation.imp.ThumbnailCreatorImp">
|
|
||||||
<property name="imageMagickDir" value="${imageMagickDir}"/>
|
|
||||||
<property name="blankThumbnail" value="${BLANK_THUMBNAIL}"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="textFileCreator" class="org.bigbluebutton.presentation.imp.TextFileCreatorImp"/>
|
|
||||||
|
|
||||||
<bean id="svgImageCreator" class="org.bigbluebutton.presentation.imp.SvgImageCreatorImp">
|
<bean id="officeDocumentValidator" class="org.bigbluebutton.presentation.imp.OfficeDocumentValidator"/>
|
||||||
<property name="imageMagickDir" value="${imageMagickDir}"/>
|
|
||||||
</bean>
|
<bean id="officeToPdfConversionService" class="org.bigbluebutton.presentation.imp.OfficeToPdfConversionService">
|
||||||
|
<property name="officeDocumentValidator" ref="officeDocumentValidator"/>
|
||||||
<bean id="generatedSlidesInfoHelper" class="org.bigbluebutton.presentation.GeneratedSlidesInfoHelperImp"/>
|
</bean>
|
||||||
|
|
||||||
<bean id="pdfToSwfSlidesGenerationService" class="org.bigbluebutton.presentation.imp.PdfToSwfSlidesGenerationService">
|
<bean id="pageExtractor" class="org.bigbluebutton.presentation.imp.PageExtractorImp"/>
|
||||||
<constructor-arg index="0" value="${numConversionThreads}"/>
|
|
||||||
<property name="counterService" ref="pageCounterService"/>
|
<bean id="png2SwfConverter" class="org.bigbluebutton.presentation.imp.Png2SwfPageConverter">
|
||||||
<property name="pageConverter" ref="pdf2SwfPageConverter"/>
|
<property name="swfToolsDir" value="${swfToolsDir}"/>
|
||||||
<property name="thumbnailCreator" ref="thumbCreator"/>
|
</bean>
|
||||||
<property name="textFileCreator" ref="textFileCreator"/>
|
|
||||||
<property name="svgImageCreator" ref="svgImageCreator"/>
|
<bean id="jpg2SwfConverter" class="org.bigbluebutton.presentation.imp.Jpeg2SwfPageConverter">
|
||||||
<property name="blankSlide" value="${BLANK_SLIDE}"/>
|
<property name="swfToolsDir" value="${swfToolsDir}"/>
|
||||||
<property name="maxSwfFileSize" value="${MAX_SWF_FILE_SIZE}"/>
|
</bean>
|
||||||
<property name="maxConversionTime" value="${maxConversionTime}"/>
|
|
||||||
<property name="swfSlidesGenerationProgressNotifier" ref="swfSlidesGenerationProgressNotifier"/>
|
<bean id="pageCounter" class="org.bigbluebutton.presentation.imp.PdfPageCounter"/>
|
||||||
<property name="svgImagesRequired" value="${svgImagesRequired}"/>
|
|
||||||
</bean>
|
<bean id="pageCounterService" class="org.bigbluebutton.presentation.imp.PageCounterService">
|
||||||
|
<property name="pageCounter" ref="pageCounter"/>
|
||||||
<bean id="imageToSwfSlidesGenerationService" class="org.bigbluebutton.presentation.imp.ImageToSwfSlidesGenerationService">
|
<property name="maxNumPages" value="${maxNumPages}"/>
|
||||||
<property name="pngPageConverter" ref="png2SwfConverter"/>
|
</bean>
|
||||||
<property name="jpgPageConverter" ref="jpg2SwfConverter"/>
|
|
||||||
<property name="svgImageCreator" ref="svgImageCreator"/>
|
<bean id="pdf2SwfPageConverter" class="org.bigbluebutton.presentation.imp.Pdf2SwfPageConverter">
|
||||||
<property name="thumbnailCreator" ref="thumbCreator"/>
|
<property name="swfToolsDir" value="${swfToolsDir}"/>
|
||||||
<property name="textFileCreator" ref="textFileCreator"/>
|
<property name="fontsDir" value="${fontsDir}"/>
|
||||||
<property name="blankSlide" value="${BLANK_SLIDE}"/>
|
<property name="placementsThreshold" value="${placementsThreshold}"/>
|
||||||
<property name="maxConversionTime" value="${maxConversionTime}"/>
|
<property name="defineTextThreshold" value="${defineTextThreshold}"/>
|
||||||
<property name="swfSlidesGenerationProgressNotifier" ref="swfSlidesGenerationProgressNotifier"/>
|
<property name="imageTagThreshold" value="${imageTagThreshold}"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="swfSlidesGenerationProgressNotifier" class="org.bigbluebutton.presentation.imp.SwfSlidesGenerationProgressNotifier">
|
<bean id="thumbCreator" class="org.bigbluebutton.presentation.imp.ThumbnailCreatorImp">
|
||||||
<property name="messagingService" ref="messagingService"/>
|
<property name="imageMagickDir" value="${imageMagickDir}"/>
|
||||||
<property name="generatedSlidesInfoHelper" ref="generatedSlidesInfoHelper"/>
|
<property name="blankThumbnail" value="${BLANK_THUMBNAIL}"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="textFileCreator" class="org.bigbluebutton.presentation.imp.TextFileCreatorImp"/>
|
||||||
|
|
||||||
|
<bean id="svgImageCreator" class="org.bigbluebutton.presentation.imp.SvgImageCreatorImp">
|
||||||
|
<property name="imageMagickDir" value="${imageMagickDir}"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="generatedSlidesInfoHelper" class="org.bigbluebutton.presentation.GeneratedSlidesInfoHelperImp"/>
|
||||||
|
|
||||||
|
<bean id="pdfToSwfSlidesGenerationService"
|
||||||
|
class="org.bigbluebutton.presentation.imp.PdfToSwfSlidesGenerationService">
|
||||||
|
<constructor-arg index="0" value="${numConversionThreads}"/>
|
||||||
|
<property name="counterService" ref="pageCounterService"/>
|
||||||
|
<property name="pageConverter" ref="pdf2SwfPageConverter"/>
|
||||||
|
<property name="thumbnailCreator" ref="thumbCreator"/>
|
||||||
|
<property name="textFileCreator" ref="textFileCreator"/>
|
||||||
|
<property name="svgImageCreator" ref="svgImageCreator"/>
|
||||||
|
<property name="blankSlide" value="${BLANK_SLIDE}"/>
|
||||||
|
<property name="maxSwfFileSize" value="${MAX_SWF_FILE_SIZE}"/>
|
||||||
|
<property name="maxConversionTime" value="${maxConversionTime}"/>
|
||||||
|
<property name="swfSlidesGenerationProgressNotifier" ref="swfSlidesGenerationProgressNotifier"/>
|
||||||
|
<property name="svgImagesRequired" value="${svgImagesRequired}"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="imageToSwfSlidesGenerationService"
|
||||||
|
class="org.bigbluebutton.presentation.imp.ImageToSwfSlidesGenerationService">
|
||||||
|
<property name="pngPageConverter" ref="png2SwfConverter"/>
|
||||||
|
<property name="jpgPageConverter" ref="jpg2SwfConverter"/>
|
||||||
|
<property name="svgImageCreator" ref="svgImageCreator"/>
|
||||||
|
<property name="thumbnailCreator" ref="thumbCreator"/>
|
||||||
|
<property name="textFileCreator" ref="textFileCreator"/>
|
||||||
|
<property name="blankSlide" value="${BLANK_SLIDE}"/>
|
||||||
|
<property name="maxConversionTime" value="${maxConversionTime}"/>
|
||||||
|
<property name="swfSlidesGenerationProgressNotifier" ref="swfSlidesGenerationProgressNotifier"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="swfSlidesGenerationProgressNotifier"
|
||||||
|
class="org.bigbluebutton.presentation.imp.SwfSlidesGenerationProgressNotifier">
|
||||||
|
<property name="messagingService" ref="bbbWebApiGWApp"/>
|
||||||
|
<property name="generatedSlidesInfoHelper" ref="generatedSlidesInfoHelper"/>
|
||||||
|
</bean>
|
||||||
</beans>
|
</beans>
|
||||||
|
@ -19,99 +19,115 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:util="http://www.springframework.org/schema/util"
|
xmlns:util="http://www.springframework.org/schema/util"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||||
http://www.springframework.org/schema/util
|
http://www.springframework.org/schema/util
|
||||||
http://www.springframework.org/schema/util/spring-util-2.0.xsd">
|
http://www.springframework.org/schema/util/spring-util-2.0.xsd">
|
||||||
|
|
||||||
<bean id="messagingService" class="org.bigbluebutton.api.messaging.RedisMessagingService">
|
|
||||||
<property name="messageSender" ref="messageSender"/>
|
|
||||||
<property name="redisStorageService" ref="redisStorageService"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="messageSender" class="org.bigbluebutton.api.messaging.MessageSender">
|
|
||||||
<property name="gw" ref="bbbWebApiGWApp" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="registeredUserCleanupTimerTask" class="org.bigbluebutton.web.services.RegisteredUserCleanupTimerTask"/>
|
<bean id="registeredUserCleanupTimerTask" class="org.bigbluebutton.web.services.RegisteredUserCleanupTimerTask"/>
|
||||||
|
|
||||||
<bean id="keepAliveService" class="org.bigbluebutton.web.services.KeepAliveService"
|
<bean id="keepAliveService" class="org.bigbluebutton.web.services.KeepAliveService"
|
||||||
init-method="start" destroy-method="stop">
|
init-method="start" destroy-method="stop">
|
||||||
<property name="runEvery" value="${checkBBBServerEvery}"/>
|
<property name="runEvery" value="${checkBBBServerEvery}"/>
|
||||||
<property name="publisherService" ref="messagingService" />
|
<property name="gw" ref="bbbWebApiGWApp"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="meetingService" class="org.bigbluebutton.api.MeetingService" init-method="start" destroy-method="stop">
|
<bean id="meetingService" class="org.bigbluebutton.api.MeetingService" init-method="start" destroy-method="stop">
|
||||||
<property name="messagingService" ref="messagingService"/>
|
<property name="redisStorageService" ref="redisStorageService"/>
|
||||||
<property name="recordingService" ref="recordingService"/>
|
<property name="recordingService" ref="recordingService"/>
|
||||||
<property name="presDownloadService" ref="presDownloadService"/>
|
<property name="presDownloadService" ref="presDownloadService"/>
|
||||||
<property name="paramsProcessorUtil" ref="paramsProcessorUtil"/>
|
<property name="paramsProcessorUtil" ref="paramsProcessorUtil"/>
|
||||||
<property name="stunTurnService" ref="stunTurnService"/>
|
<property name="stunTurnService" ref="stunTurnService"/>
|
||||||
<property name="registeredUserCleanupTimerTask" ref="registeredUserCleanupTimerTask"/>
|
<property name="registeredUserCleanupTimerTask" ref="registeredUserCleanupTimerTask"/>
|
||||||
<property name="gw" ref="bbbWebApiGWApp" />
|
<property name="gw" ref="bbbWebApiGWApp"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="oldMessageReceivedGW" class="org.bigbluebutton.api2.bus.OldMessageReceivedGW">
|
<bean id="oldMessageReceivedGW" class="org.bigbluebutton.api2.bus.OldMessageReceivedGW">
|
||||||
<constructor-arg index="0" ref="redisMessageHandler"/>
|
<constructor-arg index="0" ref="redisMessageHandler"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="bbbWebApiGWApp" class="org.bigbluebutton.api2.BbbWebApiGWApp">
|
<bean id="bbbWebApiGWApp" class="org.bigbluebutton.api2.BbbWebApiGWApp">
|
||||||
<constructor-arg index="0" ref="oldMessageReceivedGW"/>
|
<constructor-arg index="0" ref="oldMessageReceivedGW"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="recordingServiceHelper" class="org.bigbluebutton.api.RecordingServiceHelperImp"/>
|
<bean id="redisStorageService" class="org.bigbluebutton.api.messaging.RedisStorageService"
|
||||||
|
init-method="start" destroy-method="stop">
|
||||||
<bean id="presDownloadService" class="org.bigbluebutton.presentation.PresentationUrlDownloadService" destroy-method="stop">
|
<property name="host" value="${redisHost}"/>
|
||||||
<property name="presentationDir" value="${presentationDir}"/>
|
<property name="port" value="${redisPort}"/>
|
||||||
<property name="presentationBaseURL" value="${presentationBaseURL}"/>
|
</bean>
|
||||||
<property name="pageExtractor" ref="pageExtractor"/>
|
|
||||||
<property name="documentConversionService" ref="documentConversionService"/>
|
|
||||||
<property name="blankPresentation" value="${BLANK_PRESENTATION}"/>
|
<bean id="redisMessageHandler" class="org.bigbluebutton.api.messaging.ReceivedMessageHandler"
|
||||||
</bean>
|
init-method="start" destroy-method="stop">
|
||||||
|
</bean>
|
||||||
<bean id="recordingService" class="org.bigbluebutton.api.RecordingService" >
|
|
||||||
<property name="recordingStatusDir" value="${recordStatusDir}"/>
|
|
||||||
<property name="publishedDir" value="${publishedDir}"/>
|
<bean id="redisMessageDistributor" class="org.bigbluebutton.api.messaging.MessageDistributor">
|
||||||
<property name="unpublishedDir" value="${unpublishedDir}"/>
|
<property name="messageHandler"> <ref local="redisMessageHandler"/> </property>
|
||||||
<property name="recordingServiceHelper" ref="recordingServiceHelper"/>
|
<property name="messageListeners">
|
||||||
<!--property name="messagingService" ref="messagingService"/-->
|
<set>
|
||||||
</bean>
|
<ref bean="meetingService" />
|
||||||
|
<ref bean="keepAliveService" />
|
||||||
<bean id="configServiceHelper" class="org.bigbluebutton.api.ClientConfigServiceHelperImp"/>
|
</set>
|
||||||
|
</property>
|
||||||
<bean id="configService" class="org.bigbluebutton.api.ClientConfigService" init-method="init">
|
</bean>
|
||||||
<property name="configDir" value="${configDir}"/>
|
|
||||||
<property name="clientConfigServiceHelper" ref="configServiceHelper"/>
|
<bean id="recordingServiceHelper" class="org.bigbluebutton.api.RecordingServiceHelperImp"/>
|
||||||
</bean>
|
|
||||||
|
<bean id="presDownloadService" class="org.bigbluebutton.presentation.PresentationUrlDownloadService"
|
||||||
<bean id="paramsProcessorUtil" class="org.bigbluebutton.api.ParamsProcessorUtil">
|
destroy-method="stop">
|
||||||
<property name="apiVersion" value="${apiVersion}"/>
|
<property name="presentationDir" value="${presentationDir}"/>
|
||||||
<property name="serviceEnabled" value="${serviceEnabled}"/>
|
<property name="presentationBaseURL" value="${presentationBaseURL}"/>
|
||||||
<property name="securitySalt" value="${securitySalt}"/>
|
<property name="pageExtractor" ref="pageExtractor"/>
|
||||||
<property name="defaultMaxUsers" value="${defaultMaxUsers}"/>
|
<property name="documentConversionService" ref="documentConversionService"/>
|
||||||
<property name="defaultWelcomeMessage" value="${defaultWelcomeMessage}"/>
|
<property name="blankPresentation" value="${BLANK_PRESENTATION}"/>
|
||||||
<property name="defaultWelcomeMessageFooter" value="${defaultWelcomeMessageFooter}"/>
|
</bean>
|
||||||
<property name="defaultDialAccessNumber" value="${defaultDialAccessNumber}"/>
|
|
||||||
<property name="testVoiceBridge" value="${testVoiceBridge}"/>
|
<bean id="recordingService" class="org.bigbluebutton.api.RecordingService">
|
||||||
<property name="testConferenceMock" value="${testConferenceMock}"/>
|
<property name="recordingStatusDir" value="${recordStatusDir}"/>
|
||||||
<property name="defaultLogoutUrl" value="${bigbluebutton.web.logoutURL}"/>
|
<property name="publishedDir" value="${publishedDir}"/>
|
||||||
<property name="defaultServerUrl" value="${bigbluebutton.web.serverURL}"/>
|
<property name="unpublishedDir" value="${unpublishedDir}"/>
|
||||||
<property name="defaultNumDigitsForTelVoice" value="${defaultNumDigitsForTelVoice}"/>
|
<property name="recordingServiceHelper" ref="recordingServiceHelper"/>
|
||||||
<property name="defaultClientUrl" value="${defaultClientUrl}"/>
|
</bean>
|
||||||
<property name="defaultMeetingDuration" value="${defaultMeetingDuration}"/>
|
|
||||||
<property name="disableRecordingDefault" value="${disableRecordingDefault}"/>
|
<bean id="configServiceHelper" class="org.bigbluebutton.api.ClientConfigServiceHelperImp"/>
|
||||||
<property name="autoStartRecording" value="${autoStartRecording}"/>
|
|
||||||
<property name="allowStartStopRecording" value="${allowStartStopRecording}"/>
|
<bean id="configService" class="org.bigbluebutton.api.ClientConfigService" init-method="init">
|
||||||
<property name="webcamsOnlyForModerator" value="${webcamsOnlyForModerator}"/>
|
<property name="configDir" value="${configDir}"/>
|
||||||
<property name="defaultAvatarURL" value="${defaultAvatarURL}"/>
|
<property name="clientConfigServiceHelper" ref="configServiceHelper"/>
|
||||||
<property name="defaultConfigURL" value="${defaultConfigURL}"/>
|
</bean>
|
||||||
<property name="defaultGuestPolicy" value="${defaultGuestPolicy}"/>
|
|
||||||
</bean>
|
<bean id="paramsProcessorUtil" class="org.bigbluebutton.api.ParamsProcessorUtil">
|
||||||
|
<property name="apiVersion" value="${apiVersion}"/>
|
||||||
<import resource="doc-conversion.xml" />
|
<property name="serviceEnabled" value="${serviceEnabled}"/>
|
||||||
<import resource="bbb-redis-pool.xml" />
|
<property name="securitySalt" value="${securitySalt}"/>
|
||||||
<import resource="bbb-redis-messaging.xml" />
|
<property name="defaultMaxUsers" value="${defaultMaxUsers}"/>
|
||||||
<import resource="turn-stun-servers.xml" />
|
<property name="defaultWelcomeMessage" value="${defaultWelcomeMessage}"/>
|
||||||
|
<property name="defaultWelcomeMessageFooter" value="${defaultWelcomeMessageFooter}"/>
|
||||||
|
<property name="defaultDialAccessNumber" value="${defaultDialAccessNumber}"/>
|
||||||
|
<property name="testVoiceBridge" value="${testVoiceBridge}"/>
|
||||||
|
<property name="testConferenceMock" value="${testConferenceMock}"/>
|
||||||
|
<property name="defaultLogoutUrl" value="${bigbluebutton.web.logoutURL}"/>
|
||||||
|
<property name="defaultServerUrl" value="${bigbluebutton.web.serverURL}"/>
|
||||||
|
<property name="defaultNumDigitsForTelVoice" value="${defaultNumDigitsForTelVoice}"/>
|
||||||
|
<property name="defaultClientUrl" value="${defaultClientUrl}"/>
|
||||||
|
<property name="defaultMeetingDuration" value="${defaultMeetingDuration}"/>
|
||||||
|
<property name="disableRecordingDefault" value="${disableRecordingDefault}"/>
|
||||||
|
<property name="autoStartRecording" value="${autoStartRecording}"/>
|
||||||
|
<property name="allowStartStopRecording" value="${allowStartStopRecording}"/>
|
||||||
|
<property name="webcamsOnlyForModerator" value="${webcamsOnlyForModerator}"/>
|
||||||
|
<property name="defaultAvatarURL" value="${defaultAvatarURL}"/>
|
||||||
|
<property name="defaultConfigURL" value="${defaultConfigURL}"/>
|
||||||
|
<property name="defaultGuestPolicy" value="${defaultGuestPolicy}"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<import resource="doc-conversion.xml"/>
|
||||||
|
<import resource="bbb-redis-pool.xml"/>
|
||||||
|
<!--
|
||||||
|
<import resource="bbb-redis-messaging.xml"/>
|
||||||
|
-->
|
||||||
|
<import resource="turn-stun-servers.xml"/>
|
||||||
</beans>
|
</beans>
|
||||||
|
Loading…
Reference in New Issue
Block a user