Examples of failedReason()


Examples of net.tomp2p.futures.FutureTracker.failedReason()

            tc = new TrackerConfiguration(1, 1, 1, 3, 1000, 2);
            ft = nodes[301].getTracker(trackerID).domainKey(Number160.createHash("test"))
                    .routingConfiguration(rc).trackerConfiguration(tc)
                    .evaluatingScheme(new VotingSchemeTracker()).start();
            ft.awaitUninterruptibly();
            System.err.println(ft.failedReason());
            Assert.assertEquals(true, ft.isSuccess());
            Assert.assertEquals(1, ft.rawPeersOnTracker().size());
            Assert.assertEquals(1, ft.directTrackers().size());
            Assert.assertEquals(2, ft.potentialTrackers().size());
View Full Code Here

Examples of net.tomp2p.futures.FutureTracker.failedReason()

            FutureTracker ft2 = nodes[299].getTracker(trackerID).domainKey(Number160.createHash("test"))
                    .routingConfiguration(rc).trackerConfiguration(tc)
                    .evaluatingScheme(new VotingSchemeTracker()).knownPeers(ft1.knownPeers())
                    .start();
            ft2.awaitUninterruptibly();
            System.err.println("Reason: " + ft2.failedReason());
            Assert.assertEquals(true, ft2.isSuccess());
            for (TrackerData pa : ft2.trackers()) {
                for (PeerStatistic pas : pa.peerAddresses().keySet()) {
                    if (tmp.remove(pas.peerAddress().peerId()))
                        System.err.println("found on DHT2: " + pas.peerAddress().peerId());
View Full Code Here

Examples of net.tomp2p.nat.FutureNAT.failedReason()

                    peer.shutdown().awaitUninterruptibly();
                    return null;
                }
            }
            else {
                log.warn("StartSetupPortforwarding failed. Reason = " + futureNAT
                        .failedReason());
                peer.shutdown().awaitUninterruptibly();
                return null;
            }
        } catch (IOException e) {
View Full Code Here

Examples of net.tomp2p.nat.FutureNAT.failedReason()

    }
   
    if (fn.isSuccess()) {
      System.out.println("NAT success: " + fn.peerAddress());
    } else {
      System.out.println("failed " + fn.failedReason());
    }
   
    peer.shutdown();
  }
}
View Full Code Here

Examples of net.tomp2p.nat.FutureRelayNAT.failedReason()

                //cachedPeers.put(id, peer);
                return peer;

            }
            else {
                log.error("Bootstrap using relay failed " + futureRelayNAT.failedReason());
                futureRelayNAT.shutdown();
                peer.shutdown().awaitUninterruptibly();
                return null;
            }
        } catch (IOException e) {
View Full Code Here

Examples of net.tomp2p.nat.FutureRelayNAT.failedReason()

      }

      PeerNAT peerNat = builder.start();
      FutureRelayNAT futureRelayNAT = peerNat.startRelay(relays.get(0).peer().peerAddress()).awaitUninterruptibly();
      if (!futureRelayNAT.isSuccess()) {
        LOG.error("Cannot connect to Relay(s). Reason: {}", futureRelayNAT.failedReason());
        return;
      }

      mobiles.add(peerNat);
      LOG.debug("Mobile peer {} connected to DHT and Relay(s)", i);
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.