Examples of IWVWMatchDetailsDTO


Examples of de.justi.yagw2api.arenanet.IWVWMatchDetailsDTO

    final long startTimestamp = System.currentTimeMillis();
    LOGGER.trace("Going to synchronize matchId=" + matchId);
    final Optional<IWVWMatchDTO> matchDTOOptional = WVW_SERVICE.retrieveMatch(matchId);
    if (matchDTOOptional.isPresent() && matchDTOOptional.get().getDetails().isPresent()) {
      final IWVWMatchDTO matchDTO = matchDTOOptional.get();
      final IWVWMatchDetailsDTO matchDetailsDTO = matchDTO.getDetails().get();
      final IWVWMatch matchModel = this.matchesMappedById.get(matchId);

      // 0. synchronize worlds
      this.synchronizeWorldNames(matchModel, matchDTO);

      // 1. synchronize maps
      this.synchronizeMap(matchModel, matchModel.getCenterMap(), matchDetailsDTO.getCenterMap());
      this.synchronizeMap(matchModel, matchModel.getRedMap(), matchDetailsDTO.getRedMap());
      this.synchronizeMap(matchModel, matchModel.getBlueMap(), matchDetailsDTO.getBlueMap());
      this.synchronizeMap(matchModel, matchModel.getGreenMap(), matchDetailsDTO.getGreenMap());
      // 2. synchronize match scores
      matchModel.getScores().update(matchDetailsDTO.getRedScore(), matchDetailsDTO.getGreenScore(), matchDetailsDTO.getBlueScore());
    } else {
      LOGGER.error("Failed to retrieve " + IWVWMatchDTO.class.getSimpleName() + " for matchId=" + matchId);
    }
    final long endTimestamp = System.currentTimeMillis();
    final long duration = endTimestamp - startTimestamp;
View Full Code Here

Examples of de.justi.yagw2api.arenanet.IWVWMatchDetailsDTO

          resource.addFilter(new RetryClientFilter(ServiceUtils.REST_RETRY_COUNT));
          final WebResource.Builder builder = resource.accept(MediaType.APPLICATION_JSON_TYPE);
          try {
            final String response = builder.get(String.class);
            LOGGER.trace("Retrieved response=" + response);
            final IWVWMatchDetailsDTO result = WVWService.this.wvwDTOFactory.newMatchDetailsOf(response);
            LOGGER.debug("Built result=" + result);
            return Optional.of(result);
          } catch (ClientHandlerException | UniformInterfaceException e) {
            LOGGER.fatal("Exception thrown while quering " + resource.getURI(), e);
            return Optional.absent();
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.