Class ListenerVertx
- java.lang.Object
-
- io.nem.symbol.sdk.infrastructure.ListenerBase
-
- io.nem.symbol.sdk.infrastructure.vertx.ListenerVertx
-
- All Implemented Interfaces:
io.nem.symbol.sdk.api.Listener,java.io.Closeable,java.lang.AutoCloseable
public class ListenerVertx extends io.nem.symbol.sdk.infrastructure.ListenerBase implements io.nem.symbol.sdk.api.ListenerVertx implementations of theListener.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description ListenerVertx(io.vertx.core.http.HttpClient httpClient, java.lang.String url, io.nem.symbol.sdk.api.NamespaceRepository namespaceRepository, io.nem.symbol.sdk.api.MultisigRepository multisigRepository, io.reactivex.Observable<io.nem.symbol.sdk.model.network.NetworkType> networkTypeObservable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close webSocket connectionjava.util.concurrent.CompletableFuture<java.lang.Void>open()protected voidsubscribeTo(java.lang.String channel)protected io.nem.symbol.sdk.model.blockchain.BlockInfotoBlockInfo(java.lang.Object blockInfoDTO)protected io.nem.symbol.sdk.model.transaction.CosignatureSignedTransactiontoCosignatureSignedTransaction(java.lang.Object cosignatureJson, io.nem.symbol.sdk.model.network.NetworkType networkType)protected io.nem.symbol.sdk.model.blockchain.FinalizedBlocktoFinalizedBlock(java.lang.Object blockInfoDTO)protected io.nem.symbol.sdk.model.transaction.TransactiontoTransaction(io.nem.symbol.sdk.model.transaction.TransactionGroup group, java.lang.Object transactionInfo)-
Methods inherited from class io.nem.symbol.sdk.infrastructure.ListenerBase
aggregateBondedAdded, aggregateBondedAddedOrError, aggregateBondedRemoved, basicSubscribe, confirmed, confirmedOrError, cosignatureAdded, finalizedBlock, getAllAddressesAndAliases, getAllMultisigAddressesAndAliases, getJsonHelper, getMessageSubject, getUid, handle, newBlock, setUid, status, subscribe, subscribeMultipleAddresses, unconfirmedAdded, unconfirmedRemoved
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.nem.symbol.sdk.api.Listener
aggregateBondedAdded, aggregateBondedAdded, aggregateBondedAddedOrError, aggregateBondedRemoved, aggregateBondedRemoved, confirmed, confirmed, confirmedOrError, cosignatureAdded, cosignatureAdded, finalizedBlock, getAllAddressesAndAliases, getAllMultisigAddressesAndAliases, getUid, newBlock, status, status, subscribe, subscribeMultipleAddresses, unconfirmedAdded, unconfirmedAdded, unconfirmedRemoved, unconfirmedRemoved
-
-
-
-
Constructor Detail
-
ListenerVertx
public ListenerVertx(io.vertx.core.http.HttpClient httpClient, java.lang.String url, io.nem.symbol.sdk.api.NamespaceRepository namespaceRepository, io.nem.symbol.sdk.api.MultisigRepository multisigRepository, io.reactivex.Observable<io.nem.symbol.sdk.model.network.NetworkType> networkTypeObservable)- Parameters:
httpClient- the http client instance.url- of the hostnamespaceRepository- the namespace repository used to resolve alias.multisigRepository- the namespace repository used to resolve cosigners.networkTypeObservable- the network type
-
-
Method Detail
-
open
public java.util.concurrent.CompletableFuture<java.lang.Void> open()
- Specified by:
openin interfaceio.nem.symbol.sdk.api.Listener- Returns:
- a
CompletableFuturethat resolves when the websocket connection is opened
-
toBlockInfo
protected io.nem.symbol.sdk.model.blockchain.BlockInfo toBlockInfo(java.lang.Object blockInfoDTO)
- Specified by:
toBlockInfoin classio.nem.symbol.sdk.infrastructure.ListenerBase
-
toFinalizedBlock
protected io.nem.symbol.sdk.model.blockchain.FinalizedBlock toFinalizedBlock(java.lang.Object blockInfoDTO)
- Specified by:
toFinalizedBlockin classio.nem.symbol.sdk.infrastructure.ListenerBase
-
toTransaction
protected io.nem.symbol.sdk.model.transaction.Transaction toTransaction(io.nem.symbol.sdk.model.transaction.TransactionGroup group, java.lang.Object transactionInfo)- Specified by:
toTransactionin classio.nem.symbol.sdk.infrastructure.ListenerBase
-
toCosignatureSignedTransaction
protected io.nem.symbol.sdk.model.transaction.CosignatureSignedTransaction toCosignatureSignedTransaction(java.lang.Object cosignatureJson, io.nem.symbol.sdk.model.network.NetworkType networkType)- Specified by:
toCosignatureSignedTransactionin classio.nem.symbol.sdk.infrastructure.ListenerBase
-
close
public void close()
Close webSocket connection- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceio.nem.symbol.sdk.api.Listener
-
subscribeTo
protected void subscribeTo(java.lang.String channel)
- Specified by:
subscribeToin classio.nem.symbol.sdk.infrastructure.ListenerBase
-
-