Package org.jdesktop.wonderland.modules.orb.common.messages

Examples of org.jdesktop.wonderland.modules.orb.common.messages.OrbSpeakingMessage


  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;
View Full Code Here


        logger.warning("unable to play you are muted treatment to " + call
      + ":  " + e.getMessage());
    }
      }

            sender.send(new OrbSpeakingMessage(orbCellID, true));
            break;
           
        case CallStatus.STOPPEDSPEAKING:
            sender.send(new OrbSpeakingMessage(orbCellID, false));
            break;
           
  case CallStatus.TREATMENTDONE:
      String treatment = status.getOption("Treatment");
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.modules.orb.common.messages.OrbSpeakingMessage

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.