- start fixing breakout rooms

This commit is contained in:
Richard Alam 2017-07-21 14:15:51 -07:00
parent d1cc692791
commit 47f012f08f
17 changed files with 149 additions and 168 deletions

View File

@ -22,11 +22,51 @@ case class KeepAliveMessage(aliveID: String) extends InMessage
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
case class MonitorNumberOfUsersInternalMsg(meetingID: String) extends InMessage case class MonitorNumberOfUsersInternalMsg(meetingID: String) extends InMessage
case class SendTimeRemainingUpdate(meetingId: String) extends InMessage
/**
* Audit message sent to meeting to trigger updating clients of meeting time remaining.
* @param meetingId
*/
case class SendTimeRemainingAuditInternalMsg(meetingId: String) extends InMessage
case class ExtendMeetingDuration(meetingId: String, userId: String) extends InMessage case class ExtendMeetingDuration(meetingId: String, userId: String) extends InMessage
case class DestroyMeetingInternalMsg(meetingId: String) extends InMessage case class DestroyMeetingInternalMsg(meetingId: String) extends InMessage
/**
* Sent by breakout room to parent meeting the breakout had ended.
* @param meetingId
*/
case class BreakoutRoomEndedInternalMsg(meetingId: String) extends InMessage case class BreakoutRoomEndedInternalMsg(meetingId: String) extends InMessage
/**
* Sent by breakout room to parent meeting that breakout room has been created.
* @param parentId
* @param breakoutId
*/
case class BreakoutRoomCreatedInternalMsg(parentId: String, breakoutId: String) extends InMessage
/**
* Audit message to trigger breakout room to update parent meeting of list of users.
* @param parentId
* @param breakoutId
*/
case class SendBreakoutUsersAuditInternalMsg(parentId: String, breakoutId: String) extends InMessage
/**
* Send by breakout room to parent meeting with list of users in breakout room.
* @param parentId
* @param breakoutId
* @param users
*/
case class BreakoutRoomUsersUpdateInternalMsg(parentId: String, breakoutId: String, users: Vector[BreakoutUserVO]) extends InMessage
/**
* Sent by parent meeting to breakout room to end breakout room.
* @param parentId
* @param breakoutId
*/
case class EndBreakoutRoomInternalMsg(parentId: String, breakoutId: String) extends InMessage
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// Meeting // Meeting
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@ -8,14 +8,15 @@ import scala.collection.mutable
import org.apache.commons.codec.digest.DigestUtils import org.apache.commons.codec.digest.DigestUtils
trait BreakoutApp2x extends BreakoutRoomCreatedMsgHdlr trait BreakoutApp2x extends BreakoutRoomCreatedMsgHdlr
with BreakoutRoomEndedMsgHdlr
with BreakoutRoomsListMsgHdlr with BreakoutRoomsListMsgHdlr
with BreakoutRoomUsersUpdateMsgHdlr with BreakoutRoomUsersUpdateMsgHdlr
with CreateBreakoutRoomsCmdMsgHdlr with CreateBreakoutRoomsCmdMsgHdlr
with EndAllBreakoutRoomsMsgHdlr with EndAllBreakoutRoomsMsgHdlr
with RequestBreakoutJoinURLReqMsgHdlr with RequestBreakoutJoinURLReqMsgHdlr
with SendBreakoutUsersUpdateMsgHdlr with SendBreakoutUsersUpdateMsgHdlr
with TransferUserToMeetingRequestHdlr { with TransferUserToMeetingRequestHdlr
with EndBreakoutRoomInternalMsgHdlr
with BreakoutRoomEndedInternalMsgHdlr {
this: MeetingActor => this: MeetingActor =>

View File

@ -3,6 +3,7 @@ package org.bigbluebutton.core.apps.breakout
import org.bigbluebutton.SystemConfiguration import org.bigbluebutton.SystemConfiguration
import org.bigbluebutton.common2.msgs._ import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.OutMessageGateway import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.BreakoutRoomCreatedInternalMsg
import org.bigbluebutton.core.models.{ BreakoutRooms, Users2x } import org.bigbluebutton.core.models.{ BreakoutRooms, Users2x }
import org.bigbluebutton.core.running.{ BaseMeetingActor, LiveMeeting, MeetingActor } import org.bigbluebutton.core.running.{ BaseMeetingActor, LiveMeeting, MeetingActor }
@ -12,10 +13,10 @@ trait BreakoutRoomCreatedMsgHdlr extends SystemConfiguration {
val liveMeeting: LiveMeeting val liveMeeting: LiveMeeting
val outGW: OutMessageGateway val outGW: OutMessageGateway
def handleBreakoutRoomCreatedMsg(msg: BreakoutRoomCreatedMsg): Unit = { def handleBreakoutRoomCreatedInternalMsg(msg: BreakoutRoomCreatedInternalMsg): Unit = {
liveMeeting.breakoutRooms.pendingRoomsNumber -= 1 liveMeeting.breakoutRooms.pendingRoomsNumber -= 1
val room = BreakoutRooms.getBreakoutRoom(liveMeeting.breakoutRooms, msg.body.breakoutRoomId) val room = BreakoutRooms.getBreakoutRoom(liveMeeting.breakoutRooms, msg.breakoutId)
room foreach { room => room foreach { room =>
sendBreakoutRoomStarted(room.parentRoomId, room.name, room.externalMeetingId, room.id, room.sequence, room.voiceConfId) sendBreakoutRoomStarted(room.parentRoomId, room.name, room.externalMeetingId, room.id, room.sequence, room.voiceConfId)
} }

View File

@ -1,22 +1,21 @@
package org.bigbluebutton.core.apps.breakout package org.bigbluebutton.core.apps.breakout
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.OutMessageGateway import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.BreakoutRoomEndedInternalMsg
import org.bigbluebutton.core.models.BreakoutRooms import org.bigbluebutton.core.models.BreakoutRooms
import org.bigbluebutton.core.running.MeetingActor import org.bigbluebutton.core.running.MeetingActor
import org.bigbluebutton.core2.message.senders.MsgBuilder import org.bigbluebutton.core2.message.senders.MsgBuilder
trait BreakoutRoomEndedMsgHdlr { trait BreakoutRoomEndedInternalMsgHdlr {
this: MeetingActor => this: MeetingActor =>
val outGW: OutMessageGateway val outGW: OutMessageGateway
def handleBreakoutRoomEndedMsg(msg: BreakoutRoomEndedMsg): Unit = { def handleBreakoutRoomEndedInternalMsg(msg: BreakoutRoomEndedInternalMsg): Unit = {
// send out BreakoutRoomEndedEvtMsg to inform clients the breakout has ended // send out BreakoutRoomEndedEvtMsg to inform clients the breakout has ended
outGW.send(MsgBuilder.buildBreakoutRoomEndedEvtMsg(liveMeeting.props.meetingProp.intId, msg.header.userId, outGW.send(MsgBuilder.buildBreakoutRoomEndedEvtMsg(liveMeeting.props.meetingProp.intId, "not-used",
msg.body.breakoutRoomId)) msg.meetingId))
BreakoutRooms.removeRoom(liveMeeting.breakoutRooms, msg.body.breakoutRoomId) BreakoutRooms.removeRoom(liveMeeting.breakoutRooms, msg.meetingId)
} }
} }

View File

@ -2,6 +2,7 @@ package org.bigbluebutton.core.apps.breakout
import org.bigbluebutton.common2.msgs._ import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.OutMessageGateway import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.BreakoutRoomUsersUpdateInternalMsg
import org.bigbluebutton.core.models.BreakoutRooms import org.bigbluebutton.core.models.BreakoutRooms
import org.bigbluebutton.core.running.MeetingActor import org.bigbluebutton.core.running.MeetingActor
@ -10,16 +11,16 @@ trait BreakoutRoomUsersUpdateMsgHdlr {
val outGW: OutMessageGateway val outGW: OutMessageGateway
def handleBreakoutRoomUsersUpdateMsg(msg: BreakoutRoomUsersUpdateMsg): Unit = { def handleBreakoutRoomUsersUpdateInternalMsg(msg: BreakoutRoomUsersUpdateInternalMsg): Unit = {
def broadcastEvent(msg: BreakoutRoomUsersUpdateMsg): Unit = { def broadcastEvent(msg: BreakoutRoomUsersUpdateInternalMsg): Unit = {
BreakoutRooms.updateBreakoutUsers(liveMeeting.breakoutRooms, msg.body.breakoutMeetingId, msg.body.users) foreach { room => BreakoutRooms.updateBreakoutUsers(liveMeeting.breakoutRooms, msg.breakoutId, msg.users) foreach { room =>
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, msg.header.userId) val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, "not-used")
val envelope = BbbCoreEnvelope(UpdateBreakoutUsersEvtMsg.NAME, routing) val envelope = BbbCoreEnvelope(UpdateBreakoutUsersEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(UpdateBreakoutUsersEvtMsg.NAME, props.meetingProp.intId, msg.header.userId) val header = BbbClientMsgHeader(UpdateBreakoutUsersEvtMsg.NAME, props.meetingProp.intId, "not-used")
val body = UpdateBreakoutUsersEvtMsgBody(props.meetingProp.intId, msg.body.breakoutMeetingId, room.users) val body = UpdateBreakoutUsersEvtMsgBody(props.meetingProp.intId, msg.breakoutId, room.users)
val event = UpdateBreakoutUsersEvtMsg(header, body) val event = UpdateBreakoutUsersEvtMsg(header, body)
val msgEvent = BbbCommonEnvCoreMsg(envelope, event) val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
outGW.send(msgEvent) outGW.send(msgEvent)

View File

@ -2,6 +2,8 @@ package org.bigbluebutton.core.apps.breakout
import org.bigbluebutton.common2.msgs._ import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.OutMessageGateway import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.EndBreakoutRoomInternalMsg
import org.bigbluebutton.core.bus.BigBlueButtonEvent
import org.bigbluebutton.core.models.BreakoutRooms import org.bigbluebutton.core.models.BreakoutRooms
import org.bigbluebutton.core.running.MeetingActor import org.bigbluebutton.core.running.MeetingActor
@ -11,23 +13,11 @@ trait EndAllBreakoutRoomsMsgHdlr {
val outGW: OutMessageGateway val outGW: OutMessageGateway
def handleEndAllBreakoutRoomsMsg(msg: EndAllBreakoutRoomsMsg): Unit = { def handleEndAllBreakoutRoomsMsg(msg: EndAllBreakoutRoomsMsg): Unit = {
def broadcastEvent(msg: EndAllBreakoutRoomsMsg): Unit = {
log.info("EndAllBreakoutRooms event received for meetingId={}", props.meetingProp.intId)
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, msg.header.userId)
val envelope = BbbCoreEnvelope(EndBreakoutRoomEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(EndBreakoutRoomEvtMsg.NAME, props.meetingProp.intId, msg.header.userId)
BreakoutRooms.getRooms(liveMeeting.breakoutRooms).foreach { room => BreakoutRooms.getRooms(liveMeeting.breakoutRooms).foreach { room =>
val body = EndBreakoutRoomEvtMsgBody(room.id) eventBus.publish(BigBlueButtonEvent(
val event = EndBreakoutRoomEvtMsg(header, body) room.id,
val msgEvent = BbbCommonEnvCoreMsg(envelope, event) EndBreakoutRoomInternalMsg(props.breakoutProps.parentId, room.id)
outGW.send(msgEvent) ))
} }
} }
broadcastEvent(msg)
}
} }

View File

@ -0,0 +1,19 @@
package org.bigbluebutton.core.apps.breakout
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.EndBreakoutRoomInternalMsg
import org.bigbluebutton.core.bus.IncomingEventBus
import org.bigbluebutton.core.domain.MeetingEndReason
import org.bigbluebutton.core.running.{ BaseMeetingActor, HandlerHelpers, LiveMeeting }
trait EndBreakoutRoomInternalMsgHdlr extends HandlerHelpers {
this: BaseMeetingActor =>
val liveMeeting: LiveMeeting
val outGW: OutMessageGateway
val eventBus: IncomingEventBus
def handleEndBreakoutRoomInternalMsg(msg: EndBreakoutRoomInternalMsg): Unit = {
sendEndMeetingDueToExpiry(MeetingEndReason.ENDED_BY_PARENT, eventBus, outGW, liveMeeting)
}
}

View File

@ -1,7 +1,9 @@
package org.bigbluebutton.core.apps.breakout package org.bigbluebutton.core.apps.breakout
import org.bigbluebutton.common2.msgs.{ BreakoutUserVO, SendBreakoutUsersUpdateMsg } import org.bigbluebutton.common2.msgs.BreakoutUserVO
import org.bigbluebutton.core.OutMessageGateway import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.{ BreakoutRoomUsersUpdateInternalMsg, SendBreakoutUsersAuditInternalMsg }
import org.bigbluebutton.core.bus.BigBlueButtonEvent
import org.bigbluebutton.core.models.Users2x import org.bigbluebutton.core.models.Users2x
import org.bigbluebutton.core.running.MeetingActor import org.bigbluebutton.core.running.MeetingActor
@ -10,13 +12,14 @@ trait SendBreakoutUsersUpdateMsgHdlr {
val outGW: OutMessageGateway val outGW: OutMessageGateway
def handleSendBreakoutUsersUpdateMsg(msg: SendBreakoutUsersUpdateMsg): Unit = { def handleSendBreakoutUsersUpdateInternalMsg(msg: SendBreakoutUsersAuditInternalMsg): Unit = {
val users = Users2x.findAll(liveMeeting.users2x) val users = Users2x.findAll(liveMeeting.users2x)
val breakoutUsers = users map { u => new BreakoutUserVO(u.extId, u.name) } val breakoutUsers = users map { u => new BreakoutUserVO(u.extId, u.name) }
/** TODO Need to figure out how to do this in a 2.0 way */
log.error("**** SendBreakoutUsersUpdateMsgHdlr isn't finished and needs a new part *****") eventBus.publish(BigBlueButtonEvent(
//eventBus.publish(BigBlueButtonEvent(props.breakoutProps.parentId, props.breakoutProps.parentId,
// new BreakoutRoomUsersUpdate(props.breakoutProps.parentId, props.meetingProp.intId, breakoutUsers))) new BreakoutRoomUsersUpdateInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId, breakoutUsers)
))
} }
} }

View File

@ -16,4 +16,5 @@ object MeetingEndReason {
val ENDED_WHEN_LAST_USER_LEFT = "ENDED_WHEN_LAST_USER_LEFT" val ENDED_WHEN_LAST_USER_LEFT = "ENDED_WHEN_LAST_USER_LEFT"
val ENDED_AFTER_USER_LOGGED_OUT = "ENDED_AFTER_USER_LOGGED_OUT" val ENDED_AFTER_USER_LOGGED_OUT = "ENDED_AFTER_USER_LOGGED_OUT"
val ENDED_AFTER_EXCEEDING_DURATION = "ENDED_AFTER_USER_LOGGED_OUT" val ENDED_AFTER_EXCEEDING_DURATION = "ENDED_AFTER_USER_LOGGED_OUT"
val ENDED_BY_PARENT = "ENDED_BY_PARENT"
} }

View File

@ -130,59 +130,15 @@ class ReceivedJsonMsgHandlerActor(
// Breakout rooms // Breakout rooms
case BreakoutRoomsListMsg.NAME => case BreakoutRoomsListMsg.NAME =>
for { routeGenericMsg[BreakoutRoomsListMsg](envelope, jsonNode)
m <- deserialize[BreakoutRoomsListMsg](jsonNode)
} yield {
send(m.header.meetingId, envelope, m)
}
case CreateBreakoutRoomsCmdMsg.NAME => case CreateBreakoutRoomsCmdMsg.NAME =>
for { routeGenericMsg[CreateBreakoutRoomsCmdMsg](envelope, jsonNode)
m <- deserialize[CreateBreakoutRoomsCmdMsg](jsonNode)
} yield {
send(m.header.meetingId, envelope, m)
}
case RequestBreakoutJoinURLReqMsg.NAME => case RequestBreakoutJoinURLReqMsg.NAME =>
for { routeGenericMsg[RequestBreakoutJoinURLReqMsg](envelope, jsonNode)
m <- deserialize[RequestBreakoutJoinURLReqMsg](jsonNode)
} yield {
send(m.header.meetingId, envelope, m)
}
case BreakoutRoomCreatedMsg.NAME =>
for {
m <- deserialize[BreakoutRoomCreatedMsg](jsonNode)
} yield {
send(m.header.meetingId, envelope, m)
}
case BreakoutRoomUsersUpdateMsg.NAME =>
for {
m <- deserialize[BreakoutRoomUsersUpdateMsg](jsonNode)
} yield {
send(m.header.meetingId, envelope, m)
}
case SendBreakoutUsersUpdateMsg.NAME =>
for {
m <- deserialize[SendBreakoutUsersUpdateMsg](jsonNode)
} yield {
send(m.header.meetingId, envelope, m)
}
case EndAllBreakoutRoomsMsg.NAME => case EndAllBreakoutRoomsMsg.NAME =>
for { routeGenericMsg[EndAllBreakoutRoomsMsg](envelope, jsonNode)
m <- deserialize[EndAllBreakoutRoomsMsg](jsonNode)
} yield {
send(m.header.meetingId, envelope, m)
}
case BreakoutRoomEndedMsg.NAME =>
for {
m <- deserialize[BreakoutRoomEndedMsg](jsonNode)
} yield {
send(m.header.meetingId, envelope, m)
}
case TransferUserToMeetingRequestMsg.NAME => case TransferUserToMeetingRequestMsg.NAME =>
for { routeGenericMsg[TransferUserToMeetingRequestMsg](envelope, jsonNode)
m <- deserialize[TransferUserToMeetingRequestMsg](jsonNode)
} yield {
send(m.header.meetingId, envelope, m)
}
// Layout // Layout
case GetCurrentLayoutReqMsg.NAME => case GetCurrentLayoutReqMsg.NAME =>

View File

@ -146,12 +146,17 @@ class MeetingActor(
//====================================== //======================================
//======================================= //=======================================
// old messages // internal messages
case msg: MonitorNumberOfUsersInternalMsg => handleMonitorNumberOfUsers(msg) case msg: MonitorNumberOfUsersInternalMsg => handleMonitorNumberOfUsers(msg)
case msg: AllowUserToShareDesktop => handleAllowUserToShareDesktop(msg) case msg: AllowUserToShareDesktop => handleAllowUserToShareDesktop(msg)
case msg: ExtendMeetingDuration => handleExtendMeetingDuration(msg) case msg: ExtendMeetingDuration => handleExtendMeetingDuration(msg)
case msg: SendTimeRemainingUpdate => state = handleSendTimeRemainingUpdate(msg, state) case msg: SendTimeRemainingAuditInternalMsg => state = handleSendTimeRemainingUpdate(msg, state)
case msg: BreakoutRoomCreatedInternalMsg => handleBreakoutRoomCreatedInternalMsg(msg)
case msg: SendBreakoutUsersAuditInternalMsg => handleSendBreakoutUsersUpdateInternalMsg(msg)
case msg: BreakoutRoomUsersUpdateInternalMsg => handleBreakoutRoomUsersUpdateInternalMsg(msg)
case msg: EndBreakoutRoomInternalMsg => handleEndBreakoutRoomInternalMsg(msg)
case msg: BreakoutRoomEndedInternalMsg => handleBreakoutRoomEndedInternalMsg(msg)
// Screenshare // Screenshare
case msg: DeskShareGetDeskShareInfoRequest => handleDeskShareGetDeskShareInfoRequest(msg) case msg: DeskShareGetDeskShareInfoRequest => handleDeskShareGetDeskShareInfoRequest(msg)
@ -205,10 +210,7 @@ class MeetingActor(
case m: CreateBreakoutRoomsCmdMsg => handleCreateBreakoutRoomsCmdMsg(m) case m: CreateBreakoutRoomsCmdMsg => handleCreateBreakoutRoomsCmdMsg(m)
case m: EndAllBreakoutRoomsMsg => handleEndAllBreakoutRoomsMsg(m) case m: EndAllBreakoutRoomsMsg => handleEndAllBreakoutRoomsMsg(m)
case m: RequestBreakoutJoinURLReqMsg => handleRequestBreakoutJoinURLReqMsg(m) case m: RequestBreakoutJoinURLReqMsg => handleRequestBreakoutJoinURLReqMsg(m)
case m: BreakoutRoomCreatedMsg => handleBreakoutRoomCreatedMsg(m)
case m: BreakoutRoomEndedMsg => handleBreakoutRoomEndedMsg(m)
case m: BreakoutRoomUsersUpdateMsg => handleBreakoutRoomUsersUpdateMsg(m)
case m: SendBreakoutUsersUpdateMsg => handleSendBreakoutUsersUpdateMsg(m)
case m: TransferUserToMeetingRequestMsg => handleTransferUserToMeetingRequestMsg(m) case m: TransferUserToMeetingRequestMsg => handleTransferUserToMeetingRequestMsg(m)
// Voice // Voice

View File

@ -55,12 +55,11 @@ class MeetingActorAudit(
if (props.meetingProp.isBreakout) { if (props.meetingProp.isBreakout) {
// This is a breakout room. Inform our parent meeting that we have been successfully created. // This is a breakout room. Inform our parent meeting that we have been successfully created.
/**TODO Need to add a 2.0 notification somehow */ eventBus.publish(BigBlueButtonEvent(
log.error("****** MeetingActorInternal still needs to be fixed with 2.0 breakout messages ******")
/*eventBus.publish(BigBlueButtonEvent(
props.breakoutProps.parentId, props.breakoutProps.parentId,
BreakoutRoomCreated(props.breakoutProps.parentId, props.meetingProp.intId))) BreakoutRoomCreatedInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId)
*/ ))
} }
def receive = { def receive = {
@ -75,15 +74,15 @@ class MeetingActorAudit(
eventBus.publish(BigBlueButtonEvent(props.meetingProp.intId, MonitorNumberOfUsersInternalMsg(props.meetingProp.intId))) eventBus.publish(BigBlueButtonEvent(props.meetingProp.intId, MonitorNumberOfUsersInternalMsg(props.meetingProp.intId)))
// Trigger updating users of time remaining on meeting. // Trigger updating users of time remaining on meeting.
eventBus.publish(BigBlueButtonEvent(props.meetingProp.intId, SendTimeRemainingUpdate(props.meetingProp.intId))) eventBus.publish(BigBlueButtonEvent(props.meetingProp.intId, SendTimeRemainingAuditInternalMsg(props.meetingProp.intId)))
if (props.meetingProp.isBreakout) { if (props.meetingProp.isBreakout) {
/**TODO Need to add a 2.0 notification somehow */
log.error("******* MeetingActorInternal still needs to be fixed with 2.0 breakout messages *******")
// This is a breakout room. Update the main meeting with list of users in this breakout room. // This is a breakout room. Update the main meeting with list of users in this breakout room.
//eventBus.publish(BigBlueButtonEvent(props.meetingProp.intId, SendBreakoutUsersUpdate(props.meetingProp.intId))) eventBus.publish(BigBlueButtonEvent(
props.meetingProp.intId,
SendBreakoutUsersAuditInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId)
))
} }
} }
} }

View File

@ -2,7 +2,7 @@ package org.bigbluebutton.core2.message.handlers
import org.bigbluebutton.common2.msgs._ import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.OutMessageGateway import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.SendTimeRemainingUpdate import org.bigbluebutton.core.api.SendTimeRemainingAuditInternalMsg
import org.bigbluebutton.core.domain.{ MeetingExpiryTracker, MeetingState2x } import org.bigbluebutton.core.domain.{ MeetingExpiryTracker, MeetingState2x }
import org.bigbluebutton.core.models.BreakoutRooms import org.bigbluebutton.core.models.BreakoutRooms
import org.bigbluebutton.core.running.{ BaseMeetingActor, LiveMeeting } import org.bigbluebutton.core.running.{ BaseMeetingActor, LiveMeeting }
@ -14,7 +14,7 @@ trait SendTimeRemainingUpdateHdlr {
val liveMeeting: LiveMeeting val liveMeeting: LiveMeeting
val outGW: OutMessageGateway val outGW: OutMessageGateway
def handleSendTimeRemainingUpdate(msg: SendTimeRemainingUpdate, state: MeetingState2x): MeetingState2x = { def handleSendTimeRemainingUpdate(msg: SendTimeRemainingAuditInternalMsg, state: MeetingState2x): MeetingState2x = {
if (liveMeeting.props.durationProps.duration > 0) { if (liveMeeting.props.durationProps.duration > 0) {
val endMeetingTime = MeetingExpiryTracker.endMeetingTime(state) val endMeetingTime = MeetingExpiryTracker.endMeetingTime(state)

View File

@ -1,18 +1,10 @@
package org.bigbluebutton.common2.msgs package org.bigbluebutton.common2.msgs
object BreakoutRoomCreatedMsg { val NAME = "BreakoutRoomCreatedMsg" }
case class BreakoutRoomCreatedMsg(header: BbbClientMsgHeader, body: BreakoutRoomCreatedMsgBody) extends BbbCoreMsg
case class BreakoutRoomCreatedMsgBody(meetingId: String, breakoutRoomId: String)
object BreakoutRoomEndedEvtMsg { val NAME = "BreakoutRoomEndedEvtMsg" } object BreakoutRoomEndedEvtMsg { val NAME = "BreakoutRoomEndedEvtMsg" }
case class BreakoutRoomEndedEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomEndedEvtMsgBody) extends BbbCoreMsg case class BreakoutRoomEndedEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomEndedEvtMsgBody) extends BbbCoreMsg
case class BreakoutRoomEndedEvtMsgBody(parentMeetingId: String, meetingId: String) case class BreakoutRoomEndedEvtMsgBody(parentMeetingId: String, meetingId: String)
// Sent by breakout actor to tell meeting actor that breakout room has been ended
object BreakoutRoomEndedMsg { val NAME = "BreakoutRoomEndedMsg" }
case class BreakoutRoomEndedMsg(header: BbbClientMsgHeader, body: BreakoutRoomEndedMsgBody) extends BbbCoreMsg
case class BreakoutRoomEndedMsgBody(meetingId: String, breakoutRoomId: String)
object BreakoutRoomJoinURLEvtMsg { val NAME = "BreakoutRoomJoinURLEvtMsg" } object BreakoutRoomJoinURLEvtMsg { val NAME = "BreakoutRoomJoinURLEvtMsg" }
case class BreakoutRoomJoinURLEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomJoinURLEvtMsgBody) extends BbbCoreMsg case class BreakoutRoomJoinURLEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomJoinURLEvtMsgBody) extends BbbCoreMsg
case class BreakoutRoomJoinURLEvtMsgBody(parentMeetingId: String, breakoutMeetingId: String, case class BreakoutRoomJoinURLEvtMsgBody(parentMeetingId: String, breakoutMeetingId: String,
@ -25,7 +17,7 @@ package org.bigbluebutton.common2.msgs
case class BreakoutRoomInfo(name: String, externalMeetingId: String, meetingId: String, sequence: Int) case class BreakoutRoomInfo(name: String, externalMeetingId: String, meetingId: String, sequence: Int)
object BreakoutRoomsListMsg { val NAME = "BreakoutRoomsListMsg" } object BreakoutRoomsListMsg { val NAME = "BreakoutRoomsListMsg" }
case class BreakoutRoomsListMsg(header: BbbClientMsgHeader, body: BreakoutRoomsListMsgBody) extends BbbCoreMsg case class BreakoutRoomsListMsg(header: BbbClientMsgHeader, body: BreakoutRoomsListMsgBody) extends StandardMsg
case class BreakoutRoomsListMsgBody(meetingId: String) case class BreakoutRoomsListMsgBody(meetingId: String)
/** /**
@ -40,12 +32,6 @@ package org.bigbluebutton.common2.msgs
body: BreakoutRoomsTimeRemainingUpdateEvtMsgBody) extends BbbCoreMsg body: BreakoutRoomsTimeRemainingUpdateEvtMsgBody) extends BbbCoreMsg
case class BreakoutRoomsTimeRemainingUpdateEvtMsgBody(timeRemaining: Long) case class BreakoutRoomsTimeRemainingUpdateEvtMsgBody(timeRemaining: Long)
// Sent by breakout actor to tell meeting actor the list of users in the breakout room.
object BreakoutRoomUsersUpdateMsg { val NAME = "BreakoutRoomUsersUpdateMsg" }
case class BreakoutRoomUsersUpdateMsg(header: BbbClientMsgHeader, body: BreakoutRoomUsersUpdateMsgBody) extends BbbCoreMsg
case class BreakoutRoomUsersUpdateMsgBody(meetingId: String, breakoutMeetingId: String, users: Vector[BreakoutUserVO])
/** /**
* Sent to bbb-web to create breakout rooms. * Sent to bbb-web to create breakout rooms.
*/ */
@ -61,24 +47,20 @@ package org.bigbluebutton.common2.msgs
* Sent by client to request to create breakout rooms. * Sent by client to request to create breakout rooms.
*/ */
object CreateBreakoutRoomsCmdMsg { val NAME = "CreateBreakoutRoomsCmdMsg" } object CreateBreakoutRoomsCmdMsg { val NAME = "CreateBreakoutRoomsCmdMsg" }
case class CreateBreakoutRoomsCmdMsg(header: BbbClientMsgHeader, body: CreateBreakoutRoomsCmdMsgBody) extends BbbCoreMsg case class CreateBreakoutRoomsCmdMsg(header: BbbClientMsgHeader, body: CreateBreakoutRoomsCmdMsgBody) extends StandardMsg
case class CreateBreakoutRoomsCmdMsgBody(meetingId: String, durationInMinutes: Int, record: Boolean, rooms: Vector[BreakoutRoomMsgBody]) case class CreateBreakoutRoomsCmdMsgBody(meetingId: String, durationInMinutes: Int, record: Boolean, rooms: Vector[BreakoutRoomMsgBody])
case class BreakoutRoomMsgBody(name: String, sequence: Int, users: Vector[String]) case class BreakoutRoomMsgBody(name: String, sequence: Int, users: Vector[String])
// Sent by user to request ending all the breakout rooms // Sent by user to request ending all the breakout rooms
object EndAllBreakoutRoomsMsg { val NAME = "EndAllBreakoutRoomsMsg" } object EndAllBreakoutRoomsMsg { val NAME = "EndAllBreakoutRoomsMsg" }
case class EndAllBreakoutRoomsMsg(header: BbbClientMsgHeader, body: EndAllBreakoutRoomsMsgBody) extends BbbCoreMsg case class EndAllBreakoutRoomsMsg(header: BbbClientMsgHeader, body: EndAllBreakoutRoomsMsgBody) extends StandardMsg
case class EndAllBreakoutRoomsMsgBody(meetingId: String) case class EndAllBreakoutRoomsMsgBody(meetingId: String)
object EndBreakoutRoomEvtMsg { val NAME = "EndBreakoutRoomEvtMsg" }
case class EndBreakoutRoomEvtMsg(header: BbbClientMsgHeader, body: EndBreakoutRoomEvtMsgBody) extends BbbCoreMsg
case class EndBreakoutRoomEvtMsgBody(breakoutMeetingId: String)
/** /**
* Sent by client to request a join URL for the breakout room. * Sent by client to request a join URL for the breakout room.
*/ */
object RequestBreakoutJoinURLReqMsg { val NAME = "RequestBreakoutJoinURLReqMsg" } object RequestBreakoutJoinURLReqMsg { val NAME = "RequestBreakoutJoinURLReqMsg" }
case class RequestBreakoutJoinURLReqMsg(header: BbbClientMsgHeader, body: RequestBreakoutJoinURLReqMsgBody) extends BbbCoreMsg case class RequestBreakoutJoinURLReqMsg(header: BbbClientMsgHeader, body: RequestBreakoutJoinURLReqMsgBody) extends StandardMsg
case class RequestBreakoutJoinURLReqMsgBody(meetingId: String, breakoutMeetingId: String, userId: String) case class RequestBreakoutJoinURLReqMsgBody(meetingId: String, breakoutMeetingId: String, userId: String)
/** /**
@ -89,10 +71,6 @@ case class RequestBreakoutJoinURLRespMsg(header: BbbClientMsgHeader, body: Reque
case class RequestBreakoutJoinURLRespMsgBody(parentMeetingId: String, breakoutMeetingId: String, case class RequestBreakoutJoinURLRespMsgBody(parentMeetingId: String, breakoutMeetingId: String,
userId: String, redirectJoinURL: String, noRedirectJoinURL: String) userId: String, redirectJoinURL: String, noRedirectJoinURL: String)
// Send by internal actor to tell the breakout actor to send it's list of users to the main meeting actor.
object SendBreakoutUsersUpdateMsg { val NAME = "SendBreakoutUsersUpdateMsg" }
case class SendBreakoutUsersUpdateMsg(header: BbbClientMsgHeader, body: SendBreakoutUsersUpdateMsgBody) extends BbbCoreMsg
case class SendBreakoutUsersUpdateMsgBody(meetingId: String)
object TransferUserToMeetingEvtMsg { val NAME = "TransferUserToMeetingEvtMsg" } object TransferUserToMeetingEvtMsg { val NAME = "TransferUserToMeetingEvtMsg" }
case class TransferUserToMeetingEvtMsg(header: BbbClientMsgHeader, body: TransferUserToMeetingEvtMsgBody) extends BbbCoreMsg case class TransferUserToMeetingEvtMsg(header: BbbClientMsgHeader, body: TransferUserToMeetingEvtMsgBody) extends BbbCoreMsg
@ -100,7 +78,7 @@ case class RequestBreakoutJoinURLRespMsgBody(parentMeetingId: String, breakoutMe
// Sent by user actor to ask for voice conference transfer // Sent by user actor to ask for voice conference transfer
object TransferUserToMeetingRequestMsg { val NAME = "TransferUserToMeetingRequestMsg" } object TransferUserToMeetingRequestMsg { val NAME = "TransferUserToMeetingRequestMsg" }
case class TransferUserToMeetingRequestMsg(header: BbbClientMsgHeader, body: TransferUserToMeetingRequestMsgBody) extends BbbCoreMsg case class TransferUserToMeetingRequestMsg(header: BbbClientMsgHeader, body: TransferUserToMeetingRequestMsgBody) extends StandardMsg
case class TransferUserToMeetingRequestMsgBody(meetingId: String, targetMeetingId: String, userId: String) case class TransferUserToMeetingRequestMsgBody(meetingId: String, targetMeetingId: String, userId: String)
object UpdateBreakoutUsersEvtMsg { val NAME = "UpdateBreakoutUsersEvtMsg" } object UpdateBreakoutUsersEvtMsg { val NAME = "UpdateBreakoutUsersEvtMsg" }

View File

@ -884,8 +884,6 @@ public class MeetingService implements MessageListener {
processStunTurnInfoRequested((StunTurnInfoRequested) message); processStunTurnInfoRequested((StunTurnInfoRequested) message);
} else if (message instanceof CreateBreakoutRoom) { } else if (message instanceof CreateBreakoutRoom) {
processCreateBreakoutRoom((CreateBreakoutRoom) message); processCreateBreakoutRoom((CreateBreakoutRoom) message);
} else if (message instanceof EndBreakoutRoom) {
processEndBreakoutRoom((EndBreakoutRoom) message);
} }
} }
}; };

View File

@ -83,8 +83,6 @@ class ReceivedJsonMsgHdlrActor(val msgFromAkkaAppsEventBus: MsgFromAkkaAppsEvent
route[UserBroadcastCamStoppedEvtMsg](envelope, jsonNode) route[UserBroadcastCamStoppedEvtMsg](envelope, jsonNode)
case CreateBreakoutRoomSysCmdMsg.NAME => case CreateBreakoutRoomSysCmdMsg.NAME =>
route[CreateBreakoutRoomSysCmdMsg](envelope, jsonNode) route[CreateBreakoutRoomSysCmdMsg](envelope, jsonNode)
case EndBreakoutRoomEvtMsg.NAME =>
route[EndBreakoutRoomEvtMsg](envelope, jsonNode)
case _ => case _ =>

View File

@ -33,7 +33,6 @@ class OldMeetingMsgHdlrActor(val olgMsgGW: OldMessageReceivedGW)
case m: UserBroadcastCamStartedEvtMsg => handleUserBroadcastCamStartedEvtMsg(m) case m: UserBroadcastCamStartedEvtMsg => handleUserBroadcastCamStartedEvtMsg(m)
case m: UserBroadcastCamStoppedEvtMsg => handleUserBroadcastCamStoppedEvtMsg(m) case m: UserBroadcastCamStoppedEvtMsg => handleUserBroadcastCamStoppedEvtMsg(m)
case m: CreateBreakoutRoomSysCmdMsg => handleCreateBreakoutRoomSysCmdMsg(m) case m: CreateBreakoutRoomSysCmdMsg => handleCreateBreakoutRoomSysCmdMsg(m)
case m: EndBreakoutRoomEvtMsg => handleEndBreakoutRoomEvtMsg(m)
case _ => log.error("***** Cannot handle " + msg.envelope.name) case _ => log.error("***** Cannot handle " + msg.envelope.name)
} }
} }
@ -67,10 +66,6 @@ class OldMeetingMsgHdlrActor(val olgMsgGW: OldMessageReceivedGW)
} }
def handleEndBreakoutRoomEvtMsg(msg: EndBreakoutRoomEvtMsg): Unit = {
olgMsgGW.handle(new EndBreakoutRoom(msg.body.breakoutMeetingId))
}
def handlePubSubPongSysRespMsg(msg: PubSubPongSysRespMsg): Unit = { def handlePubSubPongSysRespMsg(msg: PubSubPongSysRespMsg): Unit = {
olgMsgGW.handle(new org.bigbluebutton.api.messaging.messages.KeepAliveReply(msg.body.system, msg.body.timestamp)) olgMsgGW.handle(new org.bigbluebutton.api.messaging.messages.KeepAliveReply(msg.body.system, msg.body.timestamp))
} }