net.tomp2p.examples
Class Examples

java.lang.Object
  extended by net.tomp2p.examples.Examples

public class Examples
extends Object

This simple example creates 10 nodes, bootstraps to the first and put and get data from those 10 nodes.

Author:
draft

Constructor Summary
Examples()
           
 
Method Summary
static void bootstrap(Peer master, Peer[] nodes)
           
static Peer[] createAndAttachNodes(Peer master, int nr)
           
static void exampleDHT()
           
static void exampleGetBlocking(Peer[] nodes, Number160 nr)
           
static void exampleGetNonBlocking(Peer[] nodes, Number160 nr)
           
static void exampleNAT()
           
static void examplePutGet(Peer[] nodes)
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Examples

public Examples()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

exampleDHT

public static void exampleDHT()
                       throws Exception
Throws:
Exception

exampleNAT

public static void exampleNAT()
                       throws Exception
Throws:
Exception

bootstrap

public static void bootstrap(Peer master,
                             Peer[] nodes)

examplePutGet

public static void examplePutGet(Peer[] nodes)
                          throws IOException
Throws:
IOException

exampleGetBlocking

public static void exampleGetBlocking(Peer[] nodes,
                                      Number160 nr)

exampleGetNonBlocking

public static void exampleGetNonBlocking(Peer[] nodes,
                                         Number160 nr)

createAndAttachNodes

public static Peer[] createAndAttachNodes(Peer master,
                                          int nr)
                                   throws Exception
Throws:
Exception


Copyright © 2012. All Rights Reserved.