You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2013/01/24 04:51:19 UTC
svn commit: r1437854 [2/2] - in /incubator/openmeetings/trunk/singlewebapp:
WebContent/WEB-INF/ src/org/apache/openmeetings/axis/services/
src/org/apache/openmeetings/cluster/sync/
src/org/apache/openmeetings/conference/whiteboard/ src/org/apache/openm...
Modified: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/red5/ScopeApplicationAdapter.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/red5/ScopeApplicationAdapter.java?rev=1437854&r1=1437853&r2=1437854&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/red5/ScopeApplicationAdapter.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/red5/ScopeApplicationAdapter.java Thu Jan 24 03:51:18 2013
@@ -47,14 +47,13 @@ import org.apache.openmeetings.documents
import org.apache.openmeetings.persistence.beans.basic.Server;
import org.apache.openmeetings.persistence.beans.calendar.Appointment;
import org.apache.openmeetings.persistence.beans.calendar.MeetingMember;
+import org.apache.openmeetings.persistence.beans.rooms.Client;
import org.apache.openmeetings.persistence.beans.rooms.Rooms;
import org.apache.openmeetings.persistence.beans.user.Users;
import org.apache.openmeetings.remote.FLVRecorderService;
import org.apache.openmeetings.remote.WhiteBoardService;
import org.apache.openmeetings.remote.util.SessionVariablesUtil;
-import org.apache.openmeetings.session.Client;
-import org.apache.openmeetings.session.IClientSession;
-import org.apache.openmeetings.session.ISessionStore;
+import org.apache.openmeetings.session.ISessionManager;
import org.apache.openmeetings.utils.OmFileHelper;
import org.apache.openmeetings.utils.math.CalendarPatterns;
import org.red5.logging.Red5LoggerFactory;
@@ -81,7 +80,7 @@ public class ScopeApplicationAdapter ext
OpenmeetingsVariables.webAppRootKey);
@Autowired
- private ISessionStore clientListManager;
+ private ISessionManager sessionManager;
@Autowired
private EmoticonsManager emoticonsManager;
@Autowired
@@ -185,7 +184,7 @@ public class ScopeApplicationAdapter ext
swfURL = conn.getConnectParams().get("swfUrl").toString();
}
- IClientSession rcm = this.clientListManager.addClientListItem(streamId,
+ Client rcm = this.sessionManager.addClientListItem(streamId,
conn.getScope().getName(), conn.getRemotePort(),
conn.getRemoteAddress(), swfURL, isAVClient);
@@ -207,7 +206,7 @@ public class ScopeApplicationAdapter ext
try {
IConnection current = Red5.getConnectionLocal();
- Client rc = clientListManager.getClientByStreamId(current.getClient().getId(), null);
+ Client rc = sessionManager.getClientByStreamId(current.getClient().getId(), null);
Map<String, String> returnMap = new HashMap<String, String>();
@@ -243,7 +242,7 @@ public class ScopeApplicationAdapter ext
}
if (changed) {
- clientListManager.updateClientByStreamId(rc.getStreamid(), rc, false);
+ sessionManager.updateClientByStreamId(rc.getStreamid(), rc, false);
if (!rc.isStartStreaming() && !rc.isStartRecording() && !rc.isStreamPublishStarted()) {
returnMap.put("result", "stopAll");
@@ -266,10 +265,10 @@ public class ScopeApplicationAdapter ext
List<Client> screenSharerList = new LinkedList<Client>();
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(streamid, null);
- for (Client rcl : clientListManager.getClientListByRoomAll(currentClient.getRoom_id(), null)) {
+ for (Client rcl : sessionManager.getClientListByRoomAll(currentClient.getRoom_id(), null)) {
if (rcl.isStartStreaming()) {
screenSharerList.add(rcl);
}
@@ -293,7 +292,7 @@ public class ScopeApplicationAdapter ext
log.debug("### setConnectionAsSharingClient: ");
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
if (currentClient != null) {
@@ -303,7 +302,7 @@ public class ScopeApplicationAdapter ext
boolean startStreaming = Boolean.valueOf("" + map.get(
"startStreaming"));
boolean startPublishing = Boolean.valueOf("" + map.get(
- "startPublishing")) && (0 == clientListManager.getPublishingCount(currentClient.getRoom_id()));
+ "startPublishing")) && (0 == sessionManager.getPublishingCount(currentClient.getRoom_id()));
currentClient.setRoom_id(Long.parseLong(current.getScope()
.getName()));
@@ -331,7 +330,7 @@ public class ScopeApplicationAdapter ext
currentClient.setOrganization_id(Long.parseLong(map.get(
"organization_id").toString()));
- this.clientListManager.updateClientByStreamId(current
+ this.sessionManager.updateClientByStreamId(current
.getClient().getId(), currentClient, false);
Map returnMap = new HashMap();
@@ -362,7 +361,7 @@ public class ScopeApplicationAdapter ext
currentClient.setStreamPublishName(map.get("publishName")
.toString());
- IClientSession currentScreenUser = this.clientListManager
+ Client currentScreenUser = this.sessionManager
.getClientByPublicSID(currentClient
.getStreamPublishName(), false, null);
@@ -371,7 +370,7 @@ public class ScopeApplicationAdapter ext
// This is duplicated, but its not sure that in the meantime
// somebody requests this Client Object Info
- this.clientListManager.updateClientByStreamId(current
+ this.sessionManager.updateClientByStreamId(current
.getClient().getId(), currentClient, false);
if (startStreaming) {
@@ -416,7 +415,7 @@ public class ScopeApplicationAdapter ext
for (Set<IConnection> conset : conCollection) {
for (IConnection conn : conset) {
if (conn != null) {
- IClientSession rcl = this.clientListManager
+ Client rcl = this.sessionManager
.getClientByStreamId(conn
.getClient().getId(), null);
if (rcl == null) {
@@ -449,9 +448,9 @@ public class ScopeApplicationAdapter ext
*/
public synchronized String getPublicSID() {
IConnection current = Red5.getConnectionLocal();
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
- clientListManager.updateClientByStreamId(current.getClient().getId(),
+ sessionManager.updateClientByStreamId(current.getClient().getId(),
currentClient, false);
return currentClient.getPublicSID();
}
@@ -465,13 +464,13 @@ public class ScopeApplicationAdapter ext
try {
IConnection current = Red5.getConnectionLocal();
IClient c = current.getClient();
- Client currentClient = clientListManager.getClientByStreamId(c.getId(), null);
+ Client currentClient = sessionManager.getClientByStreamId(c.getId(), null);
if (currentClient == null) {
return false;
}
SessionVariablesUtil.initClient(c, SessionVariablesUtil.isAVClient(c), newPublicSID);
currentClient.setPublicSID(newPublicSID);
- clientListManager.updateClientByStreamId(c.getId(), currentClient, false);
+ sessionManager.updateClientByStreamId(c.getId(), currentClient, false);
return true;
} catch (Exception err) {
log.error("[overwritePublicSID]", err);
@@ -492,7 +491,7 @@ public class ScopeApplicationAdapter ext
+ room.getClients().size() + " " + room.getContextPath()
+ " " + room.getName());
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(client.getId(), null);
// The Room Client can be null if the Client left the room by using
@@ -524,7 +523,7 @@ public class ScopeApplicationAdapter ext
log.debug(streamid + " is leaving");
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(streamid, null);
this.roomLeaveByScope(currentClient, current.getScope(), true);
@@ -604,7 +603,7 @@ public class ScopeApplicationAdapter ext
+ " client id "
+ cons.getClient().getId());
- IClientSession rcl = this.clientListManager
+ Client rcl = this.sessionManager
.getClientByStreamId(cons.getClient()
.getId(), null);
@@ -663,7 +662,7 @@ public class ScopeApplicationAdapter ext
}
if (removeUserFromSessionList) {
- this.clientListManager.removeClient(currentClient.getStreamid());
+ this.sessionManager.removeClient(currentClient.getStreamid());
}
} catch (Exception err) {
log.error("[roomLeaveByScope]", err);
@@ -683,12 +682,12 @@ public class ScopeApplicationAdapter ext
try {
IConnection current = Red5.getConnectionLocal();
String streamid = current.getClient().getId();
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(streamid, null);
//We make a second object the has the reference to the object
//that we will use to send to all participents
- IClientSession clientObjectSendToSync = currentClient;
+ Client clientObjectSendToSync = currentClient;
// Notify all the clients that the stream had been started
log.debug("start streamPublishStart broadcast start: "
@@ -699,13 +698,13 @@ public class ScopeApplicationAdapter ext
currentClient.setScreenPublishStarted(true);
- this.clientListManager.updateClientByStreamId(current
+ this.sessionManager.updateClientByStreamId(current
.getClient().getId(), currentClient, false);
}
//If its an audio/video client then send the session object with the full
//data to everybody
else if (currentClient.getIsAVClient()) {
- clientObjectSendToSync = this.clientListManager.getClientByPublicSID(
+ clientObjectSendToSync = this.sessionManager.getClientByPublicSID(
currentClient.getPublicSID(), false, null);
}
@@ -720,7 +719,7 @@ public class ScopeApplicationAdapter ext
if (conn != null) {
if (conn instanceof IServiceCapableConnection) {
- IClientSession rcl = this.clientListManager
+ Client rcl = this.sessionManager
.getClientByStreamId(conn.getClient()
.getId(), null);
@@ -798,7 +797,7 @@ public class ScopeApplicationAdapter ext
+ stream.getPublishedName());
try {
IConnection current = Red5.getConnectionLocal();
- IClientSession rcl = clientListManager.getClientByStreamId(current.getClient().getId(), null);
+ Client rcl = sessionManager.getClientByStreamId(current.getClient().getId(), null);
sendClientBroadcastNotifications(stream, "closeStream", rcl);
} catch (Exception e) {
log.error("[streamBroadcastClose]", e);
@@ -812,14 +811,14 @@ public class ScopeApplicationAdapter ext
*
*/
private synchronized void sendClientBroadcastNotifications(
- IBroadcastStream stream, String clientFunction, IClientSession rc) {
+ IBroadcastStream stream, String clientFunction, Client rc) {
try {
// Store the local so that we do not send notification to ourself
// back
IConnection current = Red5.getConnectionLocal();
String streamid = current.getClient().getId();
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(streamid, null);
if (currentClient == null) {
@@ -850,7 +849,7 @@ public class ScopeApplicationAdapter ext
// there is a Bug in the current implementation
// of the appDisconnect
if (clientFunction.equals("closeStream")) {
- IClientSession rcl = this.clientListManager
+ Client rcl = this.sessionManager
.getClientByStreamId(conn
.getClient().getId(), null);
if (clientFunction.equals("closeStream")
@@ -868,7 +867,7 @@ public class ScopeApplicationAdapter ext
}
continue;
} else {
- IClientSession rcl = this.clientListManager
+ Client rcl = this.sessionManager
.getClientByStreamId(conn.getClient()
.getId(), null);
if (rcl != null) {
@@ -919,7 +918,7 @@ public class ScopeApplicationAdapter ext
log.debug("*..*addModerator publicSID: " + publicSID);
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByPublicSID(publicSID, false, null);
if (currentClient == null) {
@@ -929,10 +928,10 @@ public class ScopeApplicationAdapter ext
currentClient.setIsMod(true);
// Put the mod-flag to true for this client
- this.clientListManager.updateClientByStreamId(
+ this.sessionManager.updateClientByStreamId(
currentClient.getStreamid(), currentClient, false);
- List<Client> currentMods = this.clientListManager
+ List<Client> currentMods = this.sessionManager
.getCurrentModeratorByRoom(room_id);
//Send message to all users
@@ -950,7 +949,7 @@ public class ScopeApplicationAdapter ext
IConnection current = Red5.getConnectionLocal();
String streamid = current.getClient().getId();
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(streamid, null);
@SuppressWarnings("rawtypes")
@@ -998,7 +997,7 @@ public class ScopeApplicationAdapter ext
IConnection current = Red5.getConnectionLocal();
// String streamid = current.getClient().getId();
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByPublicSID(publicSID, false, null);
if (currentClient == null) {
@@ -1008,10 +1007,10 @@ public class ScopeApplicationAdapter ext
currentClient.setIsMod(false);
// Put the mod-flag to true for this client
- this.clientListManager.updateClientByStreamId(
+ this.sessionManager.updateClientByStreamId(
currentClient.getStreamid(), currentClient, false);
- List<Client> currentMods = this.clientListManager
+ List<Client> currentMods = this.sessionManager
.getCurrentModeratorByRoom(room_id);
// Notify all clients of the same scope (room)
@@ -1052,7 +1051,7 @@ public class ScopeApplicationAdapter ext
IConnection current = Red5.getConnectionLocal();
// String streamid = current.getClient().getId();
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByPublicSID(publicSID, false, null);
if (currentClient == null) {
@@ -1063,7 +1062,7 @@ public class ScopeApplicationAdapter ext
currentClient.setInterviewPodId(interviewPodId);
// Put the mod-flag to true for this client
- this.clientListManager.updateClientByStreamId(
+ this.sessionManager.updateClientByStreamId(
currentClient.getStreamid(), currentClient, false);
// Notify all clients of the same scope (room)
@@ -1104,7 +1103,7 @@ public class ScopeApplicationAdapter ext
IConnection current = Red5.getConnectionLocal();
// String streamid = current.getClient().getId();
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByPublicSID(publicSID, false, null);
if (currentClient == null) {
@@ -1113,7 +1112,7 @@ public class ScopeApplicationAdapter ext
// Put the mod-flag to true for this client
currentClient.setMicMuted(false);
- this.clientListManager.updateClientByStreamId(
+ this.sessionManager.updateClientByStreamId(
currentClient.getStreamid(), currentClient, false);
// Notify all clients of the same scope (room)
@@ -1122,7 +1121,7 @@ public class ScopeApplicationAdapter ext
for (Set<IConnection> conset : conCollection) {
for (IConnection conn : conset) {
if (conn != null) {
- Client rcl = this.clientListManager
+ Client rcl = this.sessionManager
.getClientByStreamId(conn.getClient().getId(), null);
if (rcl == null) {
// continue;
@@ -1132,7 +1131,7 @@ public class ScopeApplicationAdapter ext
} else {
if (rcl != currentClient) {
rcl.setMicMuted(true);
- this.clientListManager.updateClientByStreamId(
+ this.sessionManager.updateClientByStreamId(
rcl.getStreamid(), rcl, false);
}
log.debug("Send Flag to Client: "
@@ -1159,14 +1158,14 @@ public class ScopeApplicationAdapter ext
try {
log.debug("*..*switchMicMuted publicSID: " + publicSID);
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByPublicSID(publicSID, false, null);
if (currentClient == null) {
return -1L;
}
currentClient.setMicMuted(mute);
- this.clientListManager.updateClientByStreamId(
+ this.sessionManager.updateClientByStreamId(
currentClient.getStreamid(), currentClient, false);
HashMap<Integer, Object> newMessage = new HashMap<Integer, Object>();
@@ -1182,7 +1181,7 @@ public class ScopeApplicationAdapter ext
public synchronized Boolean getMicMutedByPublicSID(String publicSID) {
try {
- IClientSession currentClient = this.clientListManager.getClientByPublicSID(publicSID, false, null);
+ Client currentClient = this.sessionManager.getClientByPublicSID(publicSID, false, null);
if (currentClient == null) {
return true;
}
@@ -1212,10 +1211,10 @@ public class ScopeApplicationAdapter ext
public synchronized Long applyForModeration(String publicSID) {
try {
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByPublicSID(publicSID, false, null);
- List<Client> currentModList = this.clientListManager
+ List<Client> currentModList = this.sessionManager
.getCurrentModeratorByRoom(currentClient.getRoom_id());
if (currentModList.size() > 0) {
@@ -1247,10 +1246,10 @@ public class ScopeApplicationAdapter ext
try {
IConnection current = Red5.getConnectionLocal();
String streamid = current.getClient().getId();
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(streamid, null);
currentClient.setBroadCastID(broadCastCounter++);
- this.clientListManager.updateClientByStreamId(streamid,
+ this.sessionManager.updateClientByStreamId(streamid,
currentClient, false);
return currentClient.getBroadCastID();
} catch (Exception err) {
@@ -1275,7 +1274,7 @@ public class ScopeApplicationAdapter ext
* @param interviewPodId
* @return RoomClient being updated in case of no errors, null otherwise
*/
- public synchronized IClientSession setUserAVSettings(String avsettings,
+ public synchronized Client setUserAVSettings(String avsettings,
Object newMessage, Integer vWidth, Integer vHeight,
long room_id, String publicSID, Integer interviewPodId) {
try {
@@ -1283,7 +1282,8 @@ public class ScopeApplicationAdapter ext
IConnection current = Red5.getConnectionLocal();
IClient c = current.getClient();
String streamid = c.getId();
- Client currentClient = clientListManager.getClientByStreamId(streamid, null);
+ Client currentClient = this.sessionManager
+ .getClientByStreamId(streamid, null);
currentClient.setAvsettings(avsettings);
currentClient.setRoom_id(room_id);
currentClient.setPublicSID(publicSID);
@@ -1291,7 +1291,8 @@ public class ScopeApplicationAdapter ext
currentClient.setVHeight(vHeight);
currentClient.setInterviewPodId(interviewPodId);
// Long room_id = currentClient.getRoom_id();
- clientListManager.updateAVClientByStreamId(streamid, currentClient);
+ this.sessionManager.updateAVClientByStreamId(streamid,
+ currentClient);
SessionVariablesUtil.initClient(c, false, publicSID);
HashMap<String, Object> hsm = new HashMap<String, Object>();
@@ -1343,7 +1344,7 @@ public class ScopeApplicationAdapter ext
// if this is a Moderated Room then the Room can be only
// locked off by the Moderator Bit
- List<Client> clientModeratorListRoom = this.clientListManager
+ List<Client> clientModeratorListRoom = this.sessionManager
.getCurrentModeratorByRoom(room_id);
// If there is no Moderator yet and we are asking for it
@@ -1395,7 +1396,7 @@ public class ScopeApplicationAdapter ext
* room is invoked "setNewModeratorByList" to notify them of the new
* moderator<br/>
* <br/>
- * And the end of the mechanism a push call with the new client-object
+ * At the end of the mechanism a push call with the new client-object
* and all the informations about the new user is send to every user of the
* current conference room<br/>
* <br/>
@@ -1417,7 +1418,7 @@ public class ScopeApplicationAdapter ext
IConnection current = Red5.getConnectionLocal();
String streamid = current.getClient().getId();
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(streamid, null);
currentClient.setRoom_id(room_id);
currentClient.setRoomEnter(new Date());
@@ -1439,7 +1440,7 @@ public class ScopeApplicationAdapter ext
// This can be set without checking for Moderation Flag
currentClient.setIsSuperModerator(isSuperModerator);
- this.clientListManager.updateClientByStreamId(streamid,
+ this.sessionManager.updateClientByStreamId(streamid,
currentClient, true);
Rooms room = roomDao.get(room_id);
@@ -1459,7 +1460,7 @@ public class ScopeApplicationAdapter ext
log.debug("##### setRoomValues : " + currentClient);
// Check for Moderation LogicalRoom ENTER
- List<Client> clientListRoom = clientListManager.getClientListByRoom(room_id, null);
+ List<Client> clientListRoom = sessionManager.getClientListByRoom(room_id, null);
// appointed meeting or moderated Room? => Check Max Users first
if (room.getNumberOfPartizipants() != null
@@ -1476,7 +1477,7 @@ public class ScopeApplicationAdapter ext
// if this is a Moderated Room then the Room can be only
// locked off by the Moderator Bit
// List<RoomClient> clientModeratorListRoom =
- // this.clientListManager.getCurrentModeratorByRoom(room_id);
+ // this.sessionManager.getCurrentModeratorByRoom(room_id);
// If there is no Moderator yet we have to check if the
// current User has the Bit set to true to
@@ -1490,10 +1491,10 @@ public class ScopeApplicationAdapter ext
// already somebody in the Room waiting
// Update the Client List
- this.clientListManager.updateClientByStreamId(streamid,
+ this.sessionManager.updateClientByStreamId(streamid,
currentClient, false);
- List<Client> modRoomList = this.clientListManager
+ List<Client> modRoomList = this.sessionManager
.getCurrentModeratorByRoom(currentClient.getRoom_id());
//Sync message to everybody
@@ -1523,10 +1524,10 @@ public class ScopeApplicationAdapter ext
currentClient.setIsMod(true);
// Update the Client List
- this.clientListManager.updateClientByStreamId(
+ this.sessionManager.updateClientByStreamId(
streamid, currentClient, false);
- List<Client> modRoomList = this.clientListManager
+ List<Client> modRoomList = this.sessionManager
.getCurrentModeratorByRoom(currentClient
.getRoom_id());
@@ -1548,7 +1549,7 @@ public class ScopeApplicationAdapter ext
}
// Update the Client List
- this.clientListManager.updateClientByStreamId(streamid,
+ this.sessionManager.updateClientByStreamId(streamid,
currentClient, false);
} else {
@@ -1590,10 +1591,10 @@ public class ScopeApplicationAdapter ext
currentClient.setIsMod(true);
// Update the Client List
- this.clientListManager.updateClientByStreamId(
+ this.sessionManager.updateClientByStreamId(
streamid, currentClient, false);
- List<Client> modRoomList = this.clientListManager
+ List<Client> modRoomList = this.sessionManager
.getCurrentModeratorByRoom(currentClient
.getRoom_id());
@@ -1604,7 +1605,7 @@ public class ScopeApplicationAdapter ext
syncMessageToCurrentScope("setNewModeratorByList", modRoomList, false);
moderator_set = true;
- this.clientListManager.updateClientByStreamId(
+ this.sessionManager.updateClientByStreamId(
streamid, currentClient, false);
break;
} else {
@@ -1612,7 +1613,7 @@ public class ScopeApplicationAdapter ext
+ userIdInRoomClient
+ " is NOT moderator due to flag in MeetingMember record");
currentClient.setIsMod(false);
- this.clientListManager.updateClientByStreamId(
+ this.sessionManager.updateClientByStreamId(
streamid, currentClient, false);
break;
}
@@ -1632,7 +1633,7 @@ public class ScopeApplicationAdapter ext
+ userIdInRoomClient
+ " could not be found as MeetingMember -> definitely no moderator");
currentClient.setIsMod(false);
- this.clientListManager.updateClientByStreamId(streamid,
+ this.sessionManager.updateClientByStreamId(streamid,
currentClient, false);
} else {
// if current user is part of the member list, but moderator
@@ -1642,10 +1643,10 @@ public class ScopeApplicationAdapter ext
currentClient.setIsMod(true);
// Update the Client List
- this.clientListManager.updateClientByStreamId(streamid,
+ this.sessionManager.updateClientByStreamId(streamid,
currentClient, false);
- List<Client> modRoomList = this.clientListManager
+ List<Client> modRoomList = this.sessionManager
.getCurrentModeratorByRoom(currentClient
.getRoom_id());
@@ -1656,7 +1657,7 @@ public class ScopeApplicationAdapter ext
//Sync message to everybody
syncMessageToCurrentScope("setNewModeratorByList", modRoomList, false);
- this.clientListManager.updateClientByStreamId(streamid,
+ this.sessionManager.updateClientByStreamId(streamid,
currentClient, false);
}
}
@@ -1699,13 +1700,13 @@ public class ScopeApplicationAdapter ext
* @param picture_uri
* @return client being updated in case of success, null otherwise
*/
- public synchronized IClientSession setUsernameReconnect(String SID,
+ public synchronized Client setUsernameReconnect(String SID,
Long userId, String username, String firstname, String lastname,
String picture_uri) {
try {
IConnection current = Red5.getConnectionLocal();
String streamid = current.getClient().getId();
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(streamid, null);
currentClient.setUsername(username);
@@ -1732,7 +1733,7 @@ public class ScopeApplicationAdapter ext
currentClient.setPicture_uri(us.getPictureuri());
}
}
- this.clientListManager.updateClientByStreamId(streamid,
+ this.sessionManager.updateClientByStreamId(streamid,
currentClient, false);
return currentClient;
} catch (Exception err) {
@@ -1751,12 +1752,12 @@ public class ScopeApplicationAdapter ext
* @param lastname - lastname of the user
* @return RoomClient in case of everything is OK, null otherwise
*/
- public synchronized IClientSession setUsernameAndSession(String SID,
+ public synchronized Client setUsernameAndSession(String SID,
Long userId, String username, String firstname, String lastname) {
try {
IConnection current = Red5.getConnectionLocal();
String streamid = current.getClient().getId();
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(streamid, null);
currentClient.setUsername(username);
@@ -1783,7 +1784,7 @@ public class ScopeApplicationAdapter ext
// set Picture-URI
currentClient.setPicture_uri(us.getPictureuri());
}
- this.clientListManager.updateClientByStreamId(streamid,
+ this.sessionManager.updateClientByStreamId(streamid,
currentClient, false);
return currentClient;
} catch (Exception err) {
@@ -1852,10 +1853,10 @@ public class ScopeApplicationAdapter ext
public synchronized List<Client> getCurrentModeratorList() {
try {
IConnection current = Red5.getConnectionLocal();
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
Long room_id = currentClient.getRoom_id();
- return this.clientListManager.getCurrentModeratorByRoom(room_id);
+ return this.sessionManager.getCurrentModeratorByRoom(room_id);
} catch (Exception err) {
log.error("[getCurrentModerator]", err);
}
@@ -1881,7 +1882,7 @@ public class ScopeApplicationAdapter ext
// Check if this User is the Mod:
IConnection current = Red5.getConnectionLocal();
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
if (currentClient == null) {
@@ -1964,7 +1965,7 @@ public class ScopeApplicationAdapter ext
// Check if this User is the Mod:
IConnection current = Red5.getConnectionLocal();
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
if (currentClient == null) {
@@ -2058,7 +2059,7 @@ public class ScopeApplicationAdapter ext
log.debug("*..*sendVars: " + vars);
try {
IConnection current = Red5.getConnectionLocal();
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
// Long room_id = currentClient.getRoom_id();
@@ -2282,7 +2283,7 @@ public class ScopeApplicationAdapter ext
public synchronized int sendMessageWithClientWithSyncObject(Object newMessage, boolean sync) {
try {
IConnection current = Red5.getConnectionLocal();
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
HashMap<String, Object> hsm = new HashMap<String, Object>();
@@ -2349,7 +2350,7 @@ public class ScopeApplicationAdapter ext
String clientId) {
try {
IConnection current = Red5.getConnectionLocal();
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
HashMap<String, Object> hsm = new HashMap<String, Object>();
@@ -2379,7 +2380,7 @@ public class ScopeApplicationAdapter ext
try {
//if the upload is locally, just proceed to the normal function
//Search for RoomClient on current server (serverId == null means it will look on the master for the RoomClient)
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByPublicSID(publicSID, false, null);
if (currentClient != null) {
@@ -2407,7 +2408,7 @@ public class ScopeApplicationAdapter ext
// log.debug("webAppKeyScope "+webAppKeyScope);
// Get Room Id to send it to the correct Scope
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByPublicSID(publicSID, false, null);
if (currentClient == null) {
@@ -2471,11 +2472,11 @@ public class ScopeApplicationAdapter ext
// log.debug("webAppKeyScope "+webAppKeyScope);
// Get Room Id to send it to the correct Scope
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByPublicSID(publicSID, false, null);
if (currentClient == null) {
- currentClient = clientListManager.getClientByUserId(user_id);
+ currentClient = sessionManager.getClientByUserId(user_id);
}
Collection<Set<IConnection>> conCollection = null;
@@ -2559,7 +2560,7 @@ public class ScopeApplicationAdapter ext
for (IConnection conn : conset) {
if (conn != null) {
- IClientSession rcl = this.clientListManager
+ Client rcl = this.sessionManager
.getClientByStreamId(conn.getClient().getId(),
null);
@@ -2595,7 +2596,7 @@ public class ScopeApplicationAdapter ext
for (IConnection conn : conset) {
if (conn != null) {
- IClientSession rcl = this.clientListManager
+ Client rcl = this.sessionManager
.getClientByStreamId(conn.getClient().getId(), null);
if (rcl.getIsRecording() != null
@@ -2607,13 +2608,13 @@ public class ScopeApplicationAdapter ext
}
}
- Client current_rcl = this.clientListManager
+ Client current_rcl = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
// Also set the Recording Flag to Record all Participants that enter
// later
current_rcl.setIsRecording(true);
- this.clientListManager.updateClientByStreamId(current.getClient()
+ this.sessionManager.updateClientByStreamId(current.getClient()
.getId(), current_rcl, false);
Map<String, String> interviewStatus = new HashMap<String, String>();
@@ -2703,7 +2704,7 @@ public class ScopeApplicationAdapter ext
for (IConnection conn : conset) {
if (conn != null) {
- Client rcl = this.clientListManager
+ Client rcl = this.sessionManager
.getClientByStreamId(conn.getClient().getId(), null);
if (rcl.getIsRecording() != null
@@ -2717,7 +2718,7 @@ public class ScopeApplicationAdapter ext
// Reset the Recording Flag to Record all
// Participants that enter later
- this.clientListManager.updateClientByStreamId(conn
+ this.sessionManager.updateClientByStreamId(conn
.getClient().getId(), rcl, false);
found = true;
@@ -2731,7 +2732,7 @@ public class ScopeApplicationAdapter ext
return false;
}
- Client currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
this.flvRecorderService.stopRecordAndSave(scope, currentClient,
@@ -2770,15 +2771,15 @@ public class ScopeApplicationAdapter ext
* Get all ClientList Objects of that room and domain Used in
* lz.applyForModeration.lzx
*
- * @return all ClientList Objects of that room and domain
+ * @return all ClientList Objects of that room
*/
public synchronized List<Client> getClientListScope() {
try {
IConnection current = Red5.getConnectionLocal();
- IClientSession currentClient = this.clientListManager
+ Client currentClient = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
- return clientListManager.getClientListByRoom(currentClient.getRoom_id(), null);
+ return sessionManager.getClientListByRoom(currentClient.getRoom_id(), null);
} catch (Exception err) {
log.debug("[getClientListScope]", err);
@@ -2844,11 +2845,11 @@ public class ScopeApplicationAdapter ext
*/
private List<Long> getVerifyedActiveRoomIds(Server s) {
- List<Long> result = new ArrayList<Long>(clientListManager.getActiveRoomIdsByServer(s));
+ List<Long> result = new ArrayList<Long>(sessionManager.getActiveRoomIdsByServer(s));
//verify
for (Iterator<Long> i = result.iterator(); i.hasNext();) {
Long id = i.next();
- List<Client> rcs = clientListManager.getClientListByRoom(id, s);
+ List<Client> rcs = sessionManager.getClientListByRoom(id, s);
if (rcs.size() == 0 || (rcs.size() == 1 && rcs.get(0).isSipTransport())) {
i.remove();
}
@@ -2867,12 +2868,12 @@ public class ScopeApplicationAdapter ext
public synchronized void updateSipTransport() {
IConnection current = Red5.getConnectionLocal();
String streamid = current.getClient().getId();
- Client currentClient = this.clientListManager.getClientByStreamId(streamid, null);
+ Client currentClient = this.sessionManager.getClientByStreamId(streamid, null);
log.debug("getSipConferenceMembersNumber: " + roommanagement.getSipConferenceMembersNumber(currentClient.getRoom_id()));
String newNumber = "("+Integer.toString(roommanagement.getSipConferenceMembersNumber(currentClient.getRoom_id())-1)+")";
if(!newNumber.equals(currentClient.getLastname())) {
currentClient.setLastname(newNumber);
- this.clientListManager.updateClientByStreamId(streamid, currentClient, false);
+ this.sessionManager.updateClientByStreamId(streamid, currentClient, false);
log.debug("updateSipTransport: {}, {}, {}, {}", new Object[]{currentClient.getPublicSID(),
currentClient.getRoom_id(), currentClient.getFirstname(), currentClient.getLastname()});
sendMessageWithClient(new String[]{"personal",currentClient.getFirstname(),currentClient.getLastname()});
@@ -2886,7 +2887,7 @@ public class ScopeApplicationAdapter ext
public synchronized void joinToConfCall(String number) {
IConnection current = Red5.getConnectionLocal();
String streamid = current.getClient().getId();
- IClientSession currentClient = this.clientListManager.getClientByStreamId(streamid, null);
+ Client currentClient = this.sessionManager.getClientByStreamId(streamid, null);
try {
String sipNumber = getSipNumber(currentClient.getRoom_id());
log.debug("asterisk -rx \"originate Local/" + number + "@rooms extension " + sipNumber + "@rooms\"");
@@ -2907,10 +2908,10 @@ public class ScopeApplicationAdapter ext
public synchronized void setSipTransport(Long room_id, String publicSID, String broadCastId) {
IConnection current = Red5.getConnectionLocal();
- IClient c = current.getClient();
+ IClient c = current.getClient();
String streamid = c.getId();
// Notify all clients of the same scope (room)
- Client currentClient = clientListManager.getClientByStreamId(streamid, null);
+ Client currentClient = this.sessionManager.getClientByStreamId(streamid, null);
currentClient.setRoom_id(room_id);
currentClient.setRoomEnter(new Date());
currentClient.setFirstname("SIP Transport");
@@ -2922,8 +2923,9 @@ public class ScopeApplicationAdapter ext
currentClient.setVWidth(120);
currentClient.setVHeight(90);
currentClient.setSipTransport(true);
- clientListManager.updateClientByStreamId(streamid, currentClient, false);
- SessionVariablesUtil.initClient(c, false, publicSID); //TODO not sure if this should be marked as AVClient or not
+ this.sessionManager.updateClientByStreamId(streamid, currentClient, false);
+ SessionVariablesUtil.initClient(c, false, publicSID); //TODO not sure if this should be marked as AVClient or not
+
Collection<Set<IConnection>> conCollection = current
.getScope().getConnections();
@@ -2939,7 +2941,7 @@ public class ScopeApplicationAdapter ext
continue;
}
- if (!client.getId().equals(c.getId())) {
+ if (!client.getId().equals(current.getClient().getId())) {
// It is not needed to send back
// that event to the actual
// Moderator
Modified: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/ImportController.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/ImportController.java?rev=1437854&r1=1437853&r2=1437854&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/ImportController.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/ImportController.java Thu Jan 24 03:51:18 2013
@@ -25,7 +25,6 @@ import javax.servlet.http.HttpServletReq
import javax.servlet.http.HttpServletResponse;
import org.apache.openmeetings.OpenmeetingsVariables;
-import org.apache.openmeetings.data.user.dao.UsersDao;
import org.apache.openmeetings.documents.beans.UploadCompleteMessage;
import org.apache.openmeetings.remote.red5.ScopeApplicationAdapter;
import org.apache.openmeetings.xmlimport.LanguageImport;
@@ -43,8 +42,6 @@ public class ImportController extends Ab
OpenmeetingsVariables.webAppRootKey);
@Autowired
- private UsersDao usersDao;
- @Autowired
private ScopeApplicationAdapter scopeApplicationAdapter;
@Autowired
private UserImport userImport;
Modified: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/ScreenController.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/ScreenController.java?rev=1437854&r1=1437853&r2=1437854&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/ScreenController.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/ScreenController.java Thu Jan 24 03:51:18 2013
@@ -33,8 +33,8 @@ import org.apache.openmeetings.Openmeeti
import org.apache.openmeetings.data.basic.Fieldmanagment;
import org.apache.openmeetings.data.basic.Sessionmanagement;
import org.apache.openmeetings.data.basic.dao.ConfigurationDao;
-import org.apache.openmeetings.session.IClientSession;
-import org.apache.openmeetings.session.ISessionStore;
+import org.apache.openmeetings.persistence.beans.rooms.Client;
+import org.apache.openmeetings.session.ISessionManager;
import org.apache.openmeetings.utils.OmFileHelper;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
@@ -53,7 +53,7 @@ public class ScreenController {
ScreenController.class, OpenmeetingsVariables.webAppRootKey);
@Autowired
- private ISessionStore clientListManager;
+ private ISessionManager sessionManager;
@Autowired
public Sessionmanagement sessionManagement;
@Autowired
@@ -182,14 +182,14 @@ public class ScreenController {
if (port == null) {
throw new Exception("port is empty: ");
}
- IClientSession rc = clientListManager.getClientByPublicSID(publicSID, false, null);
+ Client rc = sessionManager.getClientByPublicSID(publicSID, false, null);
if (rc == null) {
throw new Exception("port is empty: ");
}
Long roomId = rc.getRoom_id();
boolean allowRecording = rc.getAllowRecording()
- && (0 == clientListManager.getRecordingCount(roomId));
- boolean allowPublishing = (0 == clientListManager
+ && (0 == sessionManager.getRecordingCount(roomId));
+ boolean allowPublishing = (0 == sessionManager
.getPublishingCount(roomId));
Context ctx = new VelocityContext();
Modified: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ClientSessionInfo.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ClientSessionInfo.java?rev=1437854&r1=1437853&r2=1437854&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ClientSessionInfo.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ClientSessionInfo.java Thu Jan 24 03:51:18 2013
@@ -18,22 +18,24 @@
*/
package org.apache.openmeetings.session;
+import org.apache.openmeetings.persistence.beans.rooms.Client;
+
public class ClientSessionInfo {
- private IClientSession rcl;
+ private Client rcl;
public Long serverId;
- public ClientSessionInfo(IClientSession rcl, Long serverId) {
+ public ClientSessionInfo(Client rcl, Long serverId) {
super();
this.rcl = rcl;
this.serverId = serverId;
}
- public IClientSession getRcl() {
+ public Client getRcl() {
return rcl;
}
- public void setRcl(IClientSession rcl) {
+ public void setRcl(Client rcl) {
this.rcl = rcl;
}
public Long getServerId() {
Copied: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ISessionManager.java (from r1437706, incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ISessionStore.java)
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ISessionManager.java?p2=incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ISessionManager.java&p1=incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ISessionStore.java&r1=1437706&r2=1437854&rev=1437854&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ISessionStore.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ISessionManager.java Thu Jan 24 03:51:18 2013
@@ -24,9 +24,17 @@ import java.util.Set;
import org.apache.openmeetings.data.beans.basic.SearchResult;
import org.apache.openmeetings.persistence.beans.basic.Server;
+import org.apache.openmeetings.persistence.beans.rooms.Client;
import org.apache.openmeetings.remote.red5.ScopeApplicationAdapter;
-public interface ISessionStore {
+/**
+ * Methods to add/get/remove {@link Client}s to the session
+ *
+ *
+ * @author sebawagner
+ *
+ */
+public interface ISessionManager {
/**
* Get current clients and extends the room client with its potential
@@ -36,7 +44,7 @@ public interface ISessionStore {
* @param server TODO
* @return
*/
- public abstract IClientSession addClientListItem(String streamId,
+ public abstract Client addClientListItem(String streamId,
String scopeName, Integer remotePort, String remoteAddress,
String swfUrl, boolean isAVClient);
@@ -62,7 +70,7 @@ public interface ISessionStore {
* @param streamId
* @return
*/
- public abstract IClientSession getSyncClientByStreamId(String streamId);
+ public abstract Client getSyncClientByStreamId(String streamId);
/**
* get a client by its publicSID and the server,
@@ -100,7 +108,7 @@ public interface ISessionStore {
* @deprecated There could be multiple users logged in with the same userid,
* then this call would return a list not a single user
*/
- public abstract IClientSession getClientByUserId(Long userId);
+ public abstract Client getClientByUserId(Long userId);
/**
* Update the session object of the audio/video-connection and additionally
@@ -147,7 +155,7 @@ public interface ISessionStore {
* @return
*/
public abstract List<Client> getClientListByRoom(Long room_id, Server server);
-
+
public abstract Collection<Client> getClientListByRoomAll(Long room_id, Server server);
/**
@@ -167,7 +175,7 @@ public interface ISessionStore {
* @param asc
* @return
*/
- public abstract SearchResult<ClientSession> getListByStartAndMax(int start,
+ public abstract SearchResult<ServerSession> getListByStartAndMax(int start,
int max, String orderby, boolean asc);
/**
Copied: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ServerSession.java (from r1437706, incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ClientSession.java)
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ServerSession.java?p2=incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ServerSession.java&p1=incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ClientSession.java&r1=1437706&r2=1437854&rev=1437854&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ClientSession.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ServerSession.java Thu Jan 24 03:51:18 2013
@@ -19,15 +19,16 @@
package org.apache.openmeetings.session;
import org.apache.openmeetings.persistence.beans.basic.Server;
+import org.apache.openmeetings.persistence.beans.rooms.Client;
/**
*
- * Session object, is never populated to the clients, stays on the server
+ * Session object including the server info
*
* So in this object you can store meta information that the client does not
- * need to know. This is handy because the {@link IClientSession} object otherwise gets too
+ * need to know. This is handy because the {@link Client} object otherwise gets too
* big.
*
* For example the {@link Server} can be referenced here.
@@ -35,7 +36,7 @@ import org.apache.openmeetings.persisten
* @author sebawagner
*
*/
-public class ClientSession {
+public class ServerSession {
/**
* if null, the connection is handled on the master, otherwise the
@@ -43,16 +44,16 @@ public class ClientSession {
*/
private Long server;
- private IClientSession roomClient;
+ private Client roomClient;
- public ClientSession(Long server, IClientSession roomClient) {
+ public ServerSession(Long server, Client roomClient) {
super();
this.server = server;
this.roomClient = roomClient;
}
/**
- * @see ClientSession#server
+ * @see ServerSession#server
*/
public Long getServer() {
return server;
@@ -62,11 +63,11 @@ public class ClientSession {
this.server = server;
}
- public IClientSession getRoomClient() {
+ public Client getRoomClient() {
return roomClient;
}
- public void setRoomClient(IClientSession roomClient) {
+ public void setRoomClient(Client roomClient) {
this.roomClient = roomClient;
}
Copied: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/SessionManager.java (from r1437706, incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ClientHashMapStore.java)
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/SessionManager.java?p2=incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/SessionManager.java&p1=incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ClientHashMapStore.java&r1=1437706&r2=1437854&rev=1437854&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/ClientHashMapStore.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/SessionManager.java Thu Jan 24 03:51:18 2013
@@ -35,7 +35,9 @@ import java.util.Set;
import org.apache.openmeetings.OpenmeetingsVariables;
import org.apache.openmeetings.data.beans.basic.SearchResult;
import org.apache.openmeetings.persistence.beans.basic.Server;
-import org.apache.openmeetings.session.cache.HashMapStore;
+import org.apache.openmeetings.persistence.beans.rooms.Client;
+import org.apache.openmeetings.session.store.HashMapStore;
+import org.apache.openmeetings.session.store.IClientPersistenceStore;
import org.apache.openmeetings.utils.crypt.ManageCryptStyle;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
@@ -47,19 +49,19 @@ import org.springframework.beans.factory
* @author sebawagner
*
*/
-public class ClientHashMapStore implements ISessionStore {
+public class SessionManager implements ISessionManager {
protected static final Logger log = Red5LoggerFactory.getLogger(
- ClientHashMapStore.class, OpenmeetingsVariables.webAppRootKey);
+ SessionManager.class, OpenmeetingsVariables.webAppRootKey);
- protected static HashMapStore cache = new HashMapStore();
+ protected static IClientPersistenceStore cache = new HashMapStore();
private static Set<Long> EMPTY_HASH_SET = new HashSet<Long>();
@Autowired
private ManageCryptStyle manageCryptStyle;
- public synchronized IClientSession addClientListItem(String streamId,
+ public synchronized Client addClientListItem(String streamId,
String scopeName, Integer remotePort, String remoteAddress,
String swfUrl, boolean isAVClient) {
try {
@@ -116,14 +118,14 @@ public class ClientHashMapStore implemen
return null;
}
- public synchronized IClientSession getSyncClientByStreamId(String streamId) {
+ public synchronized Client getSyncClientByStreamId(String streamId) {
try {
if (!cache.containsKey(null, streamId)) {
log.debug("Tried to get a non existing Client " + streamId);
return null;
}
- IClientSession rcl = cache.get(null, streamId);
+ Client rcl = cache.get(null, streamId);
if (rcl == null) {
return null;
@@ -157,7 +159,7 @@ public class ClientHashMapStore implemen
public ClientSessionInfo getClientByPublicSIDAnyServer(String publicSID, boolean isAVClient) {
try {
for (Entry<Long,List<Client>> entry : cache.getClientsByPublicSID(publicSID).entrySet()) {
- for (IClientSession rcl : entry.getValue()) {
+ for (Client rcl : entry.getValue()) {
if (rcl.getIsAVClient() != isAVClient) {
continue;
}
@@ -170,9 +172,9 @@ public class ClientHashMapStore implemen
return null;
}
- public synchronized IClientSession getClientByUserId(Long userId) {
+ public synchronized Client getClientByUserId(Long userId) {
try {
- for (IClientSession rcl : cache.getClientsByUserId(null, userId)) {
+ for (Client rcl : cache.getClientsByUserId(null, userId)) {
if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
continue;
@@ -204,7 +206,7 @@ public class ClientHashMapStore implemen
rclUsual.setVWidth(rcm.getVWidth());
rclUsual.setVX(rcm.getVX());
rclUsual.setVY(rcm.getVY());
- IClientSession rclSaved = cache.get(null, rclUsual.getStreamid());
+ Client rclSaved = cache.get(null, rclUsual.getStreamid());
if (rclSaved != null) {
cache.put(null,rclUsual.getStreamid(), rclUsual);
} else {
@@ -224,7 +226,7 @@ public class ClientHashMapStore implemen
Client rcm, boolean updateRoomCount) {
try {
- IClientSession rclSaved = cache.get(null, streamId);
+ Client rclSaved = cache.get(null, streamId);
if (rclSaved != null) {
cache.put(null, streamId, rcm);
@@ -278,6 +280,33 @@ public class ClientHashMapStore implemen
}
return roomClientList;
}
+
+ public List<Client> getClientSessionListByRoom(Long roomId,
+ Server server) {
+ ArrayList<Client> roomClientList = new ArrayList<Client>();
+ try {
+
+ for (Client rcl : cache.getClientsByRoomId(server, roomId).values()) {
+
+ if (rcl.getIsScreenClient() == null || rcl.getIsScreenClient()) {
+ continue;
+ }
+ if (rcl.getIsAVClient()) {
+ continue;
+ }
+
+ // Only parse really those users out that are really a full session object
+ // and no pseudo session object like the audio/video or screen
+ // sharing connection
+ roomClientList.add(rcl);
+
+ }
+ } catch (Exception err) {
+ log.error("[getClientListByRoom]", err);
+ }
+ return roomClientList;
+ }
+
public synchronized Collection<Client> getClientListByRoomAll(Long roomId, Server server) {
try {
@@ -301,17 +330,17 @@ public class ClientHashMapStore implemen
}
// FIXME not sorted
- public synchronized SearchResult<ClientSession> getListByStartAndMax(
+ public synchronized SearchResult<ServerSession> getListByStartAndMax(
int start, int max, String orderby, boolean asc) {
- SearchResult<ClientSession> sResult = new SearchResult<ClientSession>();
+ SearchResult<ServerSession> sResult = new SearchResult<ServerSession>();
sResult.setObjectName(Client.class.getName());
sResult.setRecords(Long.valueOf(cache.size()).longValue());
- ArrayList<ClientSession> myList = new ArrayList<ClientSession>(cache.size());
+ ArrayList<ServerSession> myList = new ArrayList<ServerSession>(cache.size());
//FIXME: Improve the handling of the Arrays/Map/List so that this re-parsing is not needed
for (Entry<Long, LinkedHashMap<String, Client>> entry : cache.values().entrySet()) {
- for (IClientSession rcl : entry.getValue().values()) {
- myList.add(new ClientSession(entry.getKey(), rcl));
+ for (Client rcl : entry.getValue().values()) {
+ myList.add(new ServerSession(entry.getKey(), rcl));
}
}
@@ -322,7 +351,7 @@ public class ClientHashMapStore implemen
public long getRecordingCount(long roomId) {
List<Client> currentClients = this.getClientListByRoom(roomId, null);
int numberOfRecordingUsers = 0;
- for (IClientSession rcl : currentClients) {
+ for (Client rcl : currentClients) {
if (rcl.isStartRecording()) {
numberOfRecordingUsers++;
}
@@ -333,7 +362,7 @@ public class ClientHashMapStore implemen
public long getPublishingCount(long roomId) {
List<Client> currentClients = this.getClientListByRoom(roomId, null);
int numberOfPublishingUsers = 0;
- for (IClientSession rcl : currentClients) {
+ for (Client rcl : currentClients) {
if (rcl.isStreamPublishStarted()) {
numberOfPublishingUsers++;
}
@@ -350,11 +379,11 @@ public class ClientHashMapStore implemen
public String getSessionStatistics() {
- return cache.getDebugInformation(Arrays.asList(HashMapStore.DEBUG_DETAILS.SIZE,
- HashMapStore.DEBUG_DETAILS.CLIENT_BY_STREAMID,
- HashMapStore.DEBUG_DETAILS.CLIENT_BY_PUBLICSID,
- HashMapStore.DEBUG_DETAILS.CLIENT_BY_USERID,
- HashMapStore.DEBUG_DETAILS.CLIENT_BY_ROOMID));
+ return cache.getDebugInformation(Arrays.asList(IClientPersistenceStore.DEBUG_DETAILS.SIZE,
+ IClientPersistenceStore.DEBUG_DETAILS.CLIENT_BY_STREAMID,
+ IClientPersistenceStore.DEBUG_DETAILS.CLIENT_BY_PUBLICSID,
+ IClientPersistenceStore.DEBUG_DETAILS.CLIENT_BY_USERID,
+ IClientPersistenceStore.DEBUG_DETAILS.CLIENT_BY_ROOMID));
}
}
Added: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/DatabaseStore.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/DatabaseStore.java?rev=1437854&view=auto
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/DatabaseStore.java (added)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/DatabaseStore.java Thu Jan 24 03:51:18 2013
@@ -0,0 +1,84 @@
+package org.apache.openmeetings.session.store;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.openmeetings.persistence.beans.basic.Server;
+import org.apache.openmeetings.persistence.beans.rooms.Client;
+
+public class DatabaseStore implements IClientPersistenceStore {
+
+ public void put(Server server, String streamId, Client rcl) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean containsKey(Server server, String streamId) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Client get(Server server, String streamId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<Client> getClientsByPublicSID(Server server, String publicSID) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Map<Long, List<Client>> getClientsByPublicSID(String publicSID) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public LinkedHashMap<String, Client> getClientsByServer(Server server) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<Client> getClientsByUserId(Server server, Long userId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public LinkedHashMap<String, Client> getClientsByRoomId(Server server,
+ Long roomId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void remove(Server server, String streamId) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public int size() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int sizeByServer(Server server) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public LinkedHashMap<Long, LinkedHashMap<String, Client>> getClientsByServerAndRoom(
+ Server server) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public LinkedHashMap<Long, LinkedHashMap<String, Client>> values() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getDebugInformation(List<DEBUG_DETAILS> detailLevel) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Copied: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/HashMapStore.java (from r1437706, incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/cache/HashMapStore.java)
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/HashMapStore.java?p2=incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/HashMapStore.java&p1=incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/cache/HashMapStore.java&r1=1437706&r2=1437854&rev=1437854&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/cache/HashMapStore.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/HashMapStore.java Thu Jan 24 03:51:18 2013
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.openmeetings.session.cache;
+package org.apache.openmeetings.session.store;
import java.util.ArrayList;
import java.util.HashMap;
@@ -27,16 +27,16 @@ import java.util.Map.Entry;
import org.apache.openmeetings.OpenmeetingsVariables;
import org.apache.openmeetings.persistence.beans.basic.Server;
-import org.apache.openmeetings.session.Client;
-import org.apache.openmeetings.session.IClientSession;
+import org.apache.openmeetings.persistence.beans.rooms.Client;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
/**
+ * Stores the session in the memory.
+ * Is NOT designed to be clustered across multiple servers.
+ *
* This is actually some maps, a single map is not enough, cause we have
- * multiple keys and multiple views on that list. And also we have combined
- * keys, for example server + streamId is unique. But the streamId as-is can
- * be available multiple times.
+ * multiple keys and multiple views on that list.
*
* There are multiple ways to organize a Map by multiple keys, one is to have
* multiple lists, for every key needed, there is a separated list.
@@ -52,7 +52,7 @@ import org.slf4j.Logger;
* @author sebawagner
*
*/
-public class HashMapStore {
+public class HashMapStore implements IClientPersistenceStore {
protected static final Logger log = Red5LoggerFactory.getLogger(
HashMapStore.class, OpenmeetingsVariables.webAppRootKey);
@@ -110,11 +110,8 @@ public class HashMapStore {
return server.getId();
}
- /**
- *
- * @param server
- * @param streamId
- * @param rcl
+ /* (non-Javadoc)
+ * @see org.apache.openmeetings.session.memory.IClientPersistence#put(org.apache.openmeetings.persistence.beans.basic.Server, java.lang.String, org.apache.openmeetings.persistence.beans.rooms.Client)
*/
public void put(Server server, String streamId, Client rcl) {
@@ -198,11 +195,9 @@ public class HashMapStore {
}
}
- /**
- *
- * @param server
- * @param streamId
- * @return
+ /*
+ * (non-Javadoc)
+ * @see org.apache.openmeetings.session.IClientPersistenceManager#containsKey(org.apache.openmeetings.persistence.beans.basic.Server, java.lang.String)
*/
public boolean containsKey(Server server, String streamId) {
if (clientsByServer.containsKey(getIdByServer(server))) {
@@ -211,12 +206,8 @@ public class HashMapStore {
return false;
}
- /**
- * by server and publicSID
- *
- * @param server
- * @param streamId
- * @return will return null if the client does not exist in the list
+ /* (non-Javadoc)
+ * @see org.apache.openmeetings.session.memory.IClientPersistence#get(org.apache.openmeetings.persistence.beans.basic.Server, java.lang.String)
*/
public Client get(Server server, String streamId) {
LinkedHashMap<String, Client> listMap = clientsByServer.get(getIdByServer(server));
@@ -226,11 +217,8 @@ public class HashMapStore {
return null;
}
- /**
- *
- * @param server
- * @param publicSID
- * @return will return an empty list if nothing available
+ /* (non-Javadoc)
+ * @see org.apache.openmeetings.session.memory.IClientPersistence#getClientsByPublicSID(org.apache.openmeetings.persistence.beans.basic.Server, java.lang.String)
*/
public List<Client> getClientsByPublicSID(Server server, String publicSID) {
LinkedHashMap<String, List<Client>> clientListPublicSID = clientsByServerAndPublicSID.get(getIdByServer(server));
@@ -244,11 +232,8 @@ public class HashMapStore {
return clientList;
}
- /**
- * Searches for the publicSID across all servers
- *
- * @param publicSID
- * @return will return a map with the serverId as key and the RoomClients as list in the value
+ /* (non-Javadoc)
+ * @see org.apache.openmeetings.session.memory.IClientPersistence#getClientsByPublicSID(java.lang.String)
*/
public Map<Long,List<Client>> getClientsByPublicSID(String publicSID) {
Map<Long,List<Client>> clientList = new HashMap<Long,List<Client>>();
@@ -261,11 +246,8 @@ public class HashMapStore {
return clientList;
}
- /**
- * get all clients by a specific {@link Server}
- *
- * @param server
- * @return will return an empty map if nothing available
+ /* (non-Javadoc)
+ * @see org.apache.openmeetings.session.memory.IClientPersistence#getClientsByServer(org.apache.openmeetings.persistence.beans.basic.Server)
*/
public LinkedHashMap<String, Client> getClientsByServer(Server server) {
LinkedHashMap<String, Client> listMap = clientsByServer.get(getIdByServer(server));
@@ -275,11 +257,8 @@ public class HashMapStore {
return listMap;
}
- /**
- *
- * @param server
- * @param userId
- * @return will return an empty list if nothing available
+ /* (non-Javadoc)
+ * @see org.apache.openmeetings.session.memory.IClientPersistence#getClientsByUserId(org.apache.openmeetings.persistence.beans.basic.Server, java.lang.Long)
*/
public List<Client> getClientsByUserId(Server server, Long userId) {
LinkedHashMap<Long, List<Client>> clientListUserId = clientsByServerAndUserId.get(getIdByServer(server));
@@ -293,15 +272,8 @@ public class HashMapStore {
return clientList;
}
- /**
- *
- * We ignore the server here, cause ONE room can only be on ONE server and often we don't know where.
- * However at a later stage clients might be on different servers and still in the save room
- * so we keep that parameter for now
- *
- * @param server
- * @param roomId
- * @return will return an empty map if nothing available
+ /* (non-Javadoc)
+ * @see org.apache.openmeetings.session.memory.IClientPersistence#getClientsByRoomId(org.apache.openmeetings.persistence.beans.basic.Server, java.lang.Long)
*/
public LinkedHashMap<String, Client> getClientsByRoomId(Server server, Long roomId) {
@@ -315,6 +287,9 @@ public class HashMapStore {
return EMPTY_MAP;
}
+ /* (non-Javadoc)
+ * @see org.apache.openmeetings.session.memory.IClientPersistence#remove(org.apache.openmeetings.persistence.beans.basic.Server, java.lang.String)
+ */
public void remove(Server server, String streamId) {
// By server and streamid
@@ -325,7 +300,7 @@ public class HashMapStore {
if (clientList == null) {
clientList = new LinkedHashMap<String, Client>();
}
- IClientSession rcl = clientList.get(streamId);
+ Client rcl = clientList.get(streamId);
if (rcl == null) {
throw new NullPointerException("Could not find RoomClient with that streamId: "+streamId);
@@ -426,6 +401,9 @@ public class HashMapStore {
}
+ /* (non-Javadoc)
+ * @see org.apache.openmeetings.session.memory.IClientPersistence#size()
+ */
public int size() {
int size = 0;
for (Entry<Long, LinkedHashMap<String, Client>> entry : clientsByServer.entrySet()) {
@@ -434,6 +412,9 @@ public class HashMapStore {
return size;
}
+ /* (non-Javadoc)
+ * @see org.apache.openmeetings.session.memory.IClientPersistence#sizeByServer(org.apache.openmeetings.persistence.beans.basic.Server)
+ */
public int sizeByServer(Server server) {
if (clientsByServer.get(getIdByServer(server)) == null) {
return 0;
@@ -441,10 +422,17 @@ public class HashMapStore {
return clientsByServer.get(getIdByServer(server)).size();
}
+ /*
+ * (non-Javadoc)
+ * @see org.apache.openmeetings.session.IClientPersistenceManager#values()
+ */
public LinkedHashMap<Long, LinkedHashMap<String, Client>> values() {
return clientsByServer;
}
+ /* (non-Javadoc)
+ * @see org.apache.openmeetings.session.memory.IClientPersistence#getClientsByServerAndRoom(org.apache.openmeetings.persistence.beans.basic.Server)
+ */
public LinkedHashMap<Long,LinkedHashMap<String,Client>> getClientsByServerAndRoom(Server server) {
return clientsByServerAndRoomId.get(getIdByServer(server));
}
@@ -453,14 +441,6 @@ public class HashMapStore {
// return clientsByServerAndRoomId.get(getIdByServer(server)).keySet();
// }
- public enum DEBUG_DETAILS {
- SIZE,
- CLIENT_BY_STREAMID, STREAMID_LIST_ALL,
- CLIENT_BY_PUBLICSID, PUBLICSID_LIST_ALL,
- CLIENT_BY_USERID, USERID_LIST_ALL,
- CLIENT_BY_ROOMID, ROOMID_LIST_ALL
- }
-
public int getTotalNumberOfSessions() {
int t = 0;
for (Entry<Long, LinkedHashMap<String, Client>> entry : values().entrySet()) {
@@ -476,18 +456,14 @@ public class HashMapStore {
* @param detailLevel
*/
public void printDebugInformation(List<DEBUG_DETAILS> detailLevel) {
-
log.debug("Session Statistics Start ################## ");
log.debug(getDebugInformation(detailLevel));
log.debug("Session Statistics End ################## ");
-
}
- /**
- * Get some session statistics
- *
- * @param detailLevel
- * @return
+ /*
+ * (non-Javadoc)
+ * @see org.apache.openmeetings.session.IClientPersistenceManager#getDebugInformation(java.util.List)
*/
public String getDebugInformation(List<DEBUG_DETAILS> detailLevel) {
Added: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/IClientPersistenceStore.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/IClientPersistenceStore.java?rev=1437854&view=auto
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/IClientPersistenceStore.java (added)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/session/store/IClientPersistenceStore.java Thu Jan 24 03:51:18 2013
@@ -0,0 +1,112 @@
+package org.apache.openmeetings.session.store;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.openmeetings.persistence.beans.basic.Server;
+import org.apache.openmeetings.persistence.beans.rooms.Client;
+
+public interface IClientPersistenceStore {
+
+ public enum DEBUG_DETAILS {
+ SIZE,
+ CLIENT_BY_STREAMID, STREAMID_LIST_ALL,
+ CLIENT_BY_PUBLICSID, PUBLICSID_LIST_ALL,
+ CLIENT_BY_USERID, USERID_LIST_ALL,
+ CLIENT_BY_ROOMID, ROOMID_LIST_ALL
+ }
+
+ /**
+ *
+ * @param server
+ * @param streamId
+ * @param rcl
+ */
+ public abstract void put(Server server, String streamId, Client rcl);
+
+ /**
+ *
+ * @param server
+ * @param streamId
+ * @return
+ */
+ public boolean containsKey(Server server, String streamId);
+
+ /**
+ * by server and publicSID
+ *
+ * @param server
+ * @param streamId
+ * @return will return null if the client does not exist in the list
+ */
+ public abstract Client get(Server server, String streamId);
+
+ /**
+ *
+ * @param server
+ * @param publicSID
+ * @return will return an empty list if nothing available
+ */
+ public abstract List<Client> getClientsByPublicSID(Server server,
+ String publicSID);
+
+ /**
+ * Searches for the publicSID across all servers
+ *
+ * @param publicSID
+ * @return will return a map with the serverId as key and the RoomClients as list in the value
+ */
+ public abstract Map<Long, List<Client>> getClientsByPublicSID(
+ String publicSID);
+
+ /**
+ * get all clients by a specific {@link Server}
+ *
+ * @param server
+ * @return will return an empty map if nothing available
+ */
+ public abstract LinkedHashMap<String, Client> getClientsByServer(
+ Server server);
+
+ /**
+ *
+ * @param server
+ * @param userId
+ * @return will return an empty list if nothing available
+ */
+ public abstract List<Client> getClientsByUserId(Server server, Long userId);
+
+ /**
+ *
+ * We ignore the server here, cause ONE room can only be on ONE server and often we don't know where.
+ * However at a later stage clients might be on different servers and still in the save room
+ * so we keep that parameter for now
+ *
+ * @param server
+ * @param roomId
+ * @return will return an empty map if nothing available
+ */
+ public abstract LinkedHashMap<String, Client> getClientsByRoomId(
+ Server server, Long roomId);
+
+ public abstract void remove(Server server, String streamId);
+
+ public abstract int size();
+
+ public abstract int sizeByServer(Server server);
+
+ public abstract LinkedHashMap<Long, LinkedHashMap<String, Client>> getClientsByServerAndRoom(
+ Server server);
+
+ public LinkedHashMap<Long, LinkedHashMap<String, Client>> values();
+
+ /**
+ * Get some session statistics
+ *
+ * @param detailLevel
+ * @return
+ */
+ public String getDebugInformation(List<DEBUG_DETAILS> detailLevel);
+
+}
\ No newline at end of file
Modified: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/poll/TestClientListManager.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/poll/TestClientListManager.java?rev=1437854&r1=1437853&r2=1437854&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/poll/TestClientListManager.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/poll/TestClientListManager.java Thu Jan 24 03:51:18 2013
@@ -22,20 +22,20 @@ import static org.junit.Assert.assertNot
import java.util.Random;
-import org.apache.openmeetings.session.ISessionStore;
+import org.apache.openmeetings.session.ISessionManager;
import org.apache.openmeetings.test.AbstractOpenmeetingsSpringTest;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
public class TestClientListManager extends AbstractOpenmeetingsSpringTest {
@Autowired
- private ISessionStore clientListManager;
+ private ISessionManager sessionManager;
@Test
public void addClientListItem() {
Random rnd = new Random();
assertNotNull("RoomClientId created is null",
- clientListManager.addClientListItem(rnd.nextLong() + "ABCDE"
+ sessionManager.addClientListItem(rnd.nextLong() + "ABCDE"
+ rnd.nextLong(), "scopeName", 66666, "remoteAddress",
"swfUrl", false));
}