Package org.bitcoinj.net.discovery
Class DnsDiscovery.DnsSeedDiscovery
java.lang.Object
org.bitcoinj.net.discovery.DnsDiscovery.DnsSeedDiscovery
- All Implemented Interfaces:
PeerDiscovery
- Enclosing class:
- DnsDiscovery
Implements discovery from a single DNS host.
-
Constructor Summary
ConstructorDescriptionDnsSeedDiscovery
(Network network, String hostname) DnsSeedDiscovery
(NetworkParameters params, String hostname) Deprecated. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bitcoinj.net.discovery.PeerDiscovery
getPeers
-
Constructor Details
-
DnsSeedDiscovery
-
DnsSeedDiscovery
Deprecated.
-
-
Method Details
-
getPeers
public List<InetSocketAddress> getPeers(long services, Duration timeout) throws PeerDiscoveryException Description copied from interface:PeerDiscovery
Queries for addresses. This method may block.- Specified by:
getPeers
in interfacePeerDiscovery
- Parameters:
services
- required services as a bitmask, e.g.Services.NODE_NETWORK
timeout
- query timeout- Returns:
- found addresses
- Throws:
PeerDiscoveryException
-
shutdown
public void shutdown()Description copied from interface:PeerDiscovery
Stops any discovery in progress when we want to shut down quickly.- Specified by:
shutdown
in interfacePeerDiscovery
-
toString
-
DnsSeedDiscovery(Network, String)