Examples of RobotName


Examples of com.google.wave.api.robot.RobotName

      }
    }
    // Robot should receive also deltas that contain AddParticipant ops.
    // EventGenerator will take care to filter out events before the add.
    for (ParticipantId participant : currentAndNewParticipants) {
      RobotName robotName = RobotName.fromAddress(participant.getAddress());
      if (robotName == null) {
        // Not a valid robot name, next.
        continue;
      }

      ParticipantId robotId = ParticipantId.ofUnsafe(robotName.toEmailAddress());
      AccountData account;
      try {
        account = accountStore.getAccount(robotId);
      } catch (PersistenceException e) {
        LOG.severe("Failed to retrieve the account data for " + robotId.getAddress(), e);
View Full Code Here

Examples of com.google.wave.api.robot.RobotName

  public void execute(OperationRequest operation, OperationContext context,
      ParticipantId participant) throws InvalidRequestException {
    String capabilitiesHash =
        OperationUtil.getRequiredParameter(operation, ParamsProperty.CAPABILITIES_HASH);

    RobotName robotName = RobotName.fromAddress(participant.getAddress());

    ParticipantId robotAccountId = ParticipantId.ofUnsafe(robotName.toEmailAddress());
    AccountData account;
    try {
      account = accountStore.getAccount(robotAccountId);
    } catch (PersistenceException e) {
      LOG.severe("Failed to retreive account data for " + robotAccountId, e);
View Full Code Here

Examples of com.google.wave.api.robot.RobotName

   *         invalid.
   */
  public static ParticipantId toProxyParticipant(ParticipantId participant, String proxyFor)
      throws InvalidParticipantAddress {
    if (!Strings.isNullOrEmpty(proxyFor)) {
      RobotName robotName = RobotName.fromAddress(participant.getAddress());
      robotName.setProxyFor(proxyFor);
      String robotAddress = robotName.toParticipantAddress();
      if (!RobotName.isWellFormedAddress(robotAddress)) {
        throw new InvalidParticipantAddress(robotAddress,
            "is not a valid robot name, the proxy is likely to be wrong");
      }
      return ParticipantId.of(robotName.toParticipantAddress());
    } else {
      return participant;
    }
  }
View Full Code Here

Examples of com.google.wave.api.robot.RobotName

  public void execute(OperationRequest operation, OperationContext context,
      ParticipantId participant) throws InvalidRequestException {
    String capabilitiesHash =
        OperationUtil.getRequiredParameter(operation, ParamsProperty.CAPABILITIES_HASH);

    RobotName robotName = RobotName.fromAddress(participant.getAddress());

    ParticipantId robotAccountId = ParticipantId.ofUnsafe(robotName.toEmailAddress());
    AccountData account;
    try {
      account = accountStore.getAccount(robotAccountId);
    } catch (PersistenceException e) {
      LOG.severe("Failed to retreive account data for " + robotAccountId, e);
View Full Code Here

Examples of com.google.wave.api.robot.RobotName

      }
    }
    // Robot should receive also deltas that contain AddParticipant ops.
    // EventGenerator will take care to filter out events before the add.
    for (ParticipantId participant : currentAndNewParticipants) {
      RobotName robotName = RobotName.fromAddress(participant.getAddress());
      if (robotName == null) {
        // Not a valid robot name, next.
        continue;
      }

      ParticipantId robotId = ParticipantId.ofUnsafe(robotName.toEmailAddress());
      AccountData account;
      try {
        account = accountStore.getAccount(robotId);
      } catch (PersistenceException e) {
        LOG.severe("Failed to retrieve the account data for " + robotId.getAddress(), e);
View Full Code Here

Examples of com.google.wave.api.robot.RobotName

   *         invalid.
   */
  public static ParticipantId toProxyParticipant(ParticipantId participant, String proxyFor)
      throws InvalidParticipantAddress {
    if (!Strings.isNullOrEmpty(proxyFor)) {
      RobotName robotName = RobotName.fromAddress(participant.getAddress());
      robotName.setProxyFor(proxyFor);
      String robotAddress = robotName.toParticipantAddress();
      if (!RobotName.isWellFormedAddress(robotAddress)) {
        throw new InvalidParticipantAddress(robotAddress,
            "is not a valid robot name, the proxy is likely to be wrong");
      }
      return ParticipantId.of(robotName.toParticipantAddress());
    } else {
      return participant;
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.