package com.ecep.contract.task;

import com.ecep.contract.MessageHolder;
import com.ecep.contract.WebSocketClientTasker;
import com.ecep.contract.vo.ContractVo;

import lombok.Getter;
import lombok.Setter;

public class ContractVerifyTasker extends Tasker<Object> implements WebSocketClientTasker {
    @Setter
    private ContractVo contract;
    @Getter
    @Setter
    boolean passed = false;

    @Override
    public String getTaskName() {
        return getClass().getSimpleName();
    }

    @Override
    public void updateProgress(long current, long total) {
        super.updateProgress(current, total);
    }

    @Override
    protected Object execute(MessageHolder holder) throws Exception {
        return callRemoteTask(holder, getLocale(), contract.getId());
    }

}
