Examples of IWVWMatchesDTO


Examples of de.justi.yagw2api.arenanet.IWVWMatchesDTO

    try {
      final long startTimestamp = System.currentTimeMillis();
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("Will now initialize new " + this.getClass().getSimpleName());
      }
      final IWVWMatchesDTO matchesDto = SERVICE.retrieveAllMatches();
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("Retrieved " + IWVWMatchesDTO.class.getSimpleName() + " after " + (System.currentTimeMillis() - startTimestamp) + "ms");
        LOGGER.debug("Going to initialize new " + this.getClass().getSimpleName() + " for " + matchesDto);
      }
      final WVWSynchronizerInitAction initAction = new WVWSynchronizerInitAction(Arrays.asList(matchesDto.getMatches()));
      initAction.getChannel().register(this);
      final Thread asyncStartup = new Thread() {
        @Override
        public void run() {
          try {
View Full Code Here

Examples of de.justi.yagw2api.arenanet.IWVWMatchesDTO

  @Test
  public void testRetrieveAllMatches() {
    final WVWDTOFactory dtoFactory = new WVWDTOFactory();
    final WVWService service = new WVWService(dtoFactory);

    final IWVWMatchesDTO result = service.retrieveAllMatches();
    assertNotNull(result);
    assertEquals(17, result.getMatches().length);

    for (IWVWMatchDTO match : result.getMatches()) {
      assertTrue(match.getBlueWorldId() > 0);
      assertTrue(match.getRedWorldId() > 0);
      assertTrue(match.getGreenWorldId() > 0);
      assertNotNull(match.getStartTime());
      assertNotNull(match.getEndTime());
View Full Code Here

Examples of de.justi.yagw2api.arenanet.IWVWMatchesDTO

          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 IWVWMatchesDTO result = WVWService.this.wvwDTOFactory.newMatchesOf(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.