Package org.openmeetings.app.persistence.beans.recording

Examples of org.openmeetings.app.persistence.beans.recording.RoomClient


  public synchronized int sendVarsModeratorGeneral(Object vars) {
    log.debug("*..*sendVars: " + vars);
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id()
       
      log.debug("***** id: " + currentClient.getStreamid());
     
      boolean ismod = currentClient.getIsMod();
 
      if (ismod) {
        log.debug("CurrentScope :"+current.getScope().getName());
        //Send to all Clients of the same Scope
        Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
        for (Set<IConnection> conset : conCollection) {
          for (IConnection conn : conset) {
            if (conn != null) {
              if (conn instanceof IServiceCapableConnection) {
                RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
                if (rcl == null) {
                  //continue;
                } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                    //continue;
                  } else {
                  //log.debug("*..*idremote: " + rcl.getStreamid());
                  //log.debug("*..*my idstreamid: " + currentClient.getStreamid());
                  if (!currentClient.getStreamid().equals(rcl.getStreamid())) {
                    ((IServiceCapableConnection) conn).invoke("sendVarsToModeratorGeneral"new Object[] { vars }, this);
                    //log.debug("sending sendVarsToModeratorGeneral to " + conn);
                  }
                }
              }
View Full Code Here


      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
              if (rcl == null || (rcl.getIsScreenClient() != null && rcl.getIsScreenClient())) {
                  //continue;
                } else {
                //log.debug("*..*idremote: " + rcl.getStreamid());
                //log.debug("*..*my idstreamid: " + currentClient.getStreamid());
                ((IServiceCapableConnection) conn).invoke("sendVarsToMessage",new Object[] { newMessage }, this);
View Full Code Here

  }

  public synchronized int sendBrowserMessageToMembers(Object newMessage) {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
       
      List newMessageList = (List) newMessage;
     
      String action = newMessageList.get(0).toString();
     
      //"closeBrowserURL"
      //"initBrowser"
      //newBrowserURL
     
      BrowserStatus browserStatus = (BrowserStatus) current.getScope().getAttribute("browserStatus");
     
      if (browserStatus == null) {
        browserStatus = new BrowserStatus();
      }
     
      if (action.equals("initBrowser") || action.equals("newBrowserURL")) {
        browserStatus.setBrowserInited(true);
        browserStatus.setCurrentURL(newMessageList.get(1).toString());
      } else if (action.equals("closeBrowserURL")) {
        browserStatus.setBrowserInited(false);
      }
     
      current.getScope().setAttribute("browserStatus", browserStatus);
     
     
      //Send to all Clients of that Scope(Room)
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
              if (rcl == null || (rcl.getIsScreenClient() != null && rcl.getIsScreenClient())) {
                  //continue;
                } else {
                  if (!currentClient.getStreamid().equals(rcl.getStreamid())) {
                  //log.debug("*..*idremote: " + rcl.getStreamid());
                  //log.debug("*..*my idstreamid: " + currentClient.getStreamid());
                  ((IServiceCapableConnection) conn).invoke("sendVarsToMessage",new Object[] { newMessage }, this);
                  //log.debug("sending sendVarsToMessage to " + conn);
                  }
View Full Code Here

  }
 
  public synchronized int sendMessageToMembers(Object newMessage) {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
       
      //Send to all Clients of that Scope(Room)
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
              if (rcl == null || (rcl.getIsScreenClient() != null && rcl.getIsScreenClient())) {
                  //continue;
                } else {
                  if (!currentClient.getStreamid().equals(rcl.getStreamid())) {
                  //log.debug("*..*idremote: " + rcl.getStreamid());
                  //log.debug("*..*my idstreamid: " + currentClient.getStreamid());
                  ((IServiceCapableConnection) conn).invoke("sendVarsToMessage",new Object[] { newMessage }, this);
                  //log.debug("sending sendVarsToMessage to " + conn);
                  }
View Full Code Here

  }
 
  public synchronized int sendMessageWithClient(Object newMessage) {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id()
       
     
      HashMap<String,Object> hsm = new HashMap<String,Object>();
      hsm.put("client", currentClient);
      hsm.put("message", newMessage);
     
      //broadcast to everybody in the Scope (Room)
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
              if (rcl == null) {
                //continue;
              } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                  //continue;
                } else {
                //log.debug("*..*idremote: " + rcl.getStreamid());
                //log.debug("*..*my idstreamid: " + currentClient.getStreamid());
                ((IServiceCapableConnection) conn).invoke("sendVarsToMessageWithClient",new Object[] { hsm }, this);
View Full Code Here

   */
  public WhiteboardObject getRoomItems(){
    try {
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      Long room_id = currentClient.getRoom_id();
     
      log.debug("getRoomItems: "+room_id);
     
      return this.whiteBoardObjectListManager.getWhiteBoardObjectRoomId(room_id);
     
View Full Code Here

  public Long getNewWhiteboardId() {
    try {
     
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      Long room_id = currentClient.getRoom_id();
     
     
      Long whiteBoardId =  this.whiteBoardObjectListManagerById.getNewWhiteboardId(room_id);
     
      return whiteBoardId;
View Full Code Here

 
  public Boolean deleteWhiteboard(Long whiteBoardId) {
    try {
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      Long room_id = currentClient.getRoom_id();
     
      WhiteboardObjectList whiteboardObjectList = this.whiteBoardObjectListManagerById.getWhiteBoardObjectListByRoomId(room_id);
   
      for (Iterator<Long> iter = whiteboardObjectList.getWhiteboardObjects().keySet().iterator();iter.hasNext();) {
        Long storedWhiteboardId = iter.next();
View Full Code Here

     
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
              if (rcl == null) {
                //continue;
              } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                  //continue;
                } else {
                //log.debug("### sendMessageById 1 ###"+clientId);
                //log.debug("### sendMessageById 2 ###"+conn.getClient().getId());
                if (conn.getClient().getId().equals(clientId)){
View Full Code Here

 
  public WhiteboardObjectList getRoomItemsBy(){
    try {
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      Long room_id = currentClient.getRoom_id();
     
      log.debug("getRoomItems: "+room_id);
      WhiteboardObjectList whiteboardObjectList = this.whiteBoardObjectListManagerById.getWhiteBoardObjectListByRoomId(room_id);
     
      LinkedList<List> completeList = new LinkedList<List>();
View Full Code Here

TOP

Related Classes of org.openmeetings.app.persistence.beans.recording.RoomClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.