Examples of peerBean()


Examples of net.tomp2p.connection.PeerCreator.peerBean()

              channelClientConfiguration, scheduledExecutorService, sendBehavior);
    }

    final Peer peer = new Peer(p2pID, peerId, peerCreator);

    PeerBean peerBean = peerCreator.peerBean();
    peerBean.addPeerStatusListener(peerMap);
   
    ConnectionBean connectionBean = peerCreator.connectionBean();

    peerBean.peerMap(peerMap);
View Full Code Here

Examples of net.tomp2p.dht.PeerDHT.peerBean()

                    System.err.println("future created "+ future);
                }
            }, true);
            master = peers[0];
            Number160 locationKey = new Number160(RND2);
            master.peerBean().peerMap();
            // closest
            TreeSet<PeerAddress> tmp = new TreeSet<PeerAddress>(PeerMap.createComparator(locationKey));
            tmp.add(master.peerAddress());
            for (int i = 0; i < peers.length; i++) {
                tmp.add(peers[i].peerAddress());
View Full Code Here

Examples of net.tomp2p.dht.PeerDHT.peerBean()

      Assert.assertEquals(joins[0][2], replicateOther.get());
      replicateOther.set(0);
     
      for (int i = 1; i < joins.length; i++) {
        // insert a peer
        master.peerBean().peerMap().peerFound(peers.get(i).peerAddress(), null, null);
        // verify replication notifications
        Assert.assertEquals(joins[i][0], replicateI.get());
        replicateI.set(0);
        Assert.assertEquals(joins[i][1], replicateWe.get());
        replicateWe.set(0);
View Full Code Here

Examples of net.tomp2p.dht.PeerDHT.peerBean()

        replicateOther.set(0);
      }
     
      for (int i = 0; i < leaves.length; i++) {
        // remove a peer
        master.peerBean().peerMap().peerFailed(peers.get(i+1).peerAddress(), new PeerException(AbortCause.SHUTDOWN, "shutdown"));
        // verify replication notifications
        Assert.assertEquals(leaves[i][0], replicateI.get());
        replicateI.set(0);
        Assert.assertEquals(leaves[i][1], replicateWe.get());
        replicateWe.set(0);
View Full Code Here

Examples of net.tomp2p.p2p.Peer.peerBean()

            for (int i = 0; i < pa.length; i++) {
                sender.peerBean().peerMap().peerFound(pa[i], null, null);
            }
            new NeighborRPC(sender.peerBean(), sender.connectionBean());
            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(1, 0);
            fcc.awaitUninterruptibly();
            ChannelCreator cc = fcc.channelCreator();
View Full Code Here

Examples of net.tomp2p.p2p.Peer.peerBean()

            for (int i = 0; i < pa.length; i++) {
                sender.peerBean().peerMap().peerFound(pa[i], null, null);
            }
            new NeighborRPC(sender.peerBean(), sender.connectionBean());
            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();
View Full Code Here

Examples of net.tomp2p.p2p.Peer.peerBean()

        Peer recv1 = null;
        try {
            sender = new PeerBuilder(new Number160("0x50")).p2pId(55).ports(2424).start();
            recv1 = new PeerBuilder(new Number160("0x20")).p2pId(55).ports(8088).start();
            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();
View Full Code Here

Examples of net.tomp2p.p2p.Peer.peerBean()

        Peer recv1 = null;
        try {
            sender = new PeerBuilder(new Number160("0x50")).p2pId(55).ports(2424).start();
            recv1 = new PeerBuilder(new Number160("0x20")).p2pId(55).ports(8088).start();
            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();
View Full Code Here

Examples of net.tomp2p.p2p.Peer.peerBean()

        ChannelCreator cc = null;
        try {
            sender = new PeerBuilder(new Number160("0x9876")).p2pId(55).ports(2424).start();
            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());
View Full Code Here

Examples of net.tomp2p.p2p.Peer.peerBean()

        try {
            sender = new PeerBuilder(new Number160("0x9876")).p2pId(55).ports(2424).start();
            PingRPC handshake = new PingRPC(sender.peerBean(), sender.connectionBean(), false, true,
                    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());
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.