// Path: Java/Blink/library/src/net/qiujuer/blink/core/listener/ConnectListener.java
// public interface ConnectListener {
// 
//     /**
//      * On Receive or Sender socket error call this
//      *
//      * @param connector Connector
//      */
//     void onConnectClosed(Connector connector);
// }
// 
// Path: Java/Blink/library/src/net/qiujuer/blink/core/listener/ReceiveListener.java
// public interface ReceiveListener {
//     /**
//      * On Receiver receive new packet call this
//      *
//      * @param connector Connector
//      * @param packet    ReceivePacket
//      */
//     void onReceiveStart(Connector connector, ReceivePacket packet);
// 
//     /**
//      * Receiver receive packet progress
//      *
//      * @param connector Connector
//      * @param packet    ReceivePacket
//      * @param progress  Receive Progress
//      */
//     void onReceiveProgress(Connector connector, ReceivePacket packet, float progress);
// 
//     /**
//      * On Receiver end receive packet call this
//      *
//      * @param connector Connector
//      * @param packet    ReceivePacket
//      */
//     void onReceiveCompleted(Connector connector, ReceivePacket packet);
// }
// 
// Path: Java/Blink/library/src/net/qiujuer/blink/kit/Disposable.java
// public interface Disposable {
//     /**
//      * Perform related to release or reset unmanaged resources application defined tasks.
//      */
//     void dispose();
// }


import net.qiujuer.blink.async.SelectorFactory;
import net.qiujuer.blink.core.delivery.ConnectDelivery;
import net.qiujuer.blink.core.delivery.ReceiveDelivery;
import net.qiujuer.blink.core.delivery.SendDelivery;
import net.qiujuer.blink.core.listener.ConnectListener;
import net.qiujuer.blink.core.listener.ReceiveListener;
import net.qiujuer.blink.kit.Disposable;
import java.util.UUID;
     * Set connector ReceiveDispatcher
     * The ReceiveDispatcher dispatch receiver/buffer/packet/parser to receive socket data.
     *
     * @param receiveDispatcher ReceiveDispatcher
     * @return Connector
     */
    protected Connector setReceiveDispatcher(ReceiveDispatcher receiveDispatcher) {
        this.mReceiveDispatcher = receiveDispatcher;
        return this;
    }

    /**
     * Set connector ConnectListener
     * The ConnectListener callback connect status
     *
     * @param connectListener ConnectListener
     * @return Connector
     */
    public Connector setConnectListener(ConnectListener connectListener) {
        this.mConnectListener = connectListener;
        return this;
    }

    /**
     * Set connector ReceiveListener
     * The ReceiveListener callback receive status
     *
     * @param receiveListener ReceiveListener
     * @return Connector
     */
// Path: Java/Blink/library/src/net/qiujuer/blink/core/listener/ConnectListener.java
// public interface ConnectListener {
// 
//     /**
//      * On Receive or Sender socket error call this
//      *
//      * @param connector Connector
//      */
//     void onConnectClosed(Connector connector);
// }
// 
// Path: Java/Blink/library/src/net/qiujuer/blink/core/listener/ReceiveListener.java
// public interface ReceiveListener {
//     /**
//      * On Receiver receive new packet call this
//      *
//      * @param connector Connector
//      * @param packet    ReceivePacket
//      */
//     void onReceiveStart(Connector connector, ReceivePacket packet);
// 
//     /**
//      * Receiver receive packet progress
//      *
//      * @param connector Connector
//      * @param packet    ReceivePacket
//      * @param progress  Receive Progress
//      */
//     void onReceiveProgress(Connector connector, ReceivePacket packet, float progress);
// 
//     /**
//      * On Receiver end receive packet call this
//      *
//      * @param connector Connector
//      * @param packet    ReceivePacket
//      */
//     void onReceiveCompleted(Connector connector, ReceivePacket packet);
// }
// 
// Path: Java/Blink/library/src/net/qiujuer/blink/kit/Disposable.java
// public interface Disposable {
//     /**
//      * Perform related to release or reset unmanaged resources application defined tasks.
//      */
//     void dispose();
// }


// Path: Java/Blink/library/src/net/qiujuer/blink/core/Connector.java
import net.qiujuer.blink.async.SelectorFactory;
import net.qiujuer.blink.core.delivery.ConnectDelivery;
import net.qiujuer.blink.core.delivery.ReceiveDelivery;
import net.qiujuer.blink.core.delivery.SendDelivery;
import net.qiujuer.blink.core.listener.ConnectListener;
import net.qiujuer.blink.core.listener.ReceiveListener;
import net.qiujuer.blink.kit.Disposable;
import java.util.UUID;

     * Set connector ReceiveDispatcher
     * The ReceiveDispatcher dispatch receiver/buffer/packet/parser to receive socket data.
     *
     * @param receiveDispatcher ReceiveDispatcher
     * @return Connector
     */
    protected Connector setReceiveDispatcher(ReceiveDispatcher receiveDispatcher) {
        this.mReceiveDispatcher = receiveDispatcher;
        return this;
    }

    /**
     * Set connector ConnectListener
     * The ConnectListener callback connect status
     *
     * @param connectListener ConnectListener
     * @return Connector
     */
    public Connector setConnectListener(ConnectListener connectListener) {
        this.mConnectListener = connectListener;
        return this;
    }

    /**
     * Set connector ReceiveListener
     * The ReceiveListener callback receive status
     *
     * @param receiveListener ReceiveListener
     * @return Connector
     */
    public Connector setReceiveListener(ReceiveListener receiveListener) {