package com.ecep.contract.ui;

import com.ecep.contract.MessageHolder;

import java.util.logging.Level;

/**
 * 错误消息处理
 */
public class MessageHolderImpl implements MessageHolder {
    private final Tasker tasker;

    public MessageHolderImpl(Tasker<?> tasker) {
        this.tasker = tasker;
    }

    @Override
    public void addMessage(Level level, String message) {
        tasker.updateMessage(level, message);
    }
}
