Package net.tomp2p.connection

Examples of net.tomp2p.connection.DefaultConnectionConfiguration


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

            SearchValues v = new SearchValues(new Number160("0x1"), null);
            FutureResponse fr = neighbors2.closeNeighbors(sender.peerAddress(), v,
                    Type.REQUEST_2, cc, new DefaultConnectionConfiguration());

            fr.awaitUninterruptibly();
            // Thread.sleep(10000000);
            Assert.assertEquals(true, fr.isSuccess());
            NeighborSet pas = fr.responseMessage().neighborsSet(0);
View Full Code Here


            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,
                    Type.REQUEST_2, cc, d);

            fr.awaitUninterruptibly();
            System.err.println(fr.failedReason());
View Full Code Here

            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();
            Assert.assertEquals(true, fr.isSuccess());
            NeighborSet pas = fr.responseMessage().neighborsSet(0);

            // I see no one, not evenmyself. My peer was added in the overflow map
View Full Code Here

            ChannelCreator cc = fcc.channelCreator();

            try {
                SearchValues v = new SearchValues(new Number160("0x30"), null);
                neighbors2.closeNeighbors(sender.peerAddress(), v,
                        Type.EXCEPTION, cc, new DefaultConnectionConfiguration());
                Assert.fail("");
            } catch (IllegalArgumentException i) {
                cc.shutdown();
            }
        } finally {
View Full Code Here

        }
        if (peerAddress == null) {
            throw new IllegalArgumentException("need peeraddress or inetaddress");
        }
        if (configuration == null) {
            configuration = new DefaultConnectionConfiguration();
        }
        if (futureDiscover == null) {
          futureDiscover = new FutureDiscover();
        }
        return discover(peerAddress, configuration, futureDiscover);
View Full Code Here

        if (peer.isShutdown()) {
            return FUTURE_PING_SHUTDOWN;
        }

        if (connectionConfiguration == null) {
            connectionConfiguration = new DefaultConnectionConfiguration();
        }

        if (broadcast) {
            return pingBroadcast(port);
        } else {
View Full Code Here

                bf.add(Number160.createHash(i));
            }

            SearchValues v = new SearchValues(new Number160("0x1"), null, bf);
            FutureResponse fr = neighbors2.closeNeighbors(sender.peerAddress(), v,
                    Type.REQUEST_2, cc, new DefaultConnectionConfiguration());

            fr.awaitUninterruptibly();
            // Thread.sleep(10000000);
            Assert.assertEquals(true, fr.isSuccess());
            NeighborSet pas = fr.responseMessage().neighborsSet(0);
View Full Code Here

  public int peerMapUpdateInterval() {
    return peerMapUpdateInterval;
  }

  public PeerNAT start() {
    ConnectionConfiguration connectionConfiguration = new DefaultConnectionConfiguration();

    if(bufferConfig == null) {
      bufferConfig = new MessageBufferConfiguration();
    }
   
View Full Code Here

    this.rnd = new Random(peer.peerID().longValue());
  }

  public PeerTracker start() {
    if (connectionConfiguration == null) {
      connectionConfiguration = new DefaultConnectionConfiguration();
    }
    if (peerExchangeRefreshSec == -1) {
      peerExchangeRefreshSec = 60;
    }
    if (replicationFactor == -1) {
View Full Code Here

TOP

Related Classes of net.tomp2p.connection.DefaultConnectionConfiguration

Copyright © 2018 www.massapicom. 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.