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;
}