Package org.consensusj.bitcoin.rx.zeromq
Class RxBitcoinZmqService
java.lang.Object
org.consensusj.bitcoin.rx.zeromq.RxBitcoinZmqBinaryService
org.consensusj.bitcoin.rx.zeromq.RxBitcoinZmqService
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ChainTipService
,RxBlockchainBinaryService
,RxBlockchainService
public class RxBitcoinZmqService
extends RxBitcoinZmqBinaryService
implements RxBlockchainService, ChainTipService, Closeable
Add conversion to bitcoinj-types to
RxBitcoinZmqBinaryService
. Also
uses the JSON-RPC client to fetch an initial Block
so subscribers don't
have to wait ~ten minutes for one.-
Field Summary
Fields inherited from class org.consensusj.bitcoin.rx.zeromq.RxBitcoinZmqBinaryService
client
-
Constructor Summary
ConstructorDescriptionRxBitcoinZmqService
(org.bitcoinj.base.Network network, URI rpcUri, String rpcUser, String rpcPassword) RxBitcoinZmqService
(BitcoinClient client) -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher
<org.bitcoinj.base.Sha256Hash> org.reactivestreams.Publisher
<Integer> org.reactivestreams.Publisher
<org.bitcoinj.core.Block> This method will give you a stream of ChainTipsvoid
close()
org.reactivestreams.Publisher
<org.bitcoinj.base.Sha256Hash> org.reactivestreams.Publisher
<org.bitcoinj.core.Transaction> Methods inherited from class org.consensusj.bitcoin.rx.zeromq.RxBitcoinZmqBinaryService
blockBinaryPublisher, blockHashBinaryPublisher, transactionBinaryPublisher, transactionHashBinaryPublisher
-
Constructor Details
-
RxBitcoinZmqService
public RxBitcoinZmqService(org.bitcoinj.base.Network network, URI rpcUri, String rpcUser, String rpcPassword) -
RxBitcoinZmqService
-
-
Method Details
-
transactionPublisher
- Specified by:
transactionPublisher
in interfaceRxBlockchainService
-
transactionHashPublisher
- Specified by:
transactionHashPublisher
in interfaceRxBlockchainService
-
blockPublisher
- Specified by:
blockPublisher
in interfaceRxBlockchainService
-
blockHashPublisher
- Specified by:
blockHashPublisher
in interfaceRxBlockchainService
-
blockHeightPublisher
- Specified by:
blockHeightPublisher
in interfaceRxBlockchainService
-
chainTipPublisher
Description copied from interface:ChainTipService
This method will give you a stream of ChainTips- Specified by:
chainTipPublisher
in interfaceChainTipService
- Specified by:
chainTipPublisher
in interfaceRxBlockchainService
- Returns:
- A Publisher for the sequence
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classRxBitcoinZmqBinaryService
-