Examples of UniqueID


Examples of net.alteiar.shared.UniqueID

  @Test
  public void testBattleGrid() {
    Long waitingTime = 1000L;
    File battleImageFile = getDefaultImage();
    UniqueID battleId1 = null;
    UniqueID battleId2 = null;
    try {
      battleId1 = createBattle("new battle1", battleImageFile);
      battleId2 = createBattle("new battle2", battleImageFile);
    } catch (IOException e) {
      fail("fail to create battle");
View Full Code Here

Examples of net.alteiar.shared.UniqueID

  @Test
  public void testMapFilter() {
    Long waitingTime = 1000L;
    File battleImageFile = getDefaultImage();
    UniqueID battleId = null;
    try {
      battleId = createBattle("new battle", battleImageFile);
    } catch (IOException e) {
      fail("fail to create battle");
    }
    MapBean mapFiltered = CampaignClient.getInstance().getBean(battleId,
        waitingTime);

    int width = mapFiltered.getWidth();
    int height = mapFiltered.getHeight();

    try {
      BufferedImage targetImages = ImageIO.read(battleImageFile);
      int expectedWidth = targetImages.getWidth();
      int expectedHeight = targetImages.getHeight();
      assertEquals("width should be same", width, expectedWidth);
      assertEquals("height should be same", height, expectedHeight);

      // Test filter
      double compareZoomFactor = 2.75;

      ManualMapFilter filter = new ManualMapFilter(battleId);
      filter.showPolygon(new Polygon(new int[] { 5, 25, 25, 5 },
          new int[] { 5, 5, 25, 25 }, 4));
      filter.hidePolygon(new Polygon(new int[] { 5, 25, 25, 5 },
          new int[] { 5, 5, 25, 25 }, 4));

      CampaignClient.getInstance().addBean(filter);
      UniqueID filterId = filter.getId();

      mapFiltered.setFilter(filterId);
      filter = CampaignClient.getInstance()
          .getBean(filterId, waitingTime);
View Full Code Here

Examples of net.alteiar.shared.UniqueID

        rectangle.getCenterPosition());
    assertEquals("The battle id should be the same as the map id",
        battleId, rectangle.getMapId());

    // Change battle link
    UniqueID newBattleId = null;
    try {
      newBattleId = TestMap.createBattle("new battle",
          TestMap.getDefaultImage());
    } catch (IOException e) {
      fail("fail to create battle");
View Full Code Here

Examples of net.alteiar.shared.UniqueID

    try {
      Timer t = new Timer();
      t.start();
      ImageBean bean = new ImageBean(new WebImage(new URL(
          "http://www.alteiar.net/images/cartes/Carte_du_monde.jpg")));
      UniqueID id = bean.getId();

      CampaignClient.getInstance().addBean(bean);
      t.end("server sended");
      bean = CampaignClient.getInstance().getBean(id, time10second);
      if (bean != null) {
View Full Code Here

Examples of net.alteiar.shared.UniqueID

    try {
      Timer t = new Timer();
      t.start();
      ImageBean bean = new ImageBean(new WebImage(new URL(
          "http://www.alteiar.net/MyUpload/large.jpg")));
      UniqueID id = bean.getId();

      CampaignClient.getInstance().addBean(bean);
      t.end("server sended");
      bean = CampaignClient.getInstance().getBean(id, time30second);
      if (bean != null) {
View Full Code Here

Examples of net.alteiar.shared.UniqueID

  public UniqueID getBackground() {
    return this.backgroundId;
  }

  public void setBackground(UniqueID background) {
    UniqueID oldValue = this.backgroundId;
    if (notifyRemote(PROP_BACKGROUND_PROPERTY, oldValue, background)) {
      this.backgroundId = background;
      notifyLocal(PROP_BACKGROUND_PROPERTY, oldValue, background);
    }
  }
View Full Code Here

Examples of net.alteiar.shared.UniqueID

  public UniqueID getFilter() {
    return filterId;
  }

  public void setFilter(UniqueID filter) {
    UniqueID oldValue = this.filterId;
    if (notifyRemote(PROP_FILTER_PROPERTY, oldValue, filter)) {
      this.filterId = filter;
      notifyLocal(PROP_FILTER_PROPERTY, oldValue, filter);
    }
  }
View Full Code Here

Examples of net.alteiar.shared.UniqueID

  public SerializableFile() {
  }

  public SerializableFile(File file) throws IOException {
    id = new UniqueID();

    String campaignDir = CampaignClient.getInstance()
        .getCampaignDirectory();
    String filename = FILE_DIR + "/"
        + DocumentIO.validateFilename(id.toString());
View Full Code Here

Examples of net.opentsdb.uid.UniqueId

   */
  private static int assign(final HBaseClient client,
                            final byte[] table,
                            final short idwidth,
                            final String[] args) {
    final UniqueId uid = new UniqueId(client, table, args[1], (int) idwidth);
    for (int i = 2; i < args.length; i++) {
      try {
        uid.getOrCreateId(args[i]);
        // Lookup again the ID we've just created and print it.
        extactLookupName(client, table, idwidth, args[1], args[i]);
      } catch (HBaseException e) {
        LOG.error("error while processing " + args[i], e);
        return 3;
View Full Code Here

Examples of org.apache.catalina.tribes.UniqueId

                if (sender.process(sk,waitForAck)) {
                    completed++;
                    sender.setComplete(true);
                    if ( Logs.MESSAGES.isTraceEnabled() ) {
                        Logs.MESSAGES.trace("ParallelNioSender - Sent msg:" +
                                new UniqueId(msg.getUniqueId()) + " at " +
                                new java.sql.Timestamp(System.currentTimeMillis()) + " to " +
                                sender.getDestination().getName());
                    }
                    SenderState.getSenderState(sender.getDestination()).setReady();
                }//end if
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.