Package org.red5.server.net.mrtmp

Examples of org.red5.server.net.mrtmp.MRTMPPacket$RTMPBody


    try {
      log.warn("loginUser: " + SID + " " + usernameOrEmail);

      RoomClient currentClient;
      IConnection current = Red5.getConnectionLocal();

      Object o;

      if (withLdap) {
        log.debug("Ldap Login");

        currentClient = this.clientListManager
            .getClientByStreamId(current.getClient().getId());

        // LDAP Loggedin Users cannot use the permanent Login Flag

        LdapConfig ldapConfig = LdapConfigDaoImpl.getInstance()
            .getLdapConfigById(ldapConfigId);

        String ldapLogin = usernameOrEmail;
        if (ldapConfig.getAddDomainToUserName() != null
            && ldapConfig.getAddDomainToUserName()) {
          ldapLogin = usernameOrEmail + "@" + ldapConfig.getDomain();
        }

        o = LdapLoginManagement.getInstance().doLdapLogin(ldapLogin,
            Userpass, currentClient, SID,
            ldapConfig.getConfigFileName());
      } else {

        currentClient = this.clientListManager
            .getClientByStreamId(current.getClient().getId());

        o = Usermanagement.getInstance().loginUser(SID,
            usernameOrEmail, Userpass, currentClient,
            storePermanent);
      }

      if (o == null)
        return null;

      if (!o.getClass().isAssignableFrom(Users.class))
        return o;

      if (currentClient.getUser_id() != null
          && currentClient.getUser_id() > 0) {

        Users u = (Users) o;
        currentClient.setFirstname(u.getFirstname());
        currentClient.setLastname(u.getLastname());

        Collection<Set<IConnection>> conCollection = current.getScope()
            .getConnections();
        for (Set<IConnection> conset : conCollection) {
          for (IConnection cons : conset) {
            if (cons != null) {
              RoomClient rcl = this.clientListManager
View Full Code Here


      }

      Long loginReturn = this.loginUserByRemote(soapLogin
          .getSessionHash());

      IConnection current = Red5.getConnectionLocal();
      String streamId = current.getClient().getId();
      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(streamId);

      if (currentClient.getUser_id() != null) {
        Sessionmanagement.getInstance().updateUser(SID,
View Full Code Here

   */

  public Long setUserNickName(String firstname, String lastname, String email) {
    try {

      IConnection current = Red5.getConnectionLocal();
      String streamId = current.getClient().getId();
      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(streamId);

      currentClient.setFirstname(firstname);
      currentClient.setLastname(lastname);
View Full Code Here

              + ", "
              + userObject.getFirstname()
              + ", "
              + userObject.getLastname());

          IConnection current = Red5.getConnectionLocal();
          String streamId = current.getClient().getId();
          RoomClient currentClient = this.clientListManager
              .getClientByStreamId(streamId);

          // Check if this User is simulated in the OpenMeetings
          // Database
View Full Code Here

   * @param SID
   * @return string value if completed
   */
  public Long logoutUser(String SID) {
    Long users_id = Sessionmanagement.getInstance().checkSession(SID);
    IConnection current = Red5.getConnectionLocal();
    RoomClient currentClient = this.clientListManager
        .getClientByStreamId(current.getClient().getId());
    currentClient.setUserObject(null, null, null, null);
    return Usermanagement.getInstance().logout(SID, users_id);
  }
View Full Code Here

   * @param newMessage
   * @return
   */
  public int sendMessageWithClient(Object newMessage) {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();
     
      log.debug("room_id: "+room_id);
      log.debug("currentClient.getIsChatNotification(): "+currentClient.getIsChatNotification());
      if (currentClient.getIsChatNotification()){
        room_id = currentClient.getChatUserRoomId();
      }
     
      //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(room_id);
      if (myChatList==null) myChatList = new LinkedList<HashMap<String,Object>>();
     
      if (myChatList.size()==chatRoomHistory) myChatList.remove(0);
      myChatList.add(hsm);
      myChats.put(room_id,myChatList);
     
      log.debug("SET CHATROOM: "+room_id);
     
      //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

    return 1;
  }
 
  public List<HashMap<String,Object>> clearChat() {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();
     
      Long chatroom = room_id;
      log.debug("### GET CHATROOM: "+chatroom);
     
      List<HashMap<String,Object>> myChatList = myChats.get(chatroom);
      myChatList = new LinkedList<HashMap<String,Object>>();
     
      myChats.put(chatroom,myChatList);
     
      HashMap<String,Object> hsm = new HashMap<String,Object>();
     
      //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

    }
  }
 
  public List<HashMap<String,Object>> getRoomChatHistory() {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();
     
      Long chatroom = room_id;
      log.debug("GET CHATROOM: "+chatroom);
     
View Full Code Here

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

   * @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

TOP

Related Classes of org.red5.server.net.mrtmp.MRTMPPacket$RTMPBody

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.