public class SeedPeers extends Object implements PeerDiscovery
| Constructor and Description |
|---|
SeedPeers(int[] seedAddrs,
NetworkParameters params)
Supports finding peers by IP addresses
|
SeedPeers(NetworkParameters params)
Supports finding peers by IP addresses
|
| Modifier and Type | Method and Description |
|---|---|
InetSocketAddress |
getPeer()
Acts as an iterator, returning the address of each node in the list sequentially.
|
InetSocketAddress[] |
getPeers(long timeoutValue,
TimeUnit timeoutUnit)
Returns an array containing all the Bitcoin nodes within the list.
|
void |
shutdown()
Stops any discovery in progress when we want to shut down quickly.
|
public SeedPeers(NetworkParameters params)
params - Network parameters to be used for port information.public SeedPeers(int[] seedAddrs,
NetworkParameters params)
seedAddrs - IP addresses for seed addresses.params - Network parameters to be used for port information.@Nullable public InetSocketAddress getPeer() throws PeerDiscoveryException
PeerDiscoveryExceptionpublic InetSocketAddress[] getPeers(long timeoutValue, TimeUnit timeoutUnit) throws PeerDiscoveryException
getPeers in interface PeerDiscoveryPeerDiscoveryExceptionpublic void shutdown()
PeerDiscoveryshutdown in interface PeerDiscoveryCopyright © 2015. All rights reserved.