Examples of wrappedFuture()


Examples of net.tomp2p.futures.FutureDirect.wrappedFuture()

            //make sure we did not receive it from the unreachable peer with port 13337
            //System.err.println(fd.getWrappedFuture());
            //TODO: this case is true for relay
            //Assert.assertEquals(fd.wrappedFuture().responseMessage().senderSocket().getPort(), 4001);
            //TODO: this case is true for rcon
            Assert.assertEquals(unreachablePeer1.peerID(), fd.wrappedFuture().responseMessage().sender().peerId());
           
            Assert.assertTrue(test1.get());
            Assert.assertFalse(test2.get());
            Assert.assertEquals(relayType.maxRelayCount(), fd.futureResponse().responseMessage().sender().peerSocketAddresses().size());
    } finally {
View Full Code Here

Examples of net.tomp2p.futures.FutureDirect.wrappedFuture()

      FutureDirect fd = peers[42].sendDirect(unreachablePeer.peerAddress()).object(request).start()
          .awaitUninterruptibly();
      Assert.assertEquals(response, fd.object());
     
      // make sure we did receive it from the unreachable peer with id
      Assert.assertEquals(unreachablePeer.peerID(), fd.wrappedFuture().responseMessage().sender().peerId());
    } finally {
      if (unreachablePeer != null) {
        unreachablePeer.shutdown().await();
      }
      if (master != null) {
View Full Code Here

Examples of net.tomp2p.futures.FutureDirect.wrappedFuture()

      FutureDirect fd = unreachablePeer.sendDirect(receiver.peerAddress()).object(request).start()
          .awaitUninterruptibly();
      Assert.assertEquals(response, fd.object());
     
      // make sure we did receive it from the unreachable peer with id
      Assert.assertEquals(receiver.peerID(), fd.wrappedFuture().responseMessage().sender().peerId());
    } finally {
      if (unreachablePeer != null) {
        unreachablePeer.shutdown().await();
      }
      if (master != null) {
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.