Search in sources :

Example 1 with Request

use of org.bcos.web3j.protocol.core.Request 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);
    }
}
Also used : Request(org.bcos.web3j.protocol.core.Request) EthLog(org.bcos.web3j.protocol.core.methods.response.EthLog) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 Request (org.bcos.web3j.protocol.core.Request)1 EthLog (org.bcos.web3j.protocol.core.methods.response.EthLog)1