use of org.bcos.web3j.protocol.core.methods.response.EthLog in project web3sdk by FISCO-BCOS.
the class Filter method pollFilter.
private void pollFilter(EthFilter ethFilter) {
EthLog ethLog = null;
try {
ethLog = web3j.ethGetFilterChanges(filterId).send();
} catch (IOException e) {
throwException(e);
}
if (ethLog.hasError()) {
throwException(ethFilter.getError());
}
process(ethLog.getLogs());
}
use of org.bcos.web3j.protocol.core.methods.response.EthLog in project web3sdk by FISCO-BCOS.
the class Filter method getInitialFilterLogs.
private void getInitialFilterLogs() {
try {
Optional<Request<?, EthLog>> maybeRequest = this.getFilterLogs(this.filterId);
EthLog ethLog;
if (maybeRequest.isPresent()) {
ethLog = maybeRequest.get().send();
} else {
ethLog = new EthLog();
ethLog.setResult(Collections.emptyList());
}
process(ethLog.getLogs());
} catch (IOException e) {
throwException(e);
}
}
Aggregations