net.tomp2p.p2p.builder
Class BootstrapBuilder
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BootstrapBuilder
public BootstrapBuilder(Peer peer)
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.