- upgrade dependencies versions

This commit is contained in:
Richard Alam 2017-05-08 12:43:19 -07:00
parent 44e3fb8a07
commit ddf5eb9caa
37 changed files with 92 additions and 161 deletions

View File

@ -6,7 +6,7 @@ organization := "org.bigbluebutton"
version := "0.0.2"
scalaVersion := "2.11.7"
scalaVersion := "2.12.2"
scalacOptions ++= Seq(
"-unchecked",
@ -14,7 +14,7 @@ scalacOptions ++= Seq(
"-Xlint",
"-Ywarn-dead-code",
"-language:_",
"-target:jvm-1.7",
"-target:jvm-1.8",
"-encoding", "UTF-8"
)
@ -37,35 +37,56 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console",
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports")
val akkaVersion = "2.5.1"
val scalaTestV = "2.2.6"
libraryDependencies ++= {
val akkaVersion = "2.3.14"
val akkaStreamV = "1.0"
val scalaTestV = "2.2.4"
Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"com.typesafe.akka" %% "akka-stream-experimental" % akkaStreamV,
"com.typesafe.akka" %% "akka-http-core-experimental" % akkaStreamV,
"com.typesafe.akka" %% "akka-http-experimental" % akkaStreamV,
"com.typesafe.akka" %% "akka-http-spray-json-experimental" % akkaStreamV,
"com.typesafe.akka" %% "akka-http-testkit-experimental" % akkaStreamV,
"org.scalatest" % "scalatest_2.11" % scalaTestV % "test",
"ch.qos.logback" % "logback-classic" % "1.0.13" % "runtime",
"org.pegdown" % "pegdown" % "1.4.0",
"junit" % "junit" % "4.11",
"com.etaty.rediscala" %% "rediscala" % "1.4.0",
"commons-codec" % "commons-codec" % "1.10",
"joda-time" % "joda-time" % "2.3",
"com.google.code.gson" % "gson" % "2.5",
"redis.clients" % "jedis" % "2.7.2",
"org.apache.commons" % "commons-lang3" % "3.2",
"org.bigbluebutton" % "bbb-common-message" % "0.0.19-SNAPSHOT",
"io.spray" %% "spray-json" % "1.3.2"
"org.bigbluebutton" % "bbb-common-message" % "0.0.19-SNAPSHOT"
)
}
// https://mvnrepository.com/artifact/org.scala-lang/scala-library
libraryDependencies += "org.scala-lang" % "scala-library" % "2.12.2"
// https://mvnrepository.com/artifact/org.scala-lang/scala-compiler
libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.12.2"
// https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor_2.12
libraryDependencies += "com.typesafe.akka" % "akka-actor_2.12" % "2.5.1"
// https://mvnrepository.com/artifact/com.typesafe.akka/akka-slf4j_2.12
libraryDependencies += "com.typesafe.akka" % "akka-slf4j_2.12" % "2.5.1"
// https://mvnrepository.com/artifact/com.github.etaty/rediscala_2.12
libraryDependencies += "com.github.etaty" % "rediscala_2.12" % "1.8.0"
libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.8"
libraryDependencies += "com.google.code.gson" % "gson" % "2.8.0"
libraryDependencies += "redis.clients" % "jedis" % "2.9.0"
libraryDependencies += "joda-time" % "joda-time" % "2.9.9"
libraryDependencies += "io.spray" % "spray-json_2.12" % "1.3.3"
libraryDependencies += "org.pegdown" % "pegdown" % "1.6.0"
// https://mvnrepository.com/artifact/com.typesafe.akka/akka-testkit_2.12
libraryDependencies += "com.typesafe.akka" % "akka-testkit_2.12" % "2.5.1" % "test"
// https://mvnrepository.com/artifact/org.scalactic/scalactic_2.12
libraryDependencies += "org.scalactic" % "scalactic_2.12" % "3.0.3" % "test"
// https://mvnrepository.com/artifact/org.scalatest/scalatest_2.12
libraryDependencies += "org.scalatest" % "scalatest_2.12" % "3.0.3" % "test"
libraryDependencies += "org.mockito" % "mockito-core" % "2.7.22" % "test"
seq(Revolver.settings: _*)

