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

com.mugui.base.client.net.bagsend.NetCall Maven / Gradle / Ivy

There is a newer version: 0.0.8
Show newest version
package com.mugui.base.client.net.bagsend;

import com.mugui.base.client.net.baghandle.NetHandle;
import com.mugui.base.client.net.bean.Message;
import com.mugui.base.client.net.bean.NetBag;

import lombok.Getter;

public class NetCall  {

    public static interface Call{
        Message ok(Message data);
        Message err(Message data);
    }

    /**
     * 判断是否有处理器
     * @return
     */
    public boolean isCall(){
        return main!=null||son!=null;
    }
    /**
     * 主线程
     */
    @Getter
    private Call main=null;
    /**
     * 子线程
     */
    @Getter
    private Call son=null;


    /**
     * 主线程
     */
    public NetCall main(Call call){
        main=call;
        return this;
    }

    /**
     *子线程
     * @param call
     * @return
     */
    public NetCall son(Call call){
        son=call;
        return this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy