public class ListenerOkHttp
extends io.nem.sdk.infrastructure.ListenerBase
implements io.nem.sdk.api.Listener
Listener.| Constructor and Description |
|---|
ListenerOkHttp(okhttp3.OkHttpClient httpClient,
java.lang.String url,
io.nem.sdk.openapi.okhttp_gson.invoker.JSON json) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close webSocket connection
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
open() |
protected void |
subscribeTo(java.lang.String channel) |
protected io.nem.sdk.model.blockchain.BlockInfo |
toBlockInfo(java.lang.Object blockInfoDTO) |
protected io.nem.sdk.model.transaction.Transaction |
toTransaction(java.lang.Object transactionInfo) |
aggregateBondedAdded, aggregateBondedAdded, aggregateBondedRemoved, confirmed, confirmed, cosignatureAdded, getJsonHelper, getMessageSubject, getUid, handle, newBlock, setUid, status, transactionFromAddress, unconfirmedAdded, unconfirmedRemovedpublic ListenerOkHttp(okhttp3.OkHttpClient httpClient,
java.lang.String url,
io.nem.sdk.openapi.okhttp_gson.invoker.JSON json)
httpClient - the ok http clienturl - nis hostjson - gson's json.public java.util.concurrent.CompletableFuture<java.lang.Void> open()
open in interface io.nem.sdk.api.ListenerCompletableFuture that resolves when the websocket connection is openedprotected io.nem.sdk.model.blockchain.BlockInfo toBlockInfo(java.lang.Object blockInfoDTO)
toBlockInfo in class io.nem.sdk.infrastructure.ListenerBaseprotected io.nem.sdk.model.transaction.Transaction toTransaction(java.lang.Object transactionInfo)
toTransaction in class io.nem.sdk.infrastructure.ListenerBasepublic void close()
close in interface io.nem.sdk.api.Listenerclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableprotected void subscribeTo(java.lang.String channel)
subscribeTo in class io.nem.sdk.infrastructure.ListenerBase