| Package | Description | 
|---|---|
| org.bitcoinj.core | The core package contains classes for network messages like  BlockandTransaction, peer connectivity viaPeerGroup,
 and block chain management. | 
| org.bitcoinj.core.listeners | |
| org.bitcoinj.jni | |
| org.bitcoinj.wallet | Classes that support the  Wallet, which knows how to find and save transactions relevant to
 a set of keys or scripts, calculate balances, and spend money: the wallet has many features and can be extended
 in various ways, please refer to the website for documentation on how to use it. | 
| Modifier and Type | Method and Description | 
|---|---|
| Peer | PeerGroup. connectTo(InetSocketAddress address)Connect to a peer by creating a channel to the destination address. | 
| protected Peer | PeerGroup. connectTo(PeerAddress address,
         boolean incrementMaxConnections,
         int connectTimeoutMillis)Creates a version message to send, constructs a Peer object and attempts to connect it. | 
| Peer | PeerGroup. connectToLocalHost()Helper for forcing a connection to localhost. | 
| protected Peer | PeerGroup. createPeer(PeerAddress address,
          VersionMessage ver)You can override this to customise the creation of  Peerobjects. | 
| Peer | PeerGroup. getDownloadPeer()Returns the currently selected download peer. | 
| protected Peer | PeerGroup. selectDownloadPeer(List<Peer> peers)Given a list of Peers, return a Peer to be used as the download peer. | 
| Modifier and Type | Method and Description | 
|---|---|
| List<Peer> | PeerGroup. findPeersOfAtLeastVersion(long protocolVersion)Returns an array list of peers that implement the given protocol version or better. | 
| List<Peer> | PeerGroup. findPeersWithServiceMask(int mask)Returns an array list of peers that match the requested service bit mask. | 
| List<Peer> | PeerGroup. getConnectedPeers()Returns a newly allocated list containing the currently connected peers. | 
| ListenableFuture<Peer> | Peer. getConnectionOpenFuture()Provides a ListenableFuture that can be used to wait for the socket to connect. | 
| List<Peer> | PeerGroup. getPendingPeers()Returns a list containing Peers that did not complete connection yet. | 
| ListenableFuture<List<Peer>> | Peer. getVersionHandshakeFuture() | 
| ListenableFuture<List<Peer>> | PeerGroup. waitForPeers(int numPeers)Returns a future that is triggered when the number of connected peers is equal to the given number of
 peers. | 
| ListenableFuture<List<Peer>> | PeerGroup. waitForPeersOfVersion(int numPeers,
                     long protocolVersion)Returns a future that is triggered when there are at least the requested number of connected peers that support
 the given protocol version or higher. | 
| ListenableFuture<List<Peer>> | PeerGroup. waitForPeersWithServiceMask(int numPeers,
                           int mask)Returns a future that is triggered when there are at least the requested number of connected peers that support
 the given protocol version or higher. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | PeerGroup. handleNewPeer(Peer peer) | 
| protected void | PeerGroup. handlePeerDeath(Peer peer,
               Throwable exception) | 
| Modifier and Type | Method and Description | 
|---|---|
| static int | PeerGroup. getMostCommonChainHeight(List<Peer> peers)Returns most commonly reported chain height from the given list of  Peers. | 
| protected Peer | PeerGroup. selectDownloadPeer(List<Peer> peers)Given a list of Peers, return a Peer to be used as the download peer. | 
| Modifier and Type | Method and Description | 
|---|---|
| List<Message> | AbstractPeerDataEventListener. getData(Peer peer,
       GetDataMessage m)Deprecated.  | 
| List<Message> | AbstractPeerEventListener. getData(Peer peer,
       GetDataMessage m)Deprecated.  | 
| List<Message> | GetDataEventListener. getData(Peer peer,
       GetDataMessage m)Called when a peer receives a getdata message, usually in response to an "inv" being broadcast. | 
