Examples of channelCreator()


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

        try {
            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();
            ChannelCreator cc = fcc.channelCreator();
            FutureResponse fr = sender.pingRPC().pingTCP(recv1.peerAddress(), cc,
                    new DefaultConnectionConfiguration());
            Utils.addReleaseListener(cc, fr);
            fr.awaitUninterruptibly();
            fr.awaitListeners();
View Full Code Here

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

            Assert.assertEquals(1, recv1.peerBean().peerMap().allOverflow().size());
            // graceful shutdown
           
            FutureChannelCreator fcc = recv1.connectionBean().reservation().create(1, 0);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
           
            ShutdownBuilder builder = new ShutdownBuilder(sender);
           
            sender.quitRPC().quit(recv1.peerAddress(), builder, cc);
            sender.shutdown().await();
View Full Code Here

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

            sender = new PeerBuilder(new Number160("0x9876")).ports(PORT).enableMaintenance(false)
                    .start();
            PingRPC handshake = new PingRPC(sender.peerBean(), sender.connectionBean());
            FutureChannelCreator fcc = sender.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingTCP(pa, cc, new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(true, fr.isSuccess());
            Thread.sleep(WAIT);
        } finally {
View Full Code Here

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

            sender = new PeerBuilder(new Number160("0x9876")).ports(PORT).enableMaintenance(false)
                    .start();
            PingRPC handshake = new PingRPC(sender.peerBean(), sender.connectionBean());
            FutureChannelCreator fcc = sender.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingTCPDiscover(pa, cc, new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(true, fr.isSuccess());
            Thread.sleep(WAIT);
        } finally {
View Full Code Here

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

            sender = new PeerBuilder(new Number160("0x9876")).ports(PORT).enableMaintenance(false)
                    .start();
            PingRPC handshake = new PingRPC(sender.peerBean(), sender.connectionBean());
            FutureChannelCreator fcc = sender.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();
            FutureResponse fr = handshake.pingTCPProbe(pa, cc, new DefaultConnectionConfiguration());
            fr.awaitUninterruptibly();
            Assert.assertEquals(true, fr.isSuccess());
            Thread.sleep(WAIT);
        } finally {
View Full Code Here

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

                }
            });

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

            SendDirectBuilder sendDirectBuilder = new SendDirectBuilder(sender, (PeerAddress) null);
            sendDirectBuilder.streaming();
            sendDirectBuilder.idleTCPSeconds(Integer.MAX_VALUE);
View Full Code Here

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

                }
            });

            FutureChannelCreator fcc = sender.connectionBean().reservation().create(0, 2);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();

            SendDirectBuilder sendDirectBuilder = new SendDirectBuilder(sender, (PeerAddress) null);
            sendDirectBuilder.object("test");

            FutureResponse fd1 = sender.directDataRPC()
View Full Code Here

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

            });
            for (int i = 0; i < 500; i++) {

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

                SendDirectBuilder sendDirectBuilder = new SendDirectBuilder(sender, (PeerAddress) null);
                sendDirectBuilder.object((Object) Integer.valueOf(i));

                FutureResponse futureData = sender.directDataRPC().send(recv1.peerAddress(),
View Full Code Here

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

                    peers[5].peerAddress());
            // do testing
            if (tcp) {
                FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(0, 2);
                fcc.awaitUninterruptibly();
                cc = fcc.channelCreator();
            } else {
                FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(2, 0);
                fcc.awaitUninterruptibly();
                cc = fcc.channelCreator();
            }
View Full Code Here

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

                fcc.awaitUninterruptibly();
                cc = fcc.channelCreator();
            } else {
                FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(2, 0);
                fcc.awaitUninterruptibly();
                cc = fcc.channelCreator();
            }

            RoutingBuilder routingBuilder = new RoutingBuilder();
            if (tcp) {
                routingBuilder.forceTCP(true);
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.