Package hamsam.api

Examples of hamsam.api.Conference


    if(index == -1)
      return;

    // Now find a pending conference request
    Enumeration e = confSBMap.keys();
    Conference conf = null;
    while(e.hasMoreElements())
    {
      conf = (Conference) e.nextElement();
      Object sb = confSBMap.get(conf);
      if(!(sb instanceof SwitchboardServer))
View Full Code Here


    {
      // send the invitation
      Buddy host = new Buddy(protocol, passport);
      host.setAlias(alias);
      Buddy[] buddies = new Buddy[] {host};
      Conference conf = new Conference(protocol, host, buddies);
      Response res = processor.conferenceInvitationReceived(conf, "");

      if(res.isAccepted())
        joinSBSession(sessionID, server, authString, conf);
    }
View Full Code Here

  void switchBoardTerminated(SwitchboardServer server)
  {
    Enumeration e = confSBMap.keys();
    while(e.hasMoreElements())
    {
      Conference conf = (Conference) e.nextElement();
      if(server.equals(confSBMap.get(conf)))
      {
        confSBMap.remove(conf);
        return;
      }
View Full Code Here

        else if(!members.isEmpty())
        {
          try
          {
            Buddy[] buddies = (Buddy[]) members.toArray(new Buddy[0]);
            Conference conf = new Conference(this, host, buddies);
            Response resp = listener.conferenceInvitationReceived(conf, msg);
            processConferenceResponse(resp, buddies, room);
          }
          catch(UnsupportedOperationException e)
          {
            // this exception will never be thrown
          }
          catch(IllegalArgumentException e)
          {
            // this exception will never be thrown
          }
        }
        else if(msg != null)
        {
          listener.protocolMessageReceived(this, Util.parseYahooMessage(msg));
        }
        break;

      case SERVICE_CONFADDINVITE:
        if(pack.getStatus() == 2)
          ;
        else
        {
          try
          {
            Buddy[] buddies = (Buddy[]) members.toArray(new Buddy[0]);
            Conference conf = new Conference(this, host, buddies);
            Response resp = listener.conferenceInvitationReceived(conf, msg);
            processConferenceResponse(resp, buddies, room);
          }
          catch(UnsupportedOperationException e)
          {
            // this exception will never be thrown
          }
          catch(IllegalArgumentException e)
          {
            // this exception will never be thrown
          }
        }
        break;
      case SERVICE_CONFDECLINE:
        if(who != null)
        {
          Conference conf = (Conference) roomConfMap.get(room);
          if(conf != null)
            listener.conferenceInvitationDeclined(conf, who, msg);
        }
        break;

      case SERVICE_CONFLOGON:
        if(who != null)
        {
          Conference conf = (Conference) roomConfMap.get(room);
          if(conf != null)
            listener.conferenceInvitationAccepted(conf, who);
        }
        break;

      case SERVICE_CONFLOGOFF:
        if(who != null)
        {
          Conference conf = (Conference) roomConfMap.get(room);
          if(conf != null)
          {
            conf.removeParticipant(who);
            listener.conferenceParticipantLeft(conf, who);
          }
        }
        break;

      case SERVICE_CONFMSG:
        if(who != null)
        {
          Conference conf = (Conference) roomConfMap.get(room);
          if(conf != null)
            listener.conferenceMessageReceived(conf, who, Util.parseYahooMessage(msg));
        }
        break;
    }
View Full Code Here

      NotificationServer ns = checkValidNotificationServer();
      Buddy host = new Buddy(this, username);
      Buddy[] participants = new Buddy[2];
      participants[0] = host;
      participants[1] = buddy;
      Conference conf = new Conference(this, host, participants);
      ns.startSBSession(conf);

      // Wait till we get an SB session for this
      return ns.waitForSBSession(conf);
    }
View Full Code Here

TOP

Related Classes of hamsam.api.Conference

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.