package com.eactive.eai.adapter.socket2.protocol.login.codec;

import com.eactive.eai.adapter.socket2.protocol.ISocketAdapter;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

public class BindCodecFactory implements ProtocolCodecFactory {
	private ProtocolEncoder encoder;
	private ProtocolDecoder decoder;
	
	public BindCodecFactory(ISocketAdapter adapter) {
		encoder = new BindEncoder(adapter);
		decoder = new BindDecoder(adapter);
	}

	public ProtocolDecoder getDecoder() throws Exception {
		return decoder;
	}

	public ProtocolEncoder getEncoder() throws Exception {
		return encoder;
	}
}
