Package com.ngt.jopenmetaverse.shared.sim.GroupManager

Examples of com.ngt.jopenmetaverse.shared.sim.GroupManager.ChatSessionMember


  private int findChatSessionMemberIndex(List<ChatSessionMember> list, UUID agentID)
  {
    for(int i =0; i < list.size(); i++)
    {
      ChatSessionMember c = list.get(i);
      if(c.AvatarKey.equals(agentID))
        return i;
    }
    return -1;
  }
View Full Code Here


          GroupChatSessions.add(msg.SessionID, new ArrayList<ChatSessionMember>());
        }
   
        for (int i = 0; i < msg.Updates.length; i++)
        {
          ChatSessionMember fndMbr;
          synchronized (GroupChatSessions.getDictionary())
          {
            fndMbr = findChatSessionMember(GroupChatSessions.get(msg.SessionID), msg.Updates[i].AgentID);
          }
   
          if (msg.Updates[i].Transition != null)
          {
            if (msg.Updates[i].Transition.equals("ENTER"))
            {
              if (fndMbr.AvatarKey == UUID.Zero)
              {
                fndMbr = new ChatSessionMember();
                fndMbr.AvatarKey = msg.Updates[i].AgentID;
   
                synchronized (GroupChatSessions.getDictionary())
                {
                GroupChatSessions.get(msg.SessionID).add(fndMbr);
                }
   
                if (onChatSessionMemberAdded != null)
                {
                  onChatSessionMemberAdded.raiseEvent(new ChatSessionMemberAddedEventArgs(msg.SessionID, fndMbr.AvatarKey));
                }
              }
            }
            else if (msg.Updates[i].Transition.equals("LEAVE"))
            {
              if (fndMbr.AvatarKey != UUID.Zero)
                synchronized (GroupChatSessions.getDictionary())
                {
                GroupChatSessions.get(msg.SessionID).remove(fndMbr);
                }
   
              if (onChatSessionMemberLeft != null)
              {
                onChatSessionMemberLeft.raiseEvent(new ChatSessionMemberLeftEventArgs(msg.SessionID, msg.Updates[i].AgentID));
              }
            }
          }
   
          // handle updates
          ChatSessionMember update_member = findChatSessionMember(GroupChatSessions.getDictionary().get(msg.SessionID),  msg.Updates[i].AgentID);
           
   
          update_member.MuteText = msg.Updates[i].MuteText;
          update_member.MuteVoice = msg.Updates[i].MuteVoice;
   
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.sim.GroupManager.ChatSessionMember

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.