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

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

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

import org.bcos.channel.dto.EthereumResponse;
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(EthereumResponse response);

    public void onTimeout() {
        logger.error("transactionSuc timeout");
        EthereumResponse response = new EthereumResponse();
        response.setErrorCode(102);
        response.setErrorMessage("transactionSuc timeout");
        response.setContent("");
        onResponse(response);
    }

    public Timeout getTimeout() {
        return timeout;
    }

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

    private Timeout timeout;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy