All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fisco.bcos.channel.client.TransactionSucCallback Maven / Gradle / Ivy

There is a newer version: 2.6.6
Show newest version
package org.fisco.bcos.channel.client;

import org.fisco.bcos.channel.dto.EthereumResponse;
import org.fisco.bcos.web3j.protocol.core.methods.response.TransactionReceipt;

import io.netty.util.Timeout;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by suyuhui on 17/8/17.
 */
public abstract class TransactionSucCallback {
    private static Logger logger = LoggerFactory.getLogger(TransactionSucCallback.class);

    public abstract void onResponse(TransactionReceipt response);

    public void onTimeout() {
        logger.error("transactionSuc timeout");
        
        TransactionReceipt receipt = new TransactionReceipt();
        receipt.setStatus("Receipt timeout");
        onResponse(receipt);
    }

    public Timeout getTimeout() {
        return timeout;
    }

    public void setTimeout(Timeout timeout) {
        this.timeout = timeout;
    }

    private Timeout timeout;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy