Retrieves the next transaction matching the feed's filter criteria. If no such transaction is available, this method will block until a matching transaction arrives in the blockchain, or if the specified timeout is reached. To avoid client-side timeouts, be sure to call {@link Client#setReadTimeout(
(Client client, long timeout)
| 1155 | * @throws ChainException |
| 1156 | */ |
| 1157 | public Transaction next(Client client, long timeout) throws ChainException { |
| 1158 | if (txIter == null || !txIter.hasNext()) { |
| 1159 | txIter = |
| 1160 | new QueryBuilder() |
| 1161 | .setFilter(filter) |
| 1162 | .setAfter(after) |
| 1163 | .setTimeout(timeout) |
| 1164 | .setAscendingWithLongPoll() |
| 1165 | .execute(client) |
| 1166 | .list |
| 1167 | .listIterator(); |
| 1168 | } |
| 1169 | |
| 1170 | lastTx = txIter.next(); |
| 1171 | return lastTx; |
| 1172 | } |
| 1173 | |
| 1174 | /** |
| 1175 | * Retrieves the next transaction matching the feed's filter criteria. |
nothing calls this directly
no test coverage detected