package com.ecep.contract.service;

import com.ecep.contract.Message;
import com.fasterxml.jackson.databind.JsonNode;

import java.util.concurrent.Callable;
import java.util.function.BiConsumer;
import java.util.function.Predicate;

public interface WebSocketServerTasker extends Callable<Object> {
    /**
     * 设置消息处理函数
     */
    void setMessageHandler(Predicate<Message> messageHandler);

    void setTitleHandler(Predicate<String> titleHandler);

    void setPropertyHandler(BiConsumer<String, Object> propertyHandler);

    void init(JsonNode argsNode);

    void setProgressHandler(BiConsumer<Long, Long> progressHandler);
}