View File

@ -1,23 +1,17 @@
package org.bigbluebutton
import akka.event.{ LoggingAdapter, Logging }
import akka.actor.{ ActorSystem, Props }
import scala.concurrent.duration._
import redis.RedisClient
import scala.concurrent.{ Future, Await }
import akka.event.{ Logging }
import akka.actor.{ ActorSystem }
import org.bigbluebutton.endpoint.redis.RedisPublisher
import org.bigbluebutton.endpoint.redis.KeepAliveRedisPublisher
import org.bigbluebutton.endpoint.redis.AppsRedisSubscriberActor
import org.bigbluebutton.core.api.MessageOutGateway
import org.bigbluebutton.core.api.IBigBlueButtonInGW
import org.bigbluebutton.core.BigBlueButtonInGW
import org.bigbluebutton.core.MessageSender
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.MessageSenderActor
import org.bigbluebutton.core.RecorderActor
import org.bigbluebutton.core.pubsub.receivers.RedisMessageReceiver
import org.bigbluebutton.core.api.OutMessageListener2
import org.bigbluebutton.core.pubsub.senders._
import org.bigbluebutton.core.service.recorder.RedisDispatcher
import org.bigbluebutton.core.service.recorder.RecorderApplication
import org.bigbluebutton.core.bus._

View File

@ -4,7 +4,6 @@ import java.io.{ PrintWriter, StringWriter }
import akka.actor._
import akka.actor.ActorLogging
import akka.actor.SupervisorStrategy.Resume
import akka.pattern.{ ask, pipe }
import akka.util.Timeout
import scala.concurrent.duration._
@ -166,7 +165,7 @@ class BigBlueButtonActor(val system: ActorSystem,
case None => {
log.info("Create meeting request. meetingId={}", msg.mProps.meetingID)
var m = RunningMeeting(msg.mProps, outGW, eventBus)
val m = RunningMeeting(msg.mProps, outGW, eventBus)
/** Subscribe to meeting and voice events. **/
eventBus.subscribe(m.actorRef, m.mProps.meetingID)
@ -190,7 +189,7 @@ class BigBlueButtonActor(val system: ActorSystem,
private def handleGetAllMeetingsRequest(msg: GetAllMeetingsRequest) {
val len = meetings.keys.size
var currPosition = len - 1
var resultArray: Array[MeetingInfo] = new Array[MeetingInfo](len)
val resultArray: Array[MeetingInfo] = new Array[MeetingInfo](len)
meetings.values.foreach(m => {
val id = m.mProps.meetingID

View File

@ -157,8 +157,8 @@ class BigBlueButtonInGW(
val disablePrivChat = s.getOrElse("disablePrivateChat", false)
val disablePubChat = s.getOrElse("disablePublicChat", false)
val lockedLayout = s.getOrElse("lockedLayout", false)
var lockOnJoin = s.getOrElse("lockOnJoin", false)
var lockOnJoinConfigurable = s.getOrElse("lockOnJoinConfigurable", false)
val lockOnJoin = s.getOrElse("lockOnJoin", false)
val lockOnJoinConfigurable = s.getOrElse("lockOnJoinConfigurable", false)
val permissions = new Permissions(disableCam = disableCam,
disableMic = disableMic,
@ -331,22 +331,21 @@ class BigBlueButtonInGW(
def generatePresentationPages(presId: String, numPages: Int, presBaseUrl: String): scala.collection.immutable.HashMap[String, Page] = {
var pages = new scala.collection.immutable.HashMap[String, Page]
val baseUrl =
for (i <- 1 to numPages) {
val id = presId + "/" + i
val num = i;
val current = if (i == 1) true else false
val thumbnail = presBaseUrl + "/thumbnail/" + i
val swfUri = presBaseUrl + "/slide/" + i
for (i <- 1 to numPages) {
val id = presId + "/" + i
val num = i;
val current = if (i == 1) true else false
val thumbnail = presBaseUrl + "/thumbnail/" + i
val swfUri = presBaseUrl + "/slide/" + i
val txtUri = presBaseUrl + "/textfiles/" + i
val svgUri = presBaseUrl + "/svg/" + i
val txtUri = presBaseUrl + "/textfiles/" + i
val svgUri = presBaseUrl + "/svg/" + i
val p = new Page(id = id, num = num, thumbUri = thumbnail, swfUri = swfUri,
txtUri = txtUri, svgUri = svgUri,
current = current)
pages += (p.id -> p)
}
val p = new Page(id = id, num = num, thumbUri = thumbnail, swfUri = swfUri,
txtUri = txtUri, svgUri = svgUri,
current = current)
pages += (p.id -> p)
}
pages
}

View File

@ -1,7 +1,6 @@
package org.bigbluebutton.core
import scala.util.{ Try, Success, Failure }
import spray.json.{ JsObject, JsonParser, DeserializationException }
import org.parboiled.errors.ParsingException
import org.bigbluebutton.core.api._
import org.bigbluebutton.messages._

View File

@ -1,29 +1,10 @@
package org.bigbluebutton.core
import akka.actor.Actor
import akka.actor.ActorRef
import akka.actor.ActorLogging
import akka.actor.Props
import org.bigbluebutton.core.api._
import org.bigbluebutton.common.messages.MessagingConstants
import org.bigbluebutton.core.pubsub.senders.ChatMessageToJsonConverter
import org.bigbluebutton.common.messages.StartRecordingVoiceConfRequestMessage
import org.bigbluebutton.common.messages.StopRecordingVoiceConfRequestMessage
import org.bigbluebutton.core.pubsub.senders.MeetingMessageToJsonConverter
import org.bigbluebutton.core.pubsub.senders.PesentationMessageToJsonConverter
import org.bigbluebutton.common.messages.GetPresentationInfoReplyMessage
import org.bigbluebutton.common.messages.PresentationRemovedMessage
import org.bigbluebutton.core.apps.Page
import collection.JavaConverters._
import scala.collection.JavaConversions._
import org.bigbluebutton.core.apps.SimplePollResultOutVO
import org.bigbluebutton.core.apps.SimplePollOutVO
import org.bigbluebutton.core.pubsub.senders.UsersMessageToJsonConverter
import org.bigbluebutton.common.messages._
import org.bigbluebutton.core.pubsub.senders.WhiteboardMessageToJsonConverter
import org.bigbluebutton.common.converters.ToJsonEncoder
import org.bigbluebutton.common.messages.payload._
import org.bigbluebutton.common.messages._
import org.bigbluebutton.messages.payload._
import org.bigbluebutton.messages._

View File

@ -1,7 +1,6 @@
package org.bigbluebutton.core
import akka.actor.Actor
import akka.actor.ActorRef
import akka.actor.ActorLogging
import akka.actor.Props
import akka.actor.OneForOneStrategy
@ -20,8 +19,6 @@ import org.bigbluebutton.common.messages.GetPresentationInfoReplyMessage
import org.bigbluebutton.common.messages.PresentationRemovedMessage
import org.bigbluebutton.common.messages.AllowUserToShareDesktopReply
import org.bigbluebutton.core.apps.Page
import collection.JavaConverters._
import scala.collection.JavaConversions._
import scala.concurrent.duration._
import org.bigbluebutton.core.apps.SimplePollResultOutVO
@ -38,7 +35,6 @@ import org.bigbluebutton.common.messages.LockLayoutMessage
import org.bigbluebutton.core.pubsub.senders.WhiteboardMessageToJsonConverter
import org.bigbluebutton.common.converters.ToJsonEncoder
import org.bigbluebutton.common.messages.TransferUserToVoiceConfRequestMessage
import org.bigbluebutton.core
object MessageSenderActor {
def props(msgSender: MessageSender): Props =
@ -710,6 +706,7 @@ class MessageSenderActor(val service: MessageSender)
private def handleUserJoined(msg: UserJoined) {
val json = UsersMessageToJsonConverter.userJoinedToJson(msg)
println("************** Publishing [" + json + "] *******************")
service.send(MessagingConstants.FROM_USERS_CHANNEL, json)
}

View File

@ -1,7 +1,5 @@
package org.bigbluebutton.core
import akka.actor.ActorRef
import akka.actor.ActorContext
import org.bigbluebutton.core.bus.OutgoingEventBus
import org.bigbluebutton.core.bus.BigBlueButtonOutMessage
import org.bigbluebutton.core.api.IOutMessage

View File

@ -1,19 +1,13 @@
package org.bigbluebutton.core
import akka.actor.Actor
import akka.actor.ActorRef
import akka.actor.ActorLogging
import akka.actor.Props
import akka.actor.OneForOneStrategy
import akka.actor.SupervisorStrategy.Resume
import java.io.{ PrintWriter, StringWriter }
import org.bigbluebutton.core.api._
import java.util.concurrent.TimeUnit
import org.bigbluebutton.core.util._
import scala.concurrent.duration._
import org.bigbluebutton.core.apps.{ PollApp, UsersApp, PresentationApp, LayoutApp, ChatApp, WhiteboardApp, CaptionApp }
import org.bigbluebutton.core.apps.{ ChatModel, LayoutModel, UsersModel, PollModel, WhiteboardModel, CaptionModel }
import org.bigbluebutton.core.apps.PresentationModel
import org.bigbluebutton.core.service.recorder.RecorderApplication
object OutMessageGatewayActor {

View File

@ -1,14 +1,12 @@
package org.bigbluebutton.core
import akka.actor.Actor
import akka.actor.ActorRef
import akka.actor.ActorLogging
import akka.actor.Props
import akka.actor.OneForOneStrategy
import akka.actor.SupervisorStrategy.Resume
import java.io.{ PrintWriter, StringWriter }
import org.bigbluebutton.core.api._
import org.bigbluebutton.core.api._
import scala.collection.JavaConversions._
import scala.concurrent.duration._
import org.bigbluebutton.core.service.recorder.RecorderApplication
@ -37,7 +35,6 @@ import org.bigbluebutton.core.recorders.events.AddShapeWhiteboardRecordEvent
import org.bigbluebutton.core.recorders.events.DeskShareStartRTMPRecordEvent
import org.bigbluebutton.core.recorders.events.DeskShareStopRTMPRecordEvent
import org.bigbluebutton.core.recorders.events.DeskShareNotifyViewersRTMPRecordEvent
// import org.bigbluebutton.core.service.whiteboard.WhiteboardKeyUtil
import org.bigbluebutton.common.messages.WhiteboardKeyUtil
import org.bigbluebutton.core.recorders.events.ModifyTextWhiteboardRecordEvent
import org.bigbluebutton.core.recorders.events.EditCaptionHistoryRecordEvent

View File

@ -11,7 +11,7 @@ import org.bigbluebutton.core.api._
import org.bigbluebutton.core.bus.BigBlueButtonEvent
import org.bigbluebutton.core.bus.IncomingEventBus
import org.bigbluebutton.core.models.Users
import org.bigbluebutton.core.running.{ LiveMeeting, MeetingActor }
import org.bigbluebutton.core.running.{ MeetingActor }
trait BreakoutRoomApp extends SystemConfiguration {
this: MeetingActor =>
@ -174,7 +174,7 @@ object BreakoutRoomsUtil {
}
def createJoinURL(webAPI: String, apiCall: String, baseString: String, checksum: String): String = {
var apiURL = if (webAPI.endsWith("/")) webAPI else webAPI.concat("/")
val apiURL = if (webAPI.endsWith("/")) webAPI else webAPI.concat("/")
apiURL.concat(apiCall).concat("?").concat(baseString).concat("&checksum=").concat(checksum)
}

View File

@ -1,8 +1,6 @@
package org.bigbluebutton.core.apps
import org.bigbluebutton.core.api._
import scala.collection.mutable.ArrayBuffer
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.running.{ MeetingActor }
@ -12,7 +10,7 @@ trait CaptionApp {
val outGW: OutMessageGateway
def handleSendCaptionHistoryRequest(msg: SendCaptionHistoryRequest) {
var history = liveMeeting.captionModel.getHistory()
val history = liveMeeting.captionModel.getHistory()
//println("Caption history requested " + history)
outGW.send(new SendCaptionHistoryReply(mProps.meetingID, mProps.recorded, msg.requesterID, history))
}

View File

@ -1,8 +1,5 @@
package org.bigbluebutton.core.apps
import scala.collection.mutable.ArrayBuffer
import scala.collection.immutable.HashMap
class CaptionModel {
var transcripts = Map[String, Array[String]]()
@ -46,12 +43,12 @@ class CaptionModel {
//println("editHistory entered")
if (transcripts contains locale) {
//println("editHistory found locale:" + locale)
var oText: String = transcripts(locale)(1)
val oText: String = transcripts(locale)(1)
if (startIndex >= 0 && endIndex <= oText.length && startIndex <= endIndex) {
//println("editHistory passed index test")
var sText: String = oText.substring(0, startIndex)
var eText: String = oText.substring(endIndex)
val sText: String = oText.substring(0, startIndex)
val eText: String = oText.substring(endIndex)
transcripts(locale)(1) = (sText + text + eText)
//println("editHistory new history is: " + transcripts(locale)(1))

View File

@ -1,10 +1,8 @@
package org.bigbluebutton.core.apps
import org.bigbluebutton.core.api._
import scala.collection.mutable.ArrayBuffer
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.running.{ LiveMeeting, MeetingActor }
import org.bigbluebutton.core.running.{ MeetingActor }
trait ChatApp {
this: MeetingActor =>

View File

@ -1,6 +1,6 @@
package org.bigbluebutton.core.apps
import org.bigbluebutton.core.models.{ DirectChats, PublicChats, UserIdAndName }
import org.bigbluebutton.core.models.{ DirectChats, PublicChats }
import scala.collection.mutable.ArrayBuffer

View File

@ -5,7 +5,7 @@ import org.bigbluebutton.core.api._
import scala.collection.mutable.ArrayBuffer
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.models.{ Roles, UserVO, Users }
import org.bigbluebutton.core.running.{ LiveMeeting, MeetingActor }
import org.bigbluebutton.core.running.{ MeetingActor }
trait LayoutApp {
this: MeetingActor =>

View File

@ -1,6 +1,5 @@
package org.bigbluebutton.core.apps
import scala.collection.mutable.HashMap
import scala.collection.mutable.ArrayBuffer
object PollType {
@ -42,7 +41,7 @@ object PollFactory {
if (numQs > 0 && numQs <= 6) {
val answers = new Array[Answer](numQs)
var i = 0
for (i <- 0 until numQs) {
answers(i) = new Answer(i, LetterArray(i), Some(LetterArray(i)))
val question = new Question(0, PollType.LetterPollType, multiResponse, None, answers)

View File

@ -1,10 +1,9 @@
package org.bigbluebutton.core.apps
import org.bigbluebutton.core.api._
import com.google.gson.Gson
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.models.Users
import org.bigbluebutton.core.running.{ LiveMeeting, MeetingActor }
import org.bigbluebutton.core.running.{ MeetingActor }
trait PresentationApp {
this: MeetingActor =>

View File

@ -2,7 +2,7 @@ package org.bigbluebutton.core.apps
import org.bigbluebutton.core.api._
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.running.{ LiveMeeting, MeetingActor }
import org.bigbluebutton.core.running.{ MeetingActor }
trait SharedNotesApp {
this: MeetingActor =>

View File

@ -3,11 +3,9 @@ package org.bigbluebutton.core.apps
import org.bigbluebutton.core.api._
import org.bigbluebutton.core.api.SharedNotesOperation._
import name.fraser.neil.plaintext.diff_match_patch
import name.fraser.neil.plaintext.diff_match_patch._
import scala.collection.mutable.Stack
import scala.collection.mutable.HashMap
import scala.collection._
import java.util.Collections
class SharedNotesModel {
val notes = new HashMap[String, Note]()

View File

@ -1,7 +1,6 @@
package org.bigbluebutton.core.apps
import org.bigbluebutton.core.api._
import scala.collection.immutable.ListSet
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.GuestPolicy
import org.bigbluebutton.core.models._
@ -84,7 +83,6 @@ trait UsersApp {
log.info("Got ValidateAuthToken message. meetingId=" + msg.meetingID + " userId=" + msg.userId)
RegisteredUsers.getRegisteredUserWithToken(msg.token, msg.userId, liveMeeting.registeredUsers) match {
case Some(u) =>
val replyTo = mProps.meetingID + '/' + msg.userId
//send the reply
outGW.send(new ValidateAuthTokenReply(mProps.meetingID, msg.userId, msg.token, true, msg.correlationId))
@ -338,7 +336,7 @@ trait UsersApp {
* If user is not joined through the web (perhaps reconnecting).
* Send a user left event to clear up user list of all clients.
*/
val user = Users.userLeft(w.id, liveMeeting.users)
Users.userLeft(w.id, liveMeeting.users)
outGW.send(new UserLeft(msg.meetingID, mProps.recorded, w))
}
}
@ -412,7 +410,7 @@ trait UsersApp {
def handleUserJoinedVoiceFromPhone(msg: UserJoinedVoiceConfMessage) = {
log.info("User joining from phone. meetingId=" + mProps.meetingID + " userId=" + msg.userId + " extUserId=" + msg.externUserId)
val user = Users.getUserWithVoiceUserId(msg.voiceUserId, liveMeeting.users) match {
Users.getUserWithVoiceUserId(msg.voiceUserId, liveMeeting.users) match {
case Some(user) => {
log.info("Voice user=" + msg.voiceUserId + " is already in conf="
+ mProps.voiceBridge + ". Must be duplicate message. meetigId=" + mProps.meetingID)

View File

@ -1,8 +1,6 @@
package org.bigbluebutton.core.apps
import org.bigbluebutton.core.util.RandomStringGenerator
import org.bigbluebutton.core.api.Presenter
import org.bigbluebutton.core.models._
class UsersModel {
// private var uservos = new Users
@ -15,8 +13,6 @@ class UsersModel {
*/
private var globalAudioConnectionCounter = new collection.immutable.HashMap[String, Integer]
private var locked = false
private var meetingMuted = false
private var recordingVoice = false
private var currentPresenter = new Presenter("system", "system", "system")

View File

@ -1,10 +1,7 @@
package org.bigbluebutton.core.apps
import java.util.ArrayList;
import org.bigbluebutton.core.util.jhotdraw.BezierWrapper
import org.bigbluebutton.core.util.jhotdraw.PathData
import scala.collection.immutable.List
import scala.collection.immutable.HashMap

View File

@ -2,7 +2,6 @@ package org.bigbluebutton.core.bus
import akka.actor.ActorRef
import akka.event.EventBus
import akka.event.ActorEventBus
import akka.event.LookupClassification
import org.bigbluebutton.core.api.InMessage

View File

@ -2,7 +2,6 @@ package org.bigbluebutton.core.bus
import akka.actor.ActorRef
import akka.event.EventBus
import akka.event.ActorEventBus
import akka.event.LookupClassification
import org.bigbluebutton.core.api._

View File

@ -1,9 +1,7 @@
package org.bigbluebutton.core.pubsub.senders
import org.bigbluebutton.common.messages.Constants
import scala.collection.mutable.HashMap
import org.bigbluebutton.core.api._
import collection.JavaConverters._
import scala.collection.JavaConversions._
import org.bigbluebutton.core.messaging.Util

View File

@ -1,13 +1,9 @@
package org.bigbluebutton.core.pubsub.senders
import scala.collection.mutable.HashMap
import org.bigbluebutton.core.api._
import com.google.gson.Gson
import scala.collection.mutable.HashMap
import collection.JavaConverters._
import scala.collection.JavaConversions._
import java.util.ArrayList
import org.bigbluebutton.common.messages.MessagingConstants
import org.bigbluebutton.core.messaging.Util
import org.bigbluebutton.common.messages.ChatKeyUtil

View File

@ -4,10 +4,6 @@ import org.bigbluebutton.core.api._
import org.bigbluebutton.core.messaging.Util
import org.bigbluebutton.messages._
import spray.json.JsArray
import spray.json.JsObject
import spray.json.JsString
object MeetingMessageToJsonConverter {
def meetingDestroyedToJson(msg: MeetingDestroyed): String = {
val payload = new java.util.HashMap[String, Any]()

View File

@ -3,7 +3,6 @@ package org.bigbluebutton.core.pubsub.senders
import org.bigbluebutton.core.api._
import org.bigbluebutton.core.messaging.Util
import org.bigbluebutton.core.apps.Page
import collection.JavaConverters._
import scala.collection.JavaConversions._
object PesentationMessageToJsonConverter {

View File

@ -2,7 +2,6 @@ package org.bigbluebutton.core.pubsub.senders
import org.bigbluebutton.core.messaging.Util
import org.bigbluebutton.core.api._
import com.google.gson.Gson
import scala.collection.JavaConverters._
object SharedNotesMessageToJsonConverter {

View File

@ -1,13 +1,9 @@
package org.bigbluebutton.core.pubsub.senders
import org.bigbluebutton.core.api._
import org.bigbluebutton.common.messages.MessagingConstants
import org.bigbluebutton.core.messaging.Util
import com.google.gson.Gson
import org.bigbluebutton.core.models.{ RegisteredUser, UserVO }
import collection.JavaConverters._
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
object UsersMessageToJsonConverter {
private def userToMap(user: UserVO): java.util.Map[String, Any] = {
@ -38,9 +34,9 @@ object UsersMessageToJsonConverter {
vuser += "muted" -> user.voiceUser.muted
vuser += "talking" -> user.voiceUser.talking
wuser.put("voiceUser", mapAsJavaMap(vuser))
wuser.put("voiceUser", mapAsJavaMapConverter(vuser).asJava)
mapAsJavaMap(wuser)
mapAsJavaMapConverter(wuser).asJava
}
private def registeredUserToMap(user: RegisteredUser): java.util.Map[String, Any] = {
@ -54,7 +50,7 @@ object UsersMessageToJsonConverter {
wuser += "guest" -> user.guest
wuser += "waiting_for_acceptance" -> user.waitingForAcceptance
mapAsJavaMap(wuser)
mapAsJavaMapConverter(wuser).asJava
}
private def buildPermissionsHashMap(perms: Permissions): java.util.HashMap[String, java.lang.Boolean] = {

View File

@ -3,8 +3,7 @@ package org.bigbluebutton.core.pubsub.senders
import org.bigbluebutton.core.api._
import org.bigbluebutton.core.messaging.Util
import org.bigbluebutton.core.apps.AnnotationVO
import collection.JavaConverters._
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
object WhiteboardMessageToJsonConverter {
private def shapeToMap(shape: AnnotationVO): java.util.Map[String, Any] = {
@ -20,9 +19,9 @@ object WhiteboardMessageToJsonConverter {
for ((key, value) <- shape.shape) {
shapeMap += key -> value
}
res += "shape" -> mapAsJavaMap(shapeMap)
res += "shape" -> mapAsJavaMapConverter(shapeMap).asJava
mapAsJavaMap(res)
mapAsJavaMapConverter(res).asJava
}
def getWhiteboardShapesReplyToJson(msg: GetWhiteboardShapesReply): String = {

View File

@ -1,6 +1,5 @@
package org.bigbluebutton.core.running
import akka.actor.ActorRef
import akka.actor.ActorContext
import org.bigbluebutton.core.apps._
import org.bigbluebutton.core.bus._

View File

@ -8,8 +8,6 @@ import java.net.InetSocketAddress
import redis.actors.RedisSubscriberActor
import redis.api.pubsub.{ PMessage, Message }
import scala.concurrent.duration._
import akka.actor.ActorRef
import akka.actor.actorRef2Scala
import org.bigbluebutton.SystemConfiguration
import org.bigbluebutton.core.pubsub.receivers.RedisMessageReceiver
import redis.api.servers.ClientSetname
@ -28,9 +26,8 @@ object AppsRedisSubscriberActor extends SystemConfiguration {
class AppsRedisSubscriberActor(msgReceiver: RedisMessageReceiver, redisHost: String,
redisPort: Int,
channels: Seq[String] = Nil, patterns: Seq[String] = Nil)
extends RedisSubscriberActor(
new InetSocketAddress(redisHost, redisPort),
channels, patterns) {
extends RedisSubscriberActor(new InetSocketAddress(redisHost, redisPort),
channels, patterns, onConnectStatus = connected => { println(s"connected: $connected") }) {
override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {
case e: Exception => {
@ -51,7 +48,7 @@ class AppsRedisSubscriberActor(msgReceiver: RedisMessageReceiver, redisHost: Str
}
def onPMessage(pmessage: PMessage) {
//log.debug(s"RECEIVED:\n $pmessage \n")
msgReceiver.handleMessage(pmessage.patternMatched, pmessage.channel, pmessage.data)
log.debug(s"RECEIVED:\n ${pmessage.data.utf8String} \n")
msgReceiver.handleMessage(pmessage.patternMatched, pmessage.channel, pmessage.data.utf8String)
}
}

View File

@ -1,7 +1,5 @@
package org.bigbluebutton.endpoint.redis
import akka.actor.Props
import redis.RedisClient
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext.Implicits.global
import akka.actor.ActorSystem

View File

@ -1,13 +1,9 @@
package org.bigbluebutton.endpoint.redis
import akka.actor.Props
import redis.RedisClient
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext.Implicits.global
import akka.actor.ActorSystem
import scala.concurrent.Await
import akka.actor.Actor
import org.bigbluebutton.SystemConfiguration
import akka.util.ByteString
class RedisPublisher(val system: ActorSystem) extends SystemConfiguration {
@ -18,8 +14,8 @@ class RedisPublisher(val system: ActorSystem) extends SystemConfiguration {
redis.clientSetname("BbbAppsAkkaPub")
def publish(channel: String, data: String) {
//println("PUBLISH TO [" + channel + "]: \n [" + data + "]")
redis.publish(channel, data)
println("PUBLISH TO [" + channel + "]: \n [" + data + "]")
redis.publish(channel, ByteString(data))
}
}

View File

@ -252,6 +252,7 @@ package org.bigbluebutton.modules.users.services
}
private function handleJoinedMeeting(msg:Object):void {
LOGGER.debug("*** handleJoinedMeeting {0} **** \n", [msg.msg]);
var map:Object = JSON.parse(msg.msg);
var userid: String = map.user.userId;