net.tomp2p.examples
Class Examples
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Examples
public Examples()
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[] peers)
examplePutGet
public static void examplePutGet(Peer[] peers,
Number160 nr)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
examplePutGetConfig
public static void examplePutGetConfig(Peer[] peers)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
exampleGetBlocking
public static void exampleGetBlocking(Peer[] peers,
Number160 nr)
throws ClassNotFoundException,
IOException
- Throws:
ClassNotFoundException
IOException
exampleGetNonBlocking
public static void exampleGetNonBlocking(Peer[] peers,
Number160 nr)
createAndAttachNodes
public static Peer[] createAndAttachNodes(int nr,
int port)
throws Exception
- Throws:
Exception
Copyright © 2012. All Rights Reserved.