// Path: src/main/java/io/mycat/jcache/enums/protocol/Protocol.java
// public enum Protocol {
//     binary( 0 ),
//     negotiating( 0 ), /* Discovering the protocol */
//     ascii( 3 ), /* arbitrary value. */
// 	resp(4);/* redis protocol */
// 	
// 	private int value = 0;
// 
// 	private Protocol(int value) {
// 		this.value = value;
// 	}
// 
// 	public int getValue() {
// 		return value;
// 	}
// 
// 	public void setValue( int value ) {
// 		this.value = value;
// 	}
// }


import io.mycat.jcache.enums.protocol.Protocol;
package io.mycat.jcache.net.conn.handler;


/**
 * @author dragonwu
 * @date 17/1/20
 **/
public class IOHandlerFactory {

    private static final IOHandler ASCII_IO_HANDLER = new AsciiIOHanlder();
    private static final IOHandler BINARY_IO_HANDLER = new BinaryIOHandler();
    private static final IOHandler REDIS_IO_HANDLER = new RedisIOHandler();

    private IOHandlerFactory() {

    }

// Path: src/main/java/io/mycat/jcache/enums/protocol/Protocol.java
// public enum Protocol {
//     binary( 0 ),
//     negotiating( 0 ), /* Discovering the protocol */
//     ascii( 3 ), /* arbitrary value. */
// 	resp(4);/* redis protocol */
// 	
// 	private int value = 0;
// 
// 	private Protocol(int value) {
// 		this.value = value;
// 	}
// 
// 	public int getValue() {
// 		return value;
// 	}
// 
// 	public void setValue( int value ) {
// 		this.value = value;
// 	}
// }


// Path: src/main/java/io/mycat/jcache/net/conn/handler/IOHandlerFactory.java
import io.mycat.jcache.enums.protocol.Protocol;

package io.mycat.jcache.net.conn.handler;


/**
 * @author dragonwu
 * @date 17/1/20
 **/
public class IOHandlerFactory {

    private static final IOHandler ASCII_IO_HANDLER = new AsciiIOHanlder();
    private static final IOHandler BINARY_IO_HANDLER = new BinaryIOHandler();
    private static final IOHandler REDIS_IO_HANDLER = new RedisIOHandler();

    private IOHandlerFactory() {

    }

    public static IOHandler getHandler(Protocol protocol) {