| void | BlocksDownloadedEventListener. onBlocksDownloaded(Peer peer,
                  Block block,
                  FilteredBlock filteredBlock,
                  int blocksLeft)Called on a Peer thread when a block is received. | 
| void | DownloadProgressTracker. onBlocksDownloaded(Peer peer,
                  Block block,
                  FilteredBlock filteredBlock,
                  int blocksLeft) | 
| void | AbstractPeerDataEventListener. onBlocksDownloaded(Peer peer,
                  Block block,
                  FilteredBlock filteredBlock,
                  int blocksLeft)Deprecated.  | 
| void | AbstractPeerEventListener. onBlocksDownloaded(Peer peer,
                  Block block,
                  FilteredBlock filteredBlock,
                  int blocksLeft)Deprecated.  | 
| void | ChainDownloadStartedEventListener. onChainDownloadStarted(Peer peer,
                      int blocksLeft)Called when a download is started with the initial number of blocks to be downloaded. | 
| void | DownloadProgressTracker. onChainDownloadStarted(Peer peer,
                      int blocksLeft) | 
| void | AbstractPeerDataEventListener. onChainDownloadStarted(Peer peer,
                      int blocksLeft)Deprecated.  | 
| void | AbstractPeerEventListener. onChainDownloadStarted(Peer peer,
                      int blocksLeft)Deprecated.  | 
| void | AbstractPeerConnectionEventListener. onPeerConnected(Peer peer,
               int peerCount)Deprecated.  | 
| void | AbstractPeerEventListener. onPeerConnected(Peer peer,
               int peerCount)Deprecated.  | 
| void | PeerConnectedEventListener. onPeerConnected(Peer peer,
               int peerCount)Called when a peer is connected. | 
| void | PeerConnectionEventListener. onPeerDisconnected(Peer peer,
                  int peerCount)Deprecated.  Called when a peer is disconnected. | 
| void | AbstractPeerConnectionEventListener. onPeerDisconnected(Peer peer,
                  int peerCount)Deprecated.  | 
| void | PeerDisconnectedEventListener. onPeerDisconnected(Peer peer,
                  int peerCount)Called when a peer is disconnected. | 
| void | AbstractPeerEventListener. onPeerDisconnected(Peer peer,
                  int peerCount)Deprecated.  | 
| Message | PreMessageReceivedEventListener. onPreMessageReceived(Peer peer,
                    Message m)Called when a message is received by a peer, before the message is processed. | 
| Message | AbstractPeerDataEventListener. onPreMessageReceived(Peer peer,
                    Message m)Deprecated.  | 
| Message | AbstractPeerEventListener. onPreMessageReceived(Peer peer,
                    Message m)Deprecated.  | 
| void | OnTransactionBroadcastListener. onTransaction(Peer peer,
             Transaction t)Called when a new transaction is broadcast over the network. | 
| void | AbstractPeerEventListener. onTransaction(Peer peer,
             Transaction t)Deprecated.  | 
| Modifier and Type | Method and Description | 
|---|---|
| List<Message> | NativePeerEventListener. getData(Peer peer,
       GetDataMessage m) | 
| void | NativePeerEventListener. onBlocksDownloaded(Peer peer,
                  Block block,
                  FilteredBlock filteredBlock,
                  int blocksLeft) | 
| void | NativePeerEventListener. onChainDownloadStarted(Peer peer,
                      int blocksLeft) | 
| void | NativePeerEventListener. onPeerConnected(Peer peer,
               int peerCount) | 
| void | NativePeerEventListener. onPeerDisconnected(Peer peer,
                  int peerCount) | 
| Message | NativePeerEventListener. onPreMessageReceived(Peer peer,
                    Message m) | 
| void | NativePeerEventListener. onTransaction(Peer peer,
             Transaction t) | 
| Modifier and Type | Method and Description | 
|---|---|
| Transaction | Wallet. sendCoins(Peer peer,
         SendRequest request)Sends coins to the given address, via the given  Peer. | 
Copyright © 2016. All rights reserved.