public class PeerNAT extends Object
| Modifier and Type | Method and Description |
|---|---|
BootstrapBuilder |
bootstrapBuilder() |
PeerNAT |
bootstrapBuilder(BootstrapBuilder bootstrapBuilder)
Specify a bootstrap builder that will be used to bootstrap during the
process of setting up relay peers and after that.
|
PeerNAT |
bootstrapBuilder(PeerAddress peerAddress) |
int |
failedRelayWaitTime() |
PeerNAT |
failedRelayWaitTime(int failedRelayWaitTime)
Defines how many seconds to wait at least until asking a relay that
denied a relay request or a relay that failed to act as a relay again
|
int |
maxFail() |
PeerNAT |
maxFail(int maxFail) |
int |
minRelays() |
PeerNAT |
minRelays(int minRelays)
Defines how many relays have to be set up.
|
int |
peerMapUpdateInterval() |
PeerNAT |
peerMapUpdateInterval(int peerMapUpdateInterval)
Defines the time interval of sending the peer map of the unreachable peer
to its relays.
|
RelayRPC |
relayRPC() |
Collection<PeerAddress> |
relays() |
PeerNAT |
relays(Collection<PeerAddress> relays) |
Ports |
setupPortforwarding(String internalHost)
The Dynamic and/or Private Ports are those from 49152 through 65535
(http://www.iana.org/assignments/port-numbers).
|
FutureRelayNAT |
startRelay() |
FutureRelayNAT |
startRelay(FutureNAT futureNAT) |
Shutdown |
startRelayMaintenance(FutureRelay futureRelay) |
FutureNAT |
startSetupPortforwarding(FutureDiscover futureDiscover)
Setup UPNP or NATPMP port forwarding.
|
FutureRelay |
startSetupRelay() |
FutureRelay |
startSetupRelay(FutureNAT futureNAT) |
public PeerNAT(Peer peer)
public RelayRPC relayRPC()
public FutureNAT startSetupPortforwarding(FutureDiscover futureDiscover)
futureDiscover - The result of the discovery process. This information from the
discovery process is important to setup UPNP or NATPMP. If
this fails, then this future will also fail, and other means
to connect to the network needs to be found.public Ports setupPortforwarding(String internalHost)
internalHost - The IP of the internal hostpublic FutureRelay startSetupRelay(FutureNAT futureNAT)
public FutureRelay startSetupRelay()
public Shutdown startRelayMaintenance(FutureRelay futureRelay)
public FutureRelayNAT startRelay()
public FutureRelayNAT startRelay(FutureNAT futureNAT)
public PeerNAT failedRelayWaitTime(int failedRelayWaitTime)
failedRelayWaitTime - wait time in secondspublic int failedRelayWaitTime()
public PeerNAT minRelays(int minRelays)
minRelays - minimum amount of relayspublic int minRelays()
public PeerNAT maxFail(int maxFail)
public int maxFail()
public PeerNAT peerMapUpdateInterval(int peerMapUpdateInterval)
peerMapUpdateInterval - interval of updates in secondspublic int peerMapUpdateInterval()
public PeerNAT bootstrapBuilder(BootstrapBuilder bootstrapBuilder)
bootstrapBuilder - The bootstrap builderpublic PeerNAT bootstrapBuilder(PeerAddress peerAddress)
public BootstrapBuilder bootstrapBuilder()
public Collection<PeerAddress> relays()
public PeerNAT relays(Collection<PeerAddress> relays)
Copyright © 2014. All rights reserved.