Examples of channelCreator()


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

                    false);
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            new PingRPC(recv1.peerBean(), recv1.connectionBean(), false, true, false);
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingTCP(recv1.peerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(false, fr.isSuccess());
        } finally {
View Full Code Here

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

                    true);
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            new PingRPC(recv1.peerBean(), recv1.connectionBean(), false, true, true);
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingTCP(recv1.peerBean().serverPeerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(false, fr.isSuccess());
            System.err.println("done:" + fr.failedReason());
View Full Code Here

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

                    false);
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            new PingRPC(recv1.peerBean(), recv1.connectionBean(), false, true, false);
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingUDP(recv1.peerBean().serverPeerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(false, fr.isSuccess());
        } finally {
View Full Code Here

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

                    true);
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            new PingRPC(recv1.peerBean(), recv1.connectionBean(), false, true, true);
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingUDP(recv1.peerBean().serverPeerAddress(), cc,
                    new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(false, fr.isSuccess());
            System.err.println("done:" + fr.failedReason());
View Full Code Here

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

            sender = new PeerBuilder(new Number160("0x9876")).p2pId(55).ports(2424).start();
            recv1 = new PeerBuilder(new Number160("0x1234")).p2pId(55).ports(8088).start();
            List<FutureResponse> list = new ArrayList<FutureResponse>(50);
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 50);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            for (int i = 0; i < 50; i++) {
                FutureResponse fr = sender.pingRPC().pingTCP(recv1.peerAddress(), cc,
                        new DefaultConnectionConfiguration());
                list.add(fr);
            }
View Full Code Here

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

        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            for (PeerAddress pa : peer.peerBean().peerMap().all()) {
               
                FutureChannelCreator fcc = peer.connectionBean().reservation().create(1, 1);
                fcc.awaitUninterruptibly();
                ChannelCreator cc = fcc.channelCreator();
               
                FutureResponse fr1 = peer.pingRPC().pingTCP(pa, cc, new DefaultConnectionConfiguration());
                fr1.awaitUninterruptibly();

                if (fr1.isSuccess()) {
View Full Code Here

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

            }
            List<FutureResponse> list = new ArrayList<FutureResponse>();
            for (int i = 0; i < p.length; i++) {
                FutureChannelCreator fcc = p[0].connectionBean().reservation().create(0, 1);
                fcc.awaitUninterruptibly();
                ChannelCreator cc = fcc.channelCreator();
                FutureResponse fr = p[0].pingRPC().pingTCP(p[i].peerAddress(), cc,
                        new DefaultConnectionConfiguration());
                Utils.addReleaseListener(cc, fr);
                list.add(fr);
            }
View Full Code Here

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

      for (PeerAddress pa : master.peerBean().peerMap().all()) {
        System.out.println("PeerAddress: " + pa);
        FutureChannelCreator fcc = master.connectionBean().reservation().create(1, 1);
        fcc.awaitUninterruptibly();

        ChannelCreator cc = fcc.channelCreator();

        FutureResponse fr1 = master.pingRPC().pingTCP(pa, cc, new DefaultConnectionConfiguration());
        fr1.awaitUninterruptibly();

        if (fr1.isSuccess()) {
View Full Code Here

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

            long start = System.currentTimeMillis();
            List<FutureResponse> list = new ArrayList<FutureResponse>(100);
            for (int i = 0; i < 20; i++) {
                FutureChannelCreator fcc = recv1.connectionBean().reservation().create(0, 50);
                fcc.awaitUninterruptibly();
                ChannelCreator cc = fcc.channelCreator();
                for (int j = 0; j < 50; j++) {
                    FutureResponse fr = sender.pingRPC().pingTCP(recv1.peerAddress(), cc,
                            new DefaultConnectionConfiguration());
                    list.add(fr);
                }
View Full Code Here

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

            start = System.currentTimeMillis();
            list = new ArrayList<FutureResponse>(50);
            for (int i = 0; i < 20; i++) {
                FutureChannelCreator fcc = recv1.connectionBean().reservation().create(50, 0);
                fcc.awaitUninterruptibly();
                ChannelCreator cc = fcc.channelCreator();
                for (int j = 0; j < 50; j++) {
                    FutureResponse fr = sender.pingRPC().pingUDP(recv1.peerAddress(), cc,
                            new DefaultConnectionConfiguration());
                    list.add(fr);
                }
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.