Examples of IConnection


Examples of org.red5.server.api.IConnection

   * @param orgdomain
   * @return
   */
  public Long removeClientFromChatNotification(){
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());         
      String streamid = currentClient.getStreamid();
     
      currentClient.setIsChatNotification(false);
      currentClient.setChatUserRoomId(null);
     
View Full Code Here

Examples of org.red5.server.api.IConnection

   * @param newMessage
   * @return
   */
  public int sendMessageToOverallChat(Object newMessage) {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      //log.error(newMessage.getClass().getName());
      ArrayList messageMap = (ArrayList) newMessage;
      //adding delimiter space, cause otherwise an emoticon in the last string would not be found
      String messageText = messageMap.get(4).toString()+" ";
      //log.error("messageText"+messageText);
      //add server time
      messageMap.set(1,parseDateAsTimeString());
      LinkedList<String[]> parsedStringObjects = ChatString.getInstance().parseChatString(messageText);
      //log.error("parsedStringObjects"+parsedStringObjects.size());
      log.debug("size:" + messageMap.size());
      messageMap.add(parsedStringObjects);
      newMessage = messageMap;
     
     
      HashMap<String,Object> hsm = new HashMap<String,Object>();
      hsm.put("client", currentClient);
      hsm.put("message", newMessage);
     
      List<HashMap<String,Object>> myChatList = myChats.get(overallChatRoomName);
      if (myChatList==null) myChatList = new LinkedList<HashMap<String,Object>>();
     
      if (myChatList.size()==chatRoomHistory) myChatList.remove(0);
      myChatList.add(hsm);
      myChats.put(overallChatRoomName,myChatList);
     
      log.debug("SET CHATROOM: "+overallChatRoomName);
     
      //broadcast to everybody in the room/domain
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
          for (IConnection conn : conset) {
            if (conn != null) {
              if (conn instanceof IServiceCapableConnection) {
     
View Full Code Here

Examples of org.red5.server.api.IConnection

   * Loading the List of Objects on the whiteboard
   * @return HashMap<String,Map>
   */
  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);
     
View Full Code Here

Examples of org.red5.server.api.IConnection

  }
 
  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);
View Full Code Here

Examples of org.red5.server.api.IConnection

    return null;
  }
 
  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);
   
View Full Code Here

Examples of org.red5.server.api.IConnection

    return null;
  }
 
  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);
View Full Code Here

Examples of org.red5.server.api.IConnection

   * @return
   */
  public Boolean setCanDraw(String SID, String publicSID, boolean canDraw) {
    try {
     
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
     
      Long users_id = Sessionmanagement.getInstance().checkSession(SID);
          Long user_level = Usermanagement.getInstance().getUserLevelByID(users_id);
         
View Full Code Here

Examples of org.red5.server.api.IConnection

  }
 
  public Boolean setCanShare(String SID, String publicSID, boolean canShare) {
    try {
     
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
     
      Long users_id = Sessionmanagement.getInstance().checkSession(SID);
          Long user_level = Usermanagement.getInstance().getUserLevelByID(users_id);
         
View Full Code Here

Examples of org.red5.server.api.IConnection

  }
 
  public Boolean setCanRemote(String SID, String publicSID, boolean canRemote) {
    try {
     
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
     
      Long users_id = Sessionmanagement.getInstance().checkSession(SID);
          Long user_level = Usermanagement.getInstance().getUserLevelByID(users_id);
         
View Full Code Here

Examples of org.red5.server.api.IConnection

  }
 
  public WhiteboardSyncLockObject startNewSyncprocess(){
    try {
     
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      Long room_id = currentClient.getRoom_id();
     
      WhiteboardSyncLockObject wSyncLockObject = new WhiteboardSyncLockObject();
      wSyncLockObject.setAddtime(new Date());
      wSyncLockObject.setPublicSID(currentClient.getPublicSID());
      wSyncLockObject.setInitialLoaded(true);
     
      Map<String,WhiteboardSyncLockObject> syncListRoom = this.whiteBoardObjectListManager.getWhiteBoardSyncListByRoomid(room_id);
     

      wSyncLockObject.setCurrentLoadingItem(true);
      wSyncLockObject.setStarttime(new Date());
   
      syncListRoom.put(currentClient.getPublicSID(), wSyncLockObject);
      this.whiteBoardObjectListManager.setWhiteBoardSyncListByRoomid(room_id, syncListRoom);
     
      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());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.