Package net.tomp2p.futures

Examples of net.tomp2p.futures.FutureChannelCreator.channelCreator()


     
      PutBuilder pb = master.put(new Number160("0x51")).dataMap(tmp);
     
      FutureChannelCreator fcc = master.peer().connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
     
      FutureResponse fr = master.storeRPC().put(slave.peerAddress(), pb, cc);
      fr.awaitUninterruptibly();
      Assert.assertEquals(true, fr.isSuccess());
     
View Full Code Here


            recv1 = new PeerBuilder(new Number160("0x20")).p2pId(55).ports(8088).start();
            NeighborRPC neighbors2 = new NeighborRPC(recv1.peerBean(), recv1.connectionBean());
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 1);

            fcc.awaitUninterruptibly();
            ChannelCreator cc = fcc.channelCreator();

            SearchValues v = new SearchValues(new Number160("0x1"), null);
            DefaultConnectionConfiguration d = new DefaultConnectionConfiguration();
            d.forceTCP();
            FutureResponse fr = neighbors2.closeNeighbors(sender.peerAddress(), v,
View Full Code Here

            new NeighborRPC(sender.peerBean(), sender.connectionBean());
            NeighborRPC neighbors2 = new NeighborRPC(recv1.peerBean(), recv1.connectionBean());

            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            ChannelCreator cc = fcc.channelCreator();

            SearchValues v = new SearchValues(new Number160("0x30"), null);
            FutureResponse fr = neighbors2.closeNeighbors(sender.peerAddress(), v,
                    Type.REQUEST_2, cc, new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
View Full Code Here

            new NeighborRPC(sender.peerBean(), sender.connectionBean());
            NeighborRPC neighbors2 = new NeighborRPC(recv1.peerBean(), recv1.connectionBean());

            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            ChannelCreator cc = fcc.channelCreator();

            try {
                SearchValues v = new SearchValues(new Number160("0x30"), null);
                neighbors2.closeNeighbors(sender.peerAddress(), v,
                        Type.EXCEPTION, cc, new DefaultConnectionConfiguration());
View Full Code Here

            sender = new PeerBuilder(new Number160("0x9876")).p2pId(55).ports(2424).start();
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();

            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 3);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();

            for (int i = 0; i < 1000; i++) {
                FutureResponse fr1 = sender.pingRPC().pingTCP(recv1.peerAddress(), cc, new DefaultConnectionConfiguration());
                FutureResponse fr2 = sender.pingRPC().pingTCP(recv1.peerAddress(), cc, new DefaultConnectionConfiguration());
                FutureResponse fr3 = sender.pingRPC().pingTCP(recv1.peerAddress(), cc, new DefaultConnectionConfiguration());
View Full Code Here

            sender = new PeerBuilder(new Number160("0x9876")).p2pId(55).ports(2424).start();
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();

            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(3, 0);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();

            for (int i = 0; i < 1000; i++) {
                FutureResponse fr1 = sender.pingRPC().pingUDP(recv1.peerAddress(), cc, new DefaultConnectionConfiguration());
                FutureResponse fr2 = sender.pingRPC().pingUDP(recv1.peerAddress(), cc, new DefaultConnectionConfiguration());
                FutureResponse fr3 = sender.pingRPC().pingUDP(recv1.peerAddress(), cc, new DefaultConnectionConfiguration());
View Full Code Here

            sender = new PeerBuilder(new Number160("0x9876")).p2pId(55).ports(2424).start();
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();

            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();

            FutureResponse fr = sender.pingRPC().pingTCP(recv1.peerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(true, fr.isSuccess());
View Full Code Here

            sender = new PeerBuilder(new Number160("0x9876")).p2pId(55).ports(2424).start();
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();

            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();

            FutureResponse fr = sender.pingRPC().pingTCP(recv1.peerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            FutureResponse fr2 = recv1.pingRPC().pingTCP(sender.peerAddress(), cc,
View Full Code Here

            final Peer recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            recv11 = recv1;

            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            final ChannelCreator cc1 = cc;

            FutureResponse fr = sender.pingRPC().pingTCP(recv1.peerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
View Full Code Here

            PingRPC handshake = new PingRPC(sender.peerBean(), sender.connectionBean());
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            new PingRPC(recv1.peerBean(), recv1.connectionBean());
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingUDP(recv1.peerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(true, fr.isSuccess());
        } finally {
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.