if (bystanders != null && bystanders.length > 0) {
alias += " + " + bystanders.length;
}
if (message instanceof OrbSpeakingMessage) {
OrbSpeakingMessage msg = (OrbSpeakingMessage) message;
logger.fine("Orb speaking " + msg.isSpeaking() + " cellID " + msg.getCellID()
+ " pi " + presenceInfo);
if (presenceInfoAdded) {
pm.setSpeaking(presenceInfo, msg.isSpeaking());
}
if (msg.isSpeaking()) {
nameTagComp.setNameTag(EventType.STARTED_SPEAKING, username, alias);
} else {
nameTagComp.setNameTag(EventType.STOPPED_SPEAKING, username, alias);
}
return;
}
if (message instanceof OrbMuteCallMessage) {
OrbMuteCallMessage msg = (OrbMuteCallMessage) message;
if (presenceInfoAdded) {
pm.setMute(presenceInfo, msg.isMuted());
}
if (msg.isMuted()) {
nameTagComp.setNameTag(EventType.MUTE, username, alias);
} else {
nameTagComp.setNameTag(EventType.UNMUTE, username, alias);
}
return;
}
if (message instanceof OrbBystandersMessage) {
OrbBystandersMessage msg = (OrbBystandersMessage) message;
setBystanders(msg.getBystanders());
return;
}
if (message instanceof OrbChangeNameMessage) {
OrbChangeNameMessage msg = (OrbChangeNameMessage) message;
usernameAlias = msg.getName();
if (presenceInfoAdded) {
presenceInfo.setUsernameAlias(usernameAlias);
pm.requestChangeUsernameAlias(presenceInfo.getUsernameAlias());
}
nameTagComp.setNameTag(EventType.CHANGE_NAME, username, usernameAlias);
return;
}
if (message instanceof OrbAttachMessage) {
OrbAttachMessage msg = (OrbAttachMessage) message;
attachOrb(msg.getHostCellID(), msg.isAttached());
return;
}
if (message instanceof OrbAttachVirtualPlayerMessage) {
OrbAttachVirtualPlayerMessage msg = (OrbAttachVirtualPlayerMessage) message;
PresenceInfo info = pm.getPresenceInfo(msg.getHostCallID());
if (info == null) {
logger.warning("OrbAttachVirtualPlayerMessage, no presence info for callID "
+ msg.getHostCallID());
return;
}
attachOrb(info.getCellID(), true);
return;