net.tomp2p.p2p.builder
Class BootstrapBuilder

java.lang.Object
  extended by net.tomp2p.p2p.builder.BootstrapBuilder

public class BootstrapBuilder
extends Object

Boostraps to a known peer. First channels are reserved, then #discover(PeerAddress) is called to verify this Internet connection settings using the argument peerAddress. Then the routing is initiated to the peers specified in bootstrapTo. Please be aware that in order to boostrap you need to know the peer ID of all peers in the collection bootstrapTo. Passing Number160.ZERO does *not* work.


Constructor Summary
BootstrapBuilder(Peer peer)
           
 
Method Summary
 Collection<PeerAddress> getBootstrapTo()
           
 InetAddress getInetAddress()
           
 PeerAddress getPeerAddress()
           
 int getPortTCP()
           
 int getPortUDP()
           
 RequestP2PConfiguration getRequestP2PConfiguration()
           
 RoutingConfiguration getRoutingConfiguration()
           
 boolean isBroadcast()
           
 boolean isForceRoutingOnlyToSelf()
           
 BootstrapBuilder setBootstrapTo(Collection<PeerAddress> bootstrapTo)
           
 BootstrapBuilder setBroadcast()
           
 BootstrapBuilder setBroadcast(boolean broadcast)
           
 BootstrapBuilder setForceRoutingOnlyToSelf()
           
 BootstrapBuilder setForceRoutingOnlyToSelf(boolean forceRoutingOnlyToSelf)
           
 BootstrapBuilder setInetAddress(InetAddress inetAddress)
           
 BootstrapBuilder setPeerAddress(PeerAddress peerAddress)
           
 BootstrapBuilder setPorts(int port)
           
 BootstrapBuilder setPortTCP(int portTCP)
           
 BootstrapBuilder setPortUDP(int portUDP)
           
 BootstrapBuilder setRequestP2PConfiguration(RequestP2PConfiguration requestP2PConfiguration)
           
 BootstrapBuilder setRoutingConfiguration(RoutingConfiguration routingConfiguration)
           
 FutureBootstrap start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BootstrapBuilder

public BootstrapBuilder(Peer peer)
Method Detail

getBootstrapTo

public Collection<PeerAddress> getBootstrapTo()

setBootstrapTo

public BootstrapBuilder setBootstrapTo(Collection<PeerAddress> bootstrapTo)

getPeerAddress

public PeerAddress getPeerAddress()

setPeerAddress

public BootstrapBuilder setPeerAddress(PeerAddress peerAddress)

getInetAddress

public InetAddress getInetAddress()

setInetAddress

public BootstrapBuilder setInetAddress(InetAddress inetAddress)

getPortUDP

public int getPortUDP()

setPortUDP

public BootstrapBuilder setPortUDP(int portUDP)

getPortTCP

public int getPortTCP()

setPortTCP

public BootstrapBuilder setPortTCP(int portTCP)

setPorts

public BootstrapBuilder setPorts(int port)

getRoutingConfiguration

public RoutingConfiguration getRoutingConfiguration()

setRoutingConfiguration

public BootstrapBuilder setRoutingConfiguration(RoutingConfiguration routingConfiguration)

getRequestP2PConfiguration

public RequestP2PConfiguration getRequestP2PConfiguration()

setRequestP2PConfiguration

public BootstrapBuilder setRequestP2PConfiguration(RequestP2PConfiguration requestP2PConfiguration)

isForceRoutingOnlyToSelf

public boolean isForceRoutingOnlyToSelf()

setForceRoutingOnlyToSelf

public BootstrapBuilder setForceRoutingOnlyToSelf()

setForceRoutingOnlyToSelf

public BootstrapBuilder setForceRoutingOnlyToSelf(boolean forceRoutingOnlyToSelf)

isBroadcast

public boolean isBroadcast()

setBroadcast

public BootstrapBuilder setBroadcast()

setBroadcast

public BootstrapBuilder setBroadcast(boolean broadcast)

start

public FutureBootstrap start()


Copyright © 2013. All Rights Reserved.