diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java index 63819c26fd..ba5539e184 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java @@ -24,17 +24,14 @@ import java.util.Set; import org.red5.server.api.Red5; import org.bigbluebutton.conference.service.participants.ParticipantsApplication; import org.bigbluebutton.conference.service.recorder.RecorderApplication; -import org.red5.logging.Red5LoggerFactory; -import org.red5.server.adapter.ApplicationAdapter; +import org.red5.logging.Red5LoggerFactory; import org.red5.server.adapter.IApplication; -import org.red5.server.api.IClient; +import org.red5.server.adapter.MultiThreadedApplicationAdapter; import org.red5.server.api.IConnection; import org.red5.server.api.IScope; import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.red5.server.api.so.ISharedObject; -public class BigBlueButtonApplication extends ApplicationAdapter{ +public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter { private static Logger log = Red5LoggerFactory.getLogger(BigBlueButtonApplication.class, "bigbluebutton"); @@ -44,94 +41,78 @@ public class BigBlueButtonApplication extends ApplicationAdapter{ private String version; - public boolean appStart (IScope app ) - { - log.debug("Starting BigBlueButton version $version"); + public boolean appStart(IScope app) { + log.debug("Starting BigBlueButton version {}", version); return super.appStart(app); } - public void appStop (IScope app ) - { - log.debug( "${APP} - appStop" ); + public void appStop(IScope app) { + log.debug("Stopping BigBlueButton version {}", version); super.appStop(app); } - public boolean appConnect( IConnection conn , Object[] params ) - { - log.debug( "${APP} - appConnect "); + public boolean appConnect(IConnection conn , Object[] params) { + log.debug("{} - appConnect", APP); return super.appConnect(conn, params); } - public void appDisconnect( IConnection conn) - { - log.debug( "${APP} - appDisconnect "); + public void appDisconnect(IConnection conn) { + log.debug("{} - appDisconnect", APP); super.appDisconnect(conn); } public boolean roomStart(IScope room) { - log.debug( "${APP} - roomStart " ); + log.debug("{} - roomStart ", APP); assert participantsApplication != null; participantsApplication.createRoom(room.getName()); return super.roomStart(room); } public void roomStop(IScope room) { - log.debug( "${APP} - roomStop " ); + log.debug("{} - roomStop", APP); super.roomStop(room); assert participantsApplication != null; participantsApplication.destroyRoom(room.getName()); BigBlueButtonSession bbbSession = getBbbSession(); assert bbbSession != null; - log.debug( "${APP} - roomStop - destroying RecordSession ${bbbSession.sessionName}"); + log.debug("{} - roomStop - destroying RecordSession {}", APP, bbbSession.getSessionName()); assert recorderApplication != null; recorderApplication.destroyRecordSession(bbbSession.getSessionName()); - log.debug( "${APP} - roomStop - destroyed RecordSession ${bbbSession.sessionName}"); + log.debug("{} - roomStop - destroyed RecordSession {}", APP, bbbSession.getSessionName()); } public boolean roomConnect(IConnection connection, Object[] params) { - log.debug( "${APP} - roomConnect - "); - + log.debug("{} - roomConnect - ", APP); + String username = ((String) params[0]).toString(); - log.debug( "${APP} - roomConnect - $username"); String role = ((String) params[1]).toString(); - log.debug( "${APP} - roomConnect - $role"); String conference = ((String)params[2]).toString(); - log.debug( "${APP} - roomConnect - $conference"); String mode = ((String) params[3]).toString(); - log.debug( "${APP} - roomConnect - $mode"); /* * Convert the id to Long because it gets converted to ascii decimal * equivalent (i.e. zero (0) becomes 48) if we don't. */ long userid = Long.parseLong(Red5.getConnectionLocal().getClient().getId()); - log.debug( "${APP} - roomConnect - $userid"); String sessionName = connection.getScope().getName(); - log.debug( "${APP} - roomConnect - $sessionName"); - - String room; + String voiceBridge = ((String) params[5]).toString(); - Boolean record; - String externUserID; - room = sessionName; + String room = sessionName; assert recorderApplication != null; - voiceBridge = ((String) params[5]).toString(); - record = Boolean.parseBoolean((String) params[6]); - log.debug ("Got params $voiceBridge and $record"); - - externUserID = ((String) params[7]).toString(); - log.debug ("Got params $externUserID"); - + boolean record = (Boolean)params[6]; + + String externUserID = ((String) params[7]).toString(); + if (record == true) { - log.debug( "${APP} - roomConnect - creating RecordSession $sessionName"); recorderApplication.createRecordSession(conference, room, sessionName); } - log.debug( "${APP} - roomConnect - creating BigBlueButtonSession"); BigBlueButtonSession bbbSession = new BigBlueButtonSession(sessionName, userid, username, role, conference, mode, room, voiceBridge, record, externUserID); - log.debug( "${APP} - roomConnect - setting attribute BigBlueButtonSession"); connection.setAttribute(Constants.SESSION, bbbSession); - log.debug("${APP} - roomConnect - [${username},${role},${conference},${room}]"); + + String debugInfo = "userid=" + userid + ",username=" + username + ",role=" + role + ",conference=" + conference + "," + + "session=" + sessionName + ",voiceConf=" + voiceBridge + ",room=" + room + ",externsUserid=" + externUserID; + log.debug("roomConnect - [{}]", debugInfo); super.roomConnect(connection, params); return true; @@ -154,12 +135,12 @@ public class BigBlueButtonApplication extends ApplicationAdapter{ recorderApplication = a; } - public void setApplicationListeners(Set listeners) { + public void setApplicationListeners(Set listeners) { log.debug("Setting application listeners"); int count = 0; - Iterator iter = listeners.iterator(); + Iterator iter = listeners.iterator(); while (iter.hasNext()) { - log.debug("Setting application listeners $count"); + log.debug("Setting application listeners {}", count); super.addListener((IApplication) iter.next()); count++; } diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonSession.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonSession.java index dc468f622c..683436b3a3 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonSession.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonSession.java @@ -20,13 +20,7 @@ package org.bigbluebutton.conference; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.red5.logging.Red5LoggerFactory; - public class BigBlueButtonSession { - private static Logger log = Red5LoggerFactory.getLogger(BigBlueButtonSession.class, "bigbluebutton"); - private final String username; private final String role; private final String conference; diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/RoomsManager.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/RoomsManager.java index f7ba3f8825..05c9c752d6 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/RoomsManager.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/RoomsManager.java @@ -20,14 +20,12 @@ package org.bigbluebutton.conference; import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.red5.logging.Red5LoggerFactory; import net.jcip.annotations.ThreadSafe; - -import java.util.HashMap; import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentHashMap; + /** * This encapsulates access to Room and Participant. This class must be threadsafe. */ @@ -40,38 +38,35 @@ public class RoomsManager { private IConferenceEventListener conferenceEventListener; public RoomsManager() { - log.debug("In RoomsManager constructor"); rooms = new ConcurrentHashMap(); } public void addRoom(final Room room) { - log.debug("In RoomsManager adding room ${room.name}"); + log.debug("Adding room {}", room.getName()); room.addRoomListener(new ParticipantUpdatingRoomListener(conferenceEventListener, room)); if (checkEvtListener()) { conferenceEventListener.started(room); - log.debug("notified event listener of conference start"); + log.debug("Notified event listener of conference start"); } rooms.put(room.getName(), room); } public void removeRoom(String name) { - log.debug("In RoomsManager remove room ${name}"); + log.debug("Remove room {}", name); Room room = rooms.remove(name); if (checkEvtListener() && room != null) { conferenceEventListener.ended(room); - log.debug("notified event listener of conference end"); + log.debug("Notified event listener of conference end"); } } private boolean checkEvtListener() { - log.debug("RoomsManager event listener: " + conferenceEventListener); return conferenceEventListener != null; } public boolean hasRoom(String name) { - log.debug("In RoomsManager has Room ${name}"); return rooms.containsKey(name); } @@ -82,7 +77,7 @@ public class RoomsManager { // this method is called by incoming JMS requests (Spring integration) public void endMeetingRequest(Room room) { room = getRoom(room.getName()); // must do this because the room coming in is serialized (no transient values are present) - log.debug("End meeting request for room: " + room.getName()); + log.debug("End meeting request for room: {} ", room.getName()); room.endAndKickAll(); } @@ -91,7 +86,7 @@ public class RoomsManager { */ //TODO: this method becomes public for ParticipantsApplication, ask if it's right? public Room getRoom(String name) { - log.debug("In RoomsManager get room ${name}"); + log.debug("Get room {}", name); return rooms.get(name); } @@ -100,7 +95,7 @@ public class RoomsManager { if (r != null) { return r.getParticipants(); } - log.warn("Getting participants from a non-existing room ${roomName}"); + log.warn("Getting participants from a non-existing room {}", roomName); return null; } @@ -110,7 +105,7 @@ public class RoomsManager { r.addRoomListener(listener); return; } - log.warn("Adding listener to a non-existing room ${roomName}"); + log.warn("Adding listener to a non-existing room {}", roomName); } // TODO: this must be broken, right? where is roomName? (JRT: 9/25/2009) @@ -125,24 +120,24 @@ public class RoomsManager { // } public void addParticipant(String roomName, Participant participant) { - log.debug("In RoomsManager - ${roomName} add participant ${participant.name}"); + log.debug("Add participant {}", participant.getName()); Room r = getRoom(roomName); if (r != null) { if (checkEvtListener()) { conferenceEventListener.participantsUpdated(r); if (r.getNumberOfParticipants() == 0) { conferenceEventListener.started(r); - log.debug("notified event listener of conference start"); + log.debug("Notified event listener of conference start"); } } r.addParticipant(participant); return; } - log.warn("Adding participant to a non-existing room ${roomName}"); + log.warn("Adding participant to a non-existing room {}", roomName); } public void removeParticipant(String roomName, Long userid) { - log.debug("In RoomsManager - ${roomName} remove participant ${participant.name}"); + log.debug("Remove participant {} from {}", userid, roomName); Room r = getRoom(roomName); if (r != null) { if (checkEvtListener()) { @@ -155,13 +150,13 @@ public class RoomsManager { } public void changeParticipantStatus(String roomName, Long userid, String status, Object value) { - log.debug("In RoomsManager - ${roomName} change participant status ${userid} - ${status} [${value}]"); + log.debug("Change participant status {} - {} [" + value + "]", userid, status); Room r = getRoom(roomName); if (r != null) { r.changeParticipantStatus(userid, status, value); return; } - log.warn("Changing participant status on a non-existing room ${roomName}"); + log.warn("Changing participant status on a non-existing room {}", roomName); } public void setConferenceEventListener(IConferenceEventListener conferenceEventListener) { diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatApplication.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatApplication.java index 465c5ef57e..c710b63abd 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatApplication.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatApplication.java @@ -54,7 +54,7 @@ public class ChatApplication { roomsManager.addRoomListener(room, listener); return true; } - log.warn("Adding listener to a non-existant room ${room}"); + log.warn("Adding listener to a non-existant room {}", room); return false; } diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatHandler.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatHandler.java index 695639de6d..546e4f7115 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatHandler.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatHandler.java @@ -25,13 +25,10 @@ import org.red5.server.api.IClient; import org.red5.server.api.IConnection; import org.red5.server.api.IScope; import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.red5.logging.Red5LoggerFactory; -import java.util.ArrayList; +import org.red5.logging.Red5LoggerFactory; import org.red5.server.api.so.ISharedObject; import org.red5.server.adapter.ApplicationAdapter; -import org.red5.server.api.Red5; import java.util.Map; import org.bigbluebutton.conference.service.chat.ChatRoomsManager; -import org.bigbluebutton.conference.service.chat.ChatRoom; import org.bigbluebutton.conference.BigBlueButtonSession; import org.bigbluebutton.conference.Constants; import org.bigbluebutton.conference.service.recorder.RecorderApplication; +import org.red5.server.api.Red5; import org.bigbluebutton.conference.BigBlueButtonSession; import org.bigbluebutton.conference.Constants; import org.bigbluebutton.conference.service.recorder.RecorderApplication; public class ChatHandler extends ApplicationAdapter implements IApplication{ private static Logger log = Red5LoggerFactory.getLogger( ChatHandler.class, "bigbluebutton" ); @@ -46,47 +43,45 @@ public class ChatHandler extends ApplicationAdapter implements IApplication{ @Override public boolean appConnect(IConnection conn, Object[] params) { - log.debug("${APP}:appConnect"); + log.debug("appConnect"); return true; } @Override public void appDisconnect(IConnection conn) { - log.debug( "${APP}:appDisconnect"); + log.debug("appDisconnect"); } @Override public boolean appJoin(IClient client, IScope scope) { - log.debug( "${APP}:appJoin ${scope.name}"); + log.debug("appJoin: {}", scope.getName()); return true; } @Override public void appLeave(IClient client, IScope scope) { - log.debug("${APP}:appLeave ${scope.name}"); + log.debug("appLeave: {}", scope.getName()); } @Override public boolean appStart(IScope scope) { this.scope = scope; - log.debug("${APP}:appStart ${scope.name}"); + log.debug("appStart: {}", scope.getName()); return true; } @Override public void appStop(IScope scope) { - log.debug("${APP}:appStop ${scope.name}"); + log.debug("appStop: {}", scope.getName()); } @Override public boolean roomConnect(IConnection connection, Object[] params) { - log.debug("${APP}:roomConnect"); - - log.debug("In live mode"); + log.debug("roomConnect"); ISharedObject so = getSharedObject(connection.getScope(), CHAT_SO); log.debug("Setting up recorder"); ChatEventRecorder recorder = new ChatEventRecorder(so, getBbbSession().getRecord()); - log.debug("adding event recorder to ${connection.scope.name}"); + log.debug("adding event recorder to {}", connection.getScope().getName()); recorderApplication.addEventRecorder(connection.getScope().getName(), recorder); log.debug("Adding room listener"); chatApplication.addRoomListener(connection.getScope().getName(), recorder); @@ -96,36 +91,36 @@ public class ChatHandler extends ApplicationAdapter implements IApplication{ @Override public void roomDisconnect(IConnection connection) { - log.debug("${APP}:roomDisconnect"); + log.debug("roomDisconnect"); } @Override public boolean roomJoin(IClient client, IScope scope) { - log.debug("${APP}:roomJoin ${scope.name} - ${scope.parent.name}"); + log.debug("roomJoin {}", scope.getName(), scope.getParent().getName()); return true; } @Override public void roomLeave(IClient client, IScope scope) { - log.debug("${APP}:roomLeave ${scope.name}"); + log.debug("roomLeave: {}", scope.getName()); } @Override public boolean roomStart(IScope scope) { - log.debug("${APP} - roomStart ${scope.name}"); + log.debug("roomStart {}", scope.getName()); chatApplication.createRoom(scope.getName()); if (!hasSharedObject(scope, CHAT_SO)) { if (createSharedObject(scope, CHAT_SO, false)) { return true; } } - log.error("Failed to start room ${scope.name}"); + log.error("Failed to start room ", scope.getName()); return false; } @Override public void roomStop(IScope scope) { - log.debug("${APP}:roomStop ${scope.name}"); + log.debug("roomStop ", scope.getName()); chatApplication.destroyRoom(scope.getName()); if (!hasSharedObject(scope, CHAT_SO)) { clearSharedObjects(scope, CHAT_SO); diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatRoom.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatRoom.java index 2b18487b71..b0503b6b69 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatRoom.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatRoom.java @@ -21,10 +21,9 @@ package org.bigbluebutton.conference.service.chat; import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.red5.logging.Red5LoggerFactory; -import net.jcip.annotations.ThreadSafe; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.Collections; import java.util.Iterator; +import net.jcip.annotations.ThreadSafe; import java.util.concurrent.ConcurrentHashMap; import java.util.Iterator; import java.util.Map; /** * Contains information about a ChatRoom. diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatRoomsManager.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatRoomsManager.java index 7a94391009..c9b48df996 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatRoomsManager.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatRoomsManager.java @@ -20,12 +20,8 @@ package org.bigbluebutton.conference.service.chat; import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.red5.logging.Red5LoggerFactory; - import net.jcip.annotations.ThreadSafe; - -import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** @@ -43,17 +39,17 @@ public class ChatRoomsManager { } public void addRoom(ChatRoom room) { - log.debug("In ChatRoomsManager adding room ${room.name}"); + log.debug("In ChatRoomsManager adding room {}", room.getName()); rooms.put(room.getName(), room); } public void removeRoom(String name) { - log.debug("In ChatRoomsManager remove room ${name}"); + log.debug("In ChatRoomsManager remove room {}", name); rooms.remove(name); } public boolean hasRoom(String name) { - log.debug("In ChatRoomsManager has Room ${name}"); + log.debug("In ChatRoomsManager has Room {}", name); return rooms.containsKey(name); } @@ -62,7 +58,7 @@ public class ChatRoomsManager { * Keeping getRoom private so that all access to ChatRoom goes through here. */ private ChatRoom getRoom(String name) { - log.debug("In ChatRoomsManager get room ${name}"); + log.debug("In ChatRoomsManager get room {}", name); return rooms.get(name); } @@ -71,7 +67,7 @@ public class ChatRoomsManager { if (r != null) { return r.getChatMessages(); } - log.warn("Getting messages from a non-existing room ${room}"); + log.warn("Getting messages from a non-existing room {}", room); return ""; } @@ -80,7 +76,7 @@ public class ChatRoomsManager { if (r != null) { r.sendMessage(message); } - log.warn("Sending message to a non-existing room ${room}"); + log.warn("Sending message to a non-existing room {}", room); } public void addRoomListener(String roomName, IChatRoomListener listener) { @@ -89,7 +85,7 @@ public class ChatRoomsManager { r.addRoomListener(listener); return; } - log.warn("Adding listener to a non-existing room ${roomName}"); + log.warn("Adding listener to a non-existing room {}", roomName); } //TODO: roomName? diff --git a/bigbluebutton-client/.actionScriptProperties b/bigbluebutton-client/.actionScriptProperties index 17fea4fa67..6fffbe8d0d 100755 --- a/bigbluebutton-client/.actionScriptProperties +++ b/bigbluebutton-client/.actionScriptProperties @@ -1,51 +1,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bigbluebutton-client/.flexProperties b/bigbluebutton-client/.flexProperties index afb930671b..eb94363b6e 100755 --- a/bigbluebutton-client/.flexProperties +++ b/bigbluebutton-client/.flexProperties @@ -1,2 +1,2 @@ - - + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as index 1153aa2947..811a62e207 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as @@ -97,8 +97,9 @@ package org.bigbluebutton.main.model.users LogUtil.debug(NAME + "::Connecting to " + uri + " [" + _conferenceParameters.username + "," + _conferenceParameters.role + "," + _conferenceParameters.conference + "," + _conferenceParameters.mode + "," + _conferenceParameters.room + "]"); - _netConnection.connect(uri, _conferenceParameters.username, _conferenceParameters.role, _conferenceParameters.conference, _conferenceParameters.mode, - _conferenceParameters.room, _conferenceParameters.voicebridge, false, _conferenceParameters.externUserID); + _netConnection.connect(uri, _conferenceParameters.username, _conferenceParameters.role, _conferenceParameters.conference, + _conferenceParameters.mode, _conferenceParameters.room, _conferenceParameters.voicebridge, + false, _conferenceParameters.externUserID); } catch( e : ArgumentError ) { // Invalid parameters